刘洋 1 rok pred
rodič
commit
c0b567f7ab

+ 1 - 4
src/components/global/tag-list/index.vue

@@ -19,7 +19,7 @@
         >保存</t-button
       >
     </div>
-    <div class="tag-list flex">
+    <div class="tag-list flex" v-if="!!list.length">
       <div
         class="fast-tag"
         v-for="item in list"
@@ -113,9 +113,6 @@ const deleteItem = (item) => {
 };
 </script>
 <style lang="less" scoped>
-.tag-list-box {
-  padding-bottom: 10px;
-}
 .tag-list {
   padding: 5px 0;
   flex-wrap: wrap;

+ 5 - 1
src/views/sop/components/select-metadata.vue

@@ -73,7 +73,11 @@ const search = async () => {
   const res = await metadataListApi({ type: props.type }).catch(() => {});
   if (!res) return;
   const noneedCodes = ['FILE', 'TABLE', 'DEVICE_OUT_TABLE', 'DEVICE_IN_TABLE'];
-  optionList.value = res.filter((item) => !noneedCodes.includes(item.code));
+  optionList.value = res.filter(
+    (item) =>
+      !noneedCodes.includes(item.code) &&
+      !props.originColumns.find((v) => v.id == item.id)
+  );
   // console.log(new Set(optionList.value.map((item) => item.code)));
 
   optionList.value.unshift(...cloneDeep(props.originColumns));

+ 25 - 7
src/views/sop/sop-manage/office-sop/index.vue

@@ -45,7 +45,7 @@
       <select-filter
         :metadata="formWidgetMetadataViewList"
         @confirm="filterConfirm"
-        type="CLOUD_MARK_SOP_FLOW"
+        type="OFFICE_SOP_FLOW"
         contentType="SEARCH"
       ></select-filter>
     </div>
@@ -361,7 +361,7 @@ const columns = computed(() => {
 const fastShowOptions = ref([]);
 const getFastShowOptions = () => {
   getSopFastOptionsApi({
-    type: 'CLOUD_MARK_SOP_FLOW',
+    type: 'OFFICE_SOP_FLOW',
     contentType: 'VIEW',
   }).then((res) => {
     fastShowOptions.value = (res || []).map((item) => ({
@@ -372,6 +372,21 @@ const getFastShowOptions = () => {
   });
 };
 getFastShowOptions();
+
+const fastSearchOptions = ref([]);
+const getFastSearchOptions = () => {
+  getSopFastOptionsApi({
+    type: 'OFFICE_SOP_FLOW',
+    contentType: 'SEARCH',
+  }).then((res) => {
+    fastSearchOptions.value = (res || []).map((item) => ({
+      ...item,
+      label: item.name,
+      value: item.id,
+    }));
+  });
+};
+getFastSearchOptions();
 const fields = ref([
   {
     prop: 'serviceId',
@@ -402,7 +417,7 @@ const fields = ref([
     colSpan: 6,
     options:
       appStore
-        .getFlowDetailByType('CLOUD_MARK_SOP_FLOW')
+        .getFlowDetailByType('OFFICE_SOP_FLOW')
         ?.setupList?.map((item) => ({ value: item, label: item })) || [],
   },
   {
@@ -430,7 +445,7 @@ const fields = ref([
     type: 'select',
     labelWidth: 104,
     colSpan: 6,
-    options: [],
+    options: fastSearchOptions.value,
   },
   {
     prop: 'fastColumns',
@@ -441,12 +456,15 @@ const fields = ref([
     options: fastShowOptions.value,
   },
   {
-    prop: 'eee',
+    prop: 'dingPlan',
     label: '打卡在时限内',
     type: 'select',
     labelWidth: 104,
     colSpan: 6,
-    options: [],
+    options: [
+      { value: true, label: '是' },
+      { value: false, label: '否' },
+    ],
   },
   {
     prop: 'buttons',
@@ -462,7 +480,7 @@ const params = reactive({
   crmUserId: '',
   crmName: '',
   sopNo: '',
-  eee: '',
+  dingPlan: '',
   formWidgetMetadataViewList: cloneDeep(originColumns),
   formWidgetMetadataConditionList: [],
   formWidgetMetadataOrderList: [],

+ 28 - 4
src/views/sop/sop-manage/student-sop/index.vue

@@ -379,6 +379,21 @@ const getFastShowOptions = () => {
   });
 };
 getFastShowOptions();
+
+const fastSearchOptions = ref([]);
+const getFastSearchOptions = () => {
+  getSopFastOptionsApi({
+    type: 'CLOUD_MARK_SOP_FLOW',
+    contentType: 'SEARCH',
+  }).then((res) => {
+    fastSearchOptions.value = (res || []).map((item) => ({
+      ...item,
+      label: item.name,
+      value: item.id,
+    }));
+  });
+};
+getFastSearchOptions();
 const fields = computed(() => {
   return [
     {
@@ -438,7 +453,7 @@ const fields = computed(() => {
       type: 'select',
       labelWidth: 104,
       colSpan: 6,
-      options: [],
+      options: fastSearchOptions.value,
     },
     {
       prop: 'fastColumns',
@@ -447,14 +462,23 @@ const fields = computed(() => {
       labelWidth: 104,
       colSpan: 6,
       options: fastShowOptions.value,
+      attrs: {
+        onChange: (val) => {
+          let item = fastShowOptions.value.find((v) => v.id == val);
+          originColumns.value = JSON.parse(item.content);
+        },
+      },
     },
     {
-      prop: 'eee',
+      prop: 'dingPlan',
       label: '打卡在时限内',
       type: 'select',
       labelWidth: 104,
       colSpan: 6,
-      options: [],
+      options: [
+        { value: true, label: '是' },
+        { value: false, label: '否' },
+      ],
     },
     {
       prop: 'buttons',
@@ -471,7 +495,7 @@ const params = reactive({
   crmUserId: '',
   crmName: '',
   sopNo: '',
-  eee: '',
+  dingPlan: '',
   formWidgetMetadataViewList: cloneDeep(originColumns),
   formWidgetMetadataConditionList: [],
   formWidgetMetadataOrderList: [],