|
@@ -47,6 +47,7 @@
|
|
|
@confirm="filterConfirm"
|
|
|
type="OFFICE_SOP_FLOW"
|
|
|
contentType="SEARCH"
|
|
|
+ :fastDataList="fastDataList"
|
|
|
></select-filter>
|
|
|
</div>
|
|
|
<SearchForm :fields="fields" :params="params" :search="search">
|
|
@@ -72,13 +73,7 @@
|
|
|
></select-type-user>
|
|
|
</template>
|
|
|
<template #buttons>
|
|
|
- <!-- <t-space :size="16">
|
|
|
- <select-filter
|
|
|
- :metadata="formWidgetMetadataViewList"
|
|
|
- @confirm="filterConfirm"
|
|
|
- ></select-filter> -->
|
|
|
<t-button theme="primary" @click="search">搜索</t-button>
|
|
|
- <!-- </t-space> -->
|
|
|
</template>
|
|
|
</SearchForm>
|
|
|
|
|
@@ -232,7 +227,7 @@
|
|
|
</template>
|
|
|
|
|
|
<script setup name="OfficeSop">
|
|
|
-import { ref, reactive, computed, watch } from 'vue';
|
|
|
+import { ref, reactive, computed, watch, onMounted } from 'vue';
|
|
|
import useFetchTable from '@/hooks/useFetchTable';
|
|
|
import { sopListApi, sopBatchCancelApi, getSopFastOptionsApi } from '@/api/sop';
|
|
|
import { timestampFilter } from '@/utils/filter';
|
|
@@ -251,6 +246,7 @@ import { CUSTOMER_TYPE, FLOW_STATUS } from '@/config/constants';
|
|
|
import { dictToOptionList } from '@/utils/tool';
|
|
|
import DeviceManageNew from '@/components/common/device-manage-new';
|
|
|
import { omit } from 'lodash-es';
|
|
|
+import bus from '@/utils/bus';
|
|
|
const { perm } = usePermission();
|
|
|
|
|
|
const appStore = useAppStore();
|
|
@@ -354,7 +350,8 @@ const defaultTableColumns = [
|
|
|
// ];
|
|
|
originColumns.value = cloneDeep(defaultTableColumns);
|
|
|
const originFieldIds = computed(() => {
|
|
|
- return originColumns.value.map((item) => item.fieldId);
|
|
|
+ // return originColumns.value.map((item) => item.fieldId);
|
|
|
+ return defaultTableColumns.map((item) => item.fieldId);
|
|
|
});
|
|
|
const columns = computed(() => {
|
|
|
const defaultColumns = [
|
|
@@ -421,6 +418,12 @@ const getFastSearchOptions = () => {
|
|
|
});
|
|
|
};
|
|
|
getFastSearchOptions();
|
|
|
+onMounted(() => {
|
|
|
+ bus.on('updateFastVIEW', getFastShowOptions);
|
|
|
+ bus.on('updateFastSEARCH', getFastSearchOptions);
|
|
|
+});
|
|
|
+const fastDataList = ref([]);
|
|
|
+
|
|
|
const fields = computed(() => {
|
|
|
return [
|
|
|
{
|
|
@@ -482,6 +485,18 @@ const fields = computed(() => {
|
|
|
labelWidth: 104,
|
|
|
colSpan: 6,
|
|
|
options: fastSearchOptions.value,
|
|
|
+ attrs: {
|
|
|
+ onChange: (val) => {
|
|
|
+ let item = fastSearchOptions.value.find((v) => v.id == val);
|
|
|
+ let content = JSON.parse(item.content);
|
|
|
+ fastDataList.value = content.dataList;
|
|
|
+ params.formWidgetMetadataOperation =
|
|
|
+ content.formWidgetMetadataOperation;
|
|
|
+ // formWidgetMetadataViewList.value = content.metadataList;
|
|
|
+ originColumns.value = content.metadataList;
|
|
|
+ filterConfirm(content.dataList, content.formWidgetMetadataOperation);
|
|
|
+ },
|
|
|
+ },
|
|
|
},
|
|
|
{
|
|
|
prop: 'fastColumns',
|
|
@@ -490,6 +505,12 @@ 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: 'dingPlan',
|
|
@@ -606,7 +627,6 @@ const handleBatchCancel = () => {
|
|
|
);
|
|
|
if (!res) return;
|
|
|
MessagePlugin.success('操作成功');
|
|
|
- // refresh();
|
|
|
search();
|
|
|
},
|
|
|
});
|