zhangjie 1 năm trước cách đây
mục cha
commit
9c10045400

+ 12 - 0
src/assets/icons/icon-task.svg

@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg width="20px" height="20px" viewBox="0 0 20 20" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
+    <title>icon-任务管理</title>
+    <g id="系统管理" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
+        <g id="35.01-系统管理-任务管理" transform="translate(-96, -424)">
+            <g id="icon-任务管理" transform="translate(96, 424)">
+                <rect id="calendar-(Background)" opacity="0" x="0" y="0" width="20" height="20"></rect>
+                <path d="M12.5,1.875 C13.1903559,1.875 13.75,2.43464406 13.75,3.125 L13.75,3.75 L16.25,3.75 C16.9403559,3.75 17.5,4.30964406 17.5,5 L17.5,16.25 C17.5,16.9403559 16.9403559,17.5 16.25,17.5 L3.75,17.5 C3.05964406,17.5 2.5,16.9403559 2.5,16.25 L2.5,5 C2.5,4.30964406 3.05964406,3.75 3.75,3.75 L6.25,3.75 L6.25,3.125 C6.25,2.43464406 6.80964406,1.875 7.5,1.875 L12.5,1.875 Z M12.5,5.625 L7.5,5.625 C7.0341773,5.625 6.62786738,5.37019552 6.41284474,4.99236106 L6.41810313,5.00151085 L3.75,5 L3.75,16.25 L16.25,16.25 L16.25,5 L13.5818969,5.00151085 L13.5871553,4.99236106 C13.3721326,5.37019552 12.9658227,5.625 12.5,5.625 Z M12.8216034,8.30836773 L13.7054956,9.19224262 L9.23675299,13.6610699 L6.29443526,10.7187569 L7.1783179,9.83487248 L9.23674345,11.893295 L12.8216034,8.30836773 Z M12.5,3.125 L7.5,3.125 L7.5,4.375 L12.5,4.375 L12.5,3.125 Z" id="形状结合" fill="#165DFF" fill-rule="nonzero"></path>
+            </g>
+        </g>
+    </g>
+</svg>

+ 8 - 0
src/components/common/status-tag/config.js

@@ -70,6 +70,14 @@ const configs = {
     },
     valFilter: runningStatusFilter,
   },
+  taskStatus: {
+    themeDict: {
+      已完成: 'success',
+      进行中: 'primary',
+      未开始: 'default',
+    },
+    valFilter: (val) => val,
+  },
 };
 export function getConfig(type) {
   return configs[type] || { themeDict: {}, valFilter: (val) => val };

+ 1 - 1
src/router/modules/system.js

@@ -138,7 +138,7 @@ export default {
             title: '任务管理',
             sort: 1,
             alias: 'task',
-            icon: 'service-crm',
+            icon: 'task',
           },
         },
       ],

+ 9 - 0
src/style/global.less

@@ -323,6 +323,15 @@ body {
   color: @light-text-color;
 }
 
+.color-brand {
+  color: @brand-color;
+}
+.color-error {
+  color: @error-color;
+}
+.color-success {
+  color: @success-color;
+}
 .color-warning {
   color: @warning-color;
 }

+ 1 - 1
src/views/sop/components/dynamic-form-item/device-table/edit-column-dialog.vue

@@ -177,7 +177,7 @@ const save = async () => {
   for (let key in formData) {
     data[key] = formData[key];
   }
-  data.address = data.addressArr.join('');
+  if (props.isOutType) data.address = data.addressArr.join('');
   emit('update:visible', false);
   emit('success', data);
 };

+ 1 - 1
src/views/sop/components/dynamic-form-item/device-table/index.vue

@@ -133,7 +133,7 @@ const handleAdd = () => {
     scanCount: '',
     location: '',
     address: '',
-    addressArr: isOutType.value ? ['', '', ''] : '',
+    addressArr: ['', '', ''],
     basePhotoPath: '',
   };
   showEditColumnDialog.value = true;

+ 2 - 3
src/views/sop/sop-manage/sop-step/index.vue

@@ -626,9 +626,8 @@ const submitHandle = async (approve = 'START') => {
 };
 // 编辑-保存
 const saveHandle = async () => {
-  stepChange();
-  // const valid = await form.value[0].validate();
-  // if (valid !== true) return;
+  const valid = await form.value.validate();
+  if (valid !== true) return;
 
   const res = await sopSaveApi({
     id: props.sop.id,

+ 9 - 0
src/views/system/task/task-manage/index.vue

@@ -19,6 +19,15 @@
         }"
         v-loading="tableLoading"
       >
+        <template #result="{ col, row }">
+          <span
+            :class="row.result === '成功' ? 'color-success' : 'color-error'"
+            >{{ row.result }}</span
+          >
+        </template>
+        <template #status="{ col, row }">
+          <status-tag :value="row[col.colKey]" type="taskStatus"></status-tag>
+        </template>
         <template #create-time="{ col, row }">
           {{ timestampFilter(row[col.colKey]) }}
         </template>