d9e56607 by lxs

分类分级任务联调

1 parent 967a81c8
...@@ -254,26 +254,40 @@ export const getCgTaskDetail = (data) => request({ ...@@ -254,26 +254,40 @@ export const getCgTaskDetail = (data) => request({
254 }) 254 })
255 255
256 // 分来分级任务-新增 256 // 分来分级任务-新增
257 export const getCgTaskSave = (data) => request({ 257 export const cgTaskSave = (data) => request({
258 url: `${import.meta.env.VITE_APP_CHECK_BASEURL}/cg-task/save`, 258 url: `${import.meta.env.VITE_APP_CHECK_BASEURL}/cg-task/save`,
259 method: 'post', 259 method: 'post',
260 data 260 data
261 }) 261 })
262 262
263 // 分来分级任务-修改 263 // 分来分级任务-修改
264 export const getCgTaskUpdate = (data) => request({ 264 export const cgTaskUpdate = (data) => request({
265 url: `${import.meta.env.VITE_APP_CHECK_BASEURL}/cg-task/update`, 265 url: `${import.meta.env.VITE_APP_CHECK_BASEURL}/cg-task/update`,
266 method: 'put', 266 method: 'put',
267 data 267 data
268 }) 268 })
269 269
270 // 分来分级任务-删除 270 // 分来分级任务-删除
271 export const getCgTaskDelete = (data) => request({ 271 export const cgTaskDelete = (data) => request({
272 url: `${import.meta.env.VITE_APP_CHECK_BASEURL}/cg-task/delete`, 272 url: `${import.meta.env.VITE_APP_CHECK_BASEURL}/cg-task/delete`,
273 method: 'delete',
274 data
275 })
276
277 // 手动执行任务
278 export const runExecTask = (data) => request({
279 url: `${import.meta.env.VITE_APP_CHECK_BASEURL}/cg-task/exec-task`,
273 method: 'put', 280 method: 'put',
274 data 281 data
275 }) 282 })
276 283
284 // 分类分级任务日志
285 export const getTaskExecPageList = (data) => request({
286 url: `${import.meta.env.VITE_APP_CHECK_BASEURL}/cg-task-exec/page-list`,
287 method: 'post',
288 data
289 })
290
277 // 标签规则-分页 291 // 标签规则-分页
278 export const getCgLabelPageList = (data) => request({ 292 export const getCgLabelPageList = (data) => request({
279 url: `${import.meta.env.VITE_APP_CHECK_BASEURL}/cg-label/page-list`, 293 url: `${import.meta.env.VITE_APP_CHECK_BASEURL}/cg-label/page-list`,
...@@ -317,7 +331,7 @@ export const filterVal = (val, type) => { ...@@ -317,7 +331,7 @@ export const filterVal = (val, type) => {
317 status = '已确认'; 331 status = '已确认';
318 break; 332 break;
319 default: 333 default:
320 status = '草稿中'; 334 status = '--';
321 break; 335 break;
322 } 336 }
323 } 337 }
......
...@@ -86,7 +86,7 @@ export const getMetaDataBase = (params) => request({ ...@@ -86,7 +86,7 @@ export const getMetaDataBase = (params) => request({
86 }) 86 })
87 // 表分页查询 87 // 表分页查询
88 export const getMetaDataSheet = (params) => request({ 88 export const getMetaDataSheet = (params) => request({
89 url: `${import.meta.env.VITE_APP_PLAN_BASEURL}/meta-table/meta-table-detail-list`, 89 url: `${import.meta.env.VITE_APP_CHECK_BASEURL}/meta-table/meta-table-detail-list`,
90 method: 'post', 90 method: 'post',
91 data: params 91 data: params
92 }) 92 })
......
...@@ -54,6 +54,7 @@ const useUserStore = defineStore( ...@@ -54,6 +54,7 @@ const useUserStore = defineStore(
54 userName.value = res.data.userName 54 userName.value = res.data.userName
55 // userData.value = JSON.stringify(res.data.data); 55 // userData.value = JSON.stringify(res.data.data);
56 currentTenantGuid.value = res.data.tenantInfoList && res.data.tenantInfoList.length ? res.data.tenantInfoList[0].guid : ''; 56 currentTenantGuid.value = res.data.tenantInfoList && res.data.tenantInfoList.length ? res.data.tenantInfoList[0].guid : '';
57 localStorage.setItem('currentTenantGuid', currentTenantGuid.value);
57 let currentTenant = res.data.tenantInfoList?.[0]; 58 let currentTenant = res.data.tenantInfoList?.[0];
58 return getSystemMenu({ tenantGuid: currentTenantGuid.value }).then((info: any) => { 59 return getSystemMenu({ tenantGuid: currentTenantGuid.value }).then((info: any) => {
59 if (info.code == '00000') { 60 if (info.code == '00000') {
......
...@@ -9,7 +9,7 @@ import useUserStore from "@/store/modules/user"; ...@@ -9,7 +9,7 @@ import useUserStore from "@/store/modules/user";
9 import { ElMessage, ElMessageBox } from "element-plus"; 9 import { ElMessage, ElMessageBox } from "element-plus";
10 10
11 import useDataAssetStore from "@/store/modules/dataAsset"; 11 import useDataAssetStore from "@/store/modules/dataAsset";
12 import { filterVal, getCgTaskPageList, } from "@/api/modules/dataInventory"; 12 import { filterVal, getCgTaskPageList, cgTaskDelete, runExecTask } from "@/api/modules/dataInventory";
13 import { TableColumnWidth } from '@/utils/enum'; 13 import { TableColumnWidth } from '@/utils/enum';
14 14
15 import Table from "@/components/Table/index.vue"; 15 import Table from "@/components/Table/index.vue";
...@@ -46,7 +46,12 @@ const tableInfo = ref({ ...@@ -46,7 +46,12 @@ const tableInfo = ref({
46 }); 46 });
47 } 47 }
48 }, 48 },
49 { label: "元数据", field: "metaNames", width: 200 }, 49 {
50 label: "元数据", field: "metaNames", width: 200, getName: (scope) => {
51 const metaNames = scope.row.metaNames || [];
52 return metaNames.join(',');
53 }
54 },
50 { 55 {
51 label: "执行状态", field: "status", width: TableColumnWidth.STATE, align: 'center', type: "tag", getName: (scope) => { 56 label: "执行状态", field: "status", width: TableColumnWidth.STATE, align: 'center', type: "tag", getName: (scope) => {
52 return filterVal(scope.row.status, 'status'); 57 return filterVal(scope.row.status, 'status');
...@@ -73,19 +78,18 @@ const tableInfo = ref({ ...@@ -73,19 +78,18 @@ const tableInfo = ref({
73 actionInfo: { 78 actionInfo: {
74 label: "操作", 79 label: "操作",
75 type: "btn", 80 type: "btn",
76 width: 220, 81 width: 280,
77 btns: (scope) => { 82 btns: (scope) => {
78 let row = scope.row, btnArr: any = [ 83 let row = scope.row, btnArr: any = [
84 { label: "手动执行", value: "run" },
79 { label: "编辑", value: "edit" }, 85 { label: "编辑", value: "edit" },
80 { label: "日志", value: "log" }, 86 { label: "日志", value: "log" },
81 { label: "删除", value: "delete" } 87 { label: "删除", value: "delete" }
82 ]; 88 ];
83 if (row.status == 'Y') { 89 if (row.confirmStatus == 'Y') {
84 if (row.confirmStatus == 'Y') { 90 btnArr.splice(0, 0, { label: "结果修改", value: "modify" });
85 btnArr.splice(0, 0, { label: "结果修改", value: "modify" }); 91 } else {
86 } else { 92 btnArr.splice(0, 0, { label: "结果确认", value: "confirm", disabled: row.status != 'Y' });
87 btnArr.splice(0, 0, { label: "结果确认", value: "confirm" });
88 }
89 } 93 }
90 return btnArr; 94 return btnArr;
91 }, 95 },
...@@ -115,8 +119,25 @@ const tableBtnClick = (scope, btn) => { ...@@ -115,8 +119,25 @@ const tableBtnClick = (scope, btn) => {
115 const type = btn.value; 119 const type = btn.value;
116 const row = scope.row; 120 const row = scope.row;
117 currTableData.value = row; 121 currTableData.value = row;
118 if(type == 'confirm' || type == 'modify' || type == 'edit' || type == "log"){ 122 if (type == 'confirm' || type == 'modify' || type == 'edit' || type == "log") {
119 toPath(type); 123 toPath(type);
124 } else if (type == 'run') {
125 const guids = [currTableData.value.guid];
126 runExecTask(guids).then((res: any) => {
127 if (res.code == proxy.$passCode) {
128 getFirstPageData();
129 } else {
130 ElMessage({
131 type: "error",
132 message: res.msg,
133 });
134 }
135 }).catch((res) => {
136 ElMessage({
137 type: "error",
138 message: '请求失败',
139 });
140 });
120 } else if (type === "delete") { 141 } else if (type === "delete") {
121 open("此操作将永久删除,是否继续?", "warning"); 142 open("此操作将永久删除,是否继续?", "warning");
122 } 143 }
...@@ -130,21 +151,21 @@ const toPath = (type) => { ...@@ -130,21 +151,21 @@ const toPath = (type) => {
130 type 151 type
131 }, 152 },
132 }); 153 });
133 } else if(type == 'edit'){ 154 } else if (type == 'edit') {
134 router.push({ 155 router.push({
135 name: "taskEdit", 156 name: "taskEdit",
136 query: { 157 query: {
137 guid: currTableData.value.guid, 158 guid: currTableData.value.guid,
138 name: currTableData.value.damName, 159 name: currTableData.value.taskName,
139 type 160 type
140 }, 161 },
141 }); 162 });
142 } else if(type == 'confirm' || type == 'modify'){ 163 } else if (type == 'confirm' || type == 'modify') {
143 router.push({ 164 router.push({
144 name: "taskDetail", 165 name: "taskDetail",
145 query: { 166 query: {
146 guid: currTableData.value.guid, 167 guid: currTableData.value.guid,
147 name: currTableData.value.damName, 168 name: currTableData.value.taskName,
148 type 169 type
149 }, 170 },
150 }); 171 });
...@@ -153,7 +174,7 @@ const toPath = (type) => { ...@@ -153,7 +174,7 @@ const toPath = (type) => {
153 name: "taskLog", 174 name: "taskLog",
154 query: { 175 query: {
155 guid: currTableData.value.guid, 176 guid: currTableData.value.guid,
156 name: currTableData.value.damName, 177 name: currTableData.value.taskName,
157 type 178 type
158 }, 179 },
159 }); 180 });
...@@ -175,7 +196,7 @@ const open = (msg, type, isBatch = false) => { ...@@ -175,7 +196,7 @@ const open = (msg, type, isBatch = false) => {
175 type: type, 196 type: type,
176 }).then(() => { 197 }).then(() => {
177 const guids = [currTableData.value.guid]; 198 const guids = [currTableData.value.guid];
178 listingDelete(guids).then((res: any) => { 199 cgTaskDelete(guids).then((res: any) => {
179 if (res.code == proxy.$passCode) { 200 if (res.code == proxy.$passCode) {
180 getFirstPageData(); 201 getFirstPageData();
181 ElMessage({ 202 ElMessage({
...@@ -200,24 +221,22 @@ const getFirstPageData = () => { ...@@ -200,24 +221,22 @@ const getFirstPageData = () => {
200 getTableData(); 221 getTableData();
201 } 222 }
202 223
203 // onActivated(() => { 224 onActivated(() => {
204 // if (assetStore.isRefresh) {//如果是首次加载,则不需要调用 225 // if (assetStore.isRefresh) {//如果是首次加载,则不需要调用
205 // getFirstPageData(); 226 // getFirstPageData();
206 // assetStore.set(false); 227 // assetStore.set(false);
207 // } 228 // }
208 // }) 229 getFirstPageData()
230 })
209 231
210 onBeforeMount(() => { 232 onBeforeMount(() => {
211 getFirstPageData() 233
212 }) 234 })
213 235
214 </script> 236 </script>
215 237
216 <template> 238 <template>
217 <div class="container_wrap" v-if="tableInfo.data.length"> 239 <div class="container_wrap" v-if="tableInfo.data.length">
218 <div class="table_tool_wrap">
219 <div class="table_title">分类分级任务</div>
220 </div>
221 <div class="table_panel_wrap"> 240 <div class="table_panel_wrap">
222 <Table :tableInfo="tableInfo" @tableBtnClick="tableBtnClick" @tablePageChange="tablePageChange" /> 241 <Table :tableInfo="tableInfo" @tableBtnClick="tableBtnClick" @tablePageChange="tablePageChange" />
223 </div> 242 </div>
...@@ -225,7 +244,7 @@ onBeforeMount(() => { ...@@ -225,7 +244,7 @@ onBeforeMount(() => {
225 <div class="container_wrap" v-else> 244 <div class="container_wrap" v-else>
226 <div class="card-noData"> 245 <div class="card-noData">
227 <img src="@/assets/images/no-data.png" :style="{ width: '96px', height: '96px' }" /> 246 <img src="@/assets/images/no-data.png" :style="{ width: '96px', height: '96px' }" />
228 <p>暂无分类分级任务,<span class="text_btn" @click="toPath('add')">去新建</span></p> 247 <p>暂无日志记录</p>
229 </div> 248 </div>
230 </div> 249 </div>
231 </template> 250 </template>
...@@ -247,7 +266,7 @@ onBeforeMount(() => { ...@@ -247,7 +266,7 @@ onBeforeMount(() => {
247 266
248 .table_panel_wrap { 267 .table_panel_wrap {
249 width: 100%; 268 width: 100%;
250 height: calc(100% - 40px); 269 height: 100%;
251 padding: 0px 8px 0; 270 padding: 0px 8px 0;
252 } 271 }
253 272
......
...@@ -9,16 +9,18 @@ import useUserStore from "@/store/modules/user"; ...@@ -9,16 +9,18 @@ import useUserStore from "@/store/modules/user";
9 import { ElMessage, ElMessageBox } from "element-plus"; 9 import { ElMessage, ElMessageBox } from "element-plus";
10 import { Search } from "@element-plus/icons-vue"; 10 import { Search } from "@element-plus/icons-vue";
11 import useDataAssetStore from "@/store/modules/dataAsset"; 11 import useDataAssetStore from "@/store/modules/dataAsset";
12 import { getClassifyGradList, getClassifyTreeList, getCgLabelPageList, getMetaTableCollectList, } from "@/api/modules/dataInventory"; 12 import { getCgTaskDetail, getClassifyGradList, getClassifyTreeList, getCgLabelPageList, getMetaTableCollectList, cgTaskSave, cgTaskUpdate } from "@/api/modules/dataInventory";
13 13
14 const { proxy } = getCurrentInstance() as any; 14 const { proxy } = getCurrentInstance() as any;
15 const router = useRouter(); 15 const router = useRouter();
16 const route = useRoute();
16 const userStore = useUserStore(); 17 const userStore = useUserStore();
17 const userData = JSON.parse(userStore.userData); 18 const userData = JSON.parse(userStore.userData);
18 const assetStore = useDataAssetStore(); 19 const assetStore = useDataAssetStore();
19 20
20 const step = ref(0); 21 const step = ref(0);
21 const selectIndex = ref(0); 22 const selectIndex = ref(0);
23 const taskDetail = ref({});
22 const asideSearchInput = ref(""); 24 const asideSearchInput = ref("");
23 const permissionList: any = ref([]) 25 const permissionList: any = ref([])
24 const listLoading = ref(false) 26 const listLoading = ref(false)
...@@ -29,12 +31,12 @@ const listPage = ref({ ...@@ -29,12 +31,12 @@ const listPage = ref({
29 }) 31 })
30 const currpermissionList: any = ref([]) 32 const currpermissionList: any = ref([])
31 const templateInfo = ref({}) 33 const templateInfo = ref({})
32 const treeIndex: any = ref({}) 34 const treeInfoRef = ref();
33
34 const treeInfo = ref({ 35 const treeInfo = ref({
35 id: "data-pickup-tree", 36 id: "data-pickup-tree",
36 filter: true, 37 filter: true,
37 queryValue: "", 38 queryValue: "",
39 loading: false,
38 queryPlaceholder: "请输入分类名称搜索", 40 queryPlaceholder: "请输入分类名称搜索",
39 props: { 41 props: {
40 label: "classifyName", 42 label: "classifyName",
...@@ -49,6 +51,7 @@ const treeInfo = ref({ ...@@ -49,6 +51,7 @@ const treeInfo = ref({
49 const expand1 = ref(true) 51 const expand1 = ref(true)
50 const expand2 = ref(true) 52 const expand2 = ref(true)
51 53
54 const taskFormRef = ref();
52 const taskFormItems: any = ref([ 55 const taskFormItems: any = ref([
53 { 56 {
54 label: '任务名称', 57 label: '任务名称',
...@@ -63,7 +66,7 @@ const taskFormItems: any = ref([ ...@@ -63,7 +66,7 @@ const taskFormItems: any = ref([
63 label: '分级分类目录名称', 66 label: '分级分类目录名称',
64 type: 'input', 67 type: 'input',
65 placeholder: '请输入', 68 placeholder: '请输入',
66 field: 'catalogName', 69 field: 'cgDirName',
67 default: '', 70 default: '',
68 maxlength: 50, 71 maxlength: 50,
69 required: true 72 required: true
...@@ -74,7 +77,7 @@ const taskFormRules = ref({ ...@@ -74,7 +77,7 @@ const taskFormRules = ref({
74 taskName: [ 77 taskName: [
75 { required: true, trigger: 'blur', message: "请填写任务名称" } 78 { required: true, trigger: 'blur', message: "请填写任务名称" }
76 ], 79 ],
77 catalogName: [ 80 cgDirName: [
78 { required: true, trigger: 'blur', message: "请填写分级分类目录名称" } 81 { required: true, trigger: 'blur', message: "请填写分级分类目录名称" }
79 ], 82 ],
80 }); 83 });
...@@ -95,13 +98,18 @@ const searchItemValue: any = ref({ ...@@ -95,13 +98,18 @@ const searchItemValue: any = ref({
95 detailGuid: '' 98 detailGuid: ''
96 }); 99 });
97 const currTableData: any = ref({}); 100 const currTableData: any = ref({});
98 101 const selectRowData = ref([])
99 const tableInfo = ref({ 102 const tableInfo = ref({
100 id: "mapping-table", 103 id: "mapping-table",
101 fields: [ 104 fields: [
102 { label: "序号", type: "index", width: 56, align: "center", fixed: "left" }, 105 { label: "序号", type: "index", width: 56, align: "center", fixed: "left" },
103 { label: "标签", field: "label", width: 96 }, 106 { label: "标签", field: "label", width: 96 },
104 { label: "分类", field: "classifyDetailName", width: 380 }, 107 {
108 label: "分类", field: "classifyNames", width: 380, getName: (scope) => {
109 const names = scope.row.classifyNames || [];
110 return names.join('/');
111 }
112 },
105 { label: "分级", field: "gradeDetailName", width: 55 }, 113 { label: "分级", field: "gradeDetailName", width: 55 },
106 { label: "规则", field: "rule", width: 380 }, 114 { label: "规则", field: "rule", width: 380 },
107 ], 115 ],
...@@ -117,31 +125,45 @@ const tableInfo = ref({ ...@@ -117,31 +125,45 @@ const tableInfo = ref({
117 }, 125 },
118 }); 126 });
119 127
128 const metadataTableRef = ref();
120 const metadataTableInfo = ref({ 129 const metadataTableInfo = ref({
121 id: "metadata-table", 130 id: "metadata-table",
122 multiple: true, 131 multiple: true,
123 rowKey: 'guid', 132 rowKey: 'guid',
124 fields: [ 133 fields: [
125 { label: "序号", type: "index", width: 56, align: "center", fixed: "left" }, 134 { label: "序号", type: "index", width: 56, align: "center", fixed: "left" },
126 { label: "数据库名称", field: "damCode", width: 200 }, 135 { label: "数据库名称", field: "databaseNameZh", width: 200 },
127 { label: "数据库名", field: "damTypeName", width: 200 }, 136 { label: "数据库名", field: "databaseName", width: 200 },
128 { label: "总表数", field: "damName", width: 120, align: "right" }, 137 { label: "总表数", field: "tableCount", width: 120, align: "right" },
129 { label: "存储量(约/MB)", field: "damTypeName", width: 200, align: "right" }, 138 { label: "存储量(约/MB)", field: "storageCapacities", width: 200, align: "right" },
130 ], 139 ],
131 loading: false, 140 loading: false,
132 data: [], 141 data: [],
133 page: { 142 showPage: false,
134 type: "normal", 143 // page: {
135 rows: 0, 144 // type: "normal",
136 ...page.value, 145 // rows: 0,
137 }, 146 // ...page.value,
147 // },
138 actionInfo: { 148 actionInfo: {
139 show: false 149 show: false
140 }, 150 },
141 }) 151 })
142 152
153 const getTaskDetail = (data) => {
154 getCgTaskDetail(data).then((res: any) => {
155 const data = res.data || {};
156 taskDetail.value = data;
157 taskFormItems.value.map((item) => {
158 item.default = data[item.field] || '';
159 })
160 selectRowData.value = data.metaGuids || [];
161 getPermissionList({});
162 getMetaTableData();
163 })
164 }
165
143 const nodeClick = (data) => { 166 const nodeClick = (data) => {
144 treeIndex.value = data
145 searchItemValue.value.classifyGuid = templateInfo.value.guid; 167 searchItemValue.value.classifyGuid = templateInfo.value.guid;
146 searchItemValue.value.detailGuid = data.guid; 168 searchItemValue.value.detailGuid = data.guid;
147 getTableData(); 169 getTableData();
...@@ -167,17 +189,6 @@ const getTableData = () => { ...@@ -167,17 +189,6 @@ const getTableData = () => {
167 }); 189 });
168 }; 190 };
169 191
170 const tableBtnClick = (scope, btn) => {
171 const type = btn.value;
172 const row = scope.row;
173 currTableData.value = row;
174 if (type == "detail" || type === "edit") {
175 toPath(type);
176 } else if (type === "delete") {
177 open("此操作将永久删除,是否继续?", "warning");
178 }
179 };
180
181 const toPath = (type = null) => { 192 const toPath = (type = null) => {
182 router.push({ 193 router.push({
183 name: "taskConfig", 194 name: "taskConfig",
...@@ -187,21 +198,38 @@ const toPath = (type = null) => { ...@@ -187,21 +198,38 @@ const toPath = (type = null) => {
187 }); 198 });
188 } 199 }
189 200
201 const tableSelectionChange = (val) => {
202 selectRowData.value = val.map((item) => item.databaseGuid);
203 };
204
190 const tablePageChange = (info) => { 205 const tablePageChange = (info) => {
191 page.value.curr = Number(info.curr); 206 if (step.value == 0) {
192 page.value.limit = Number(info.limit); 207 page.value.curr = Number(info.curr);
193 tableInfo.value.page.limit = page.value.limit; 208 page.value.limit = Number(info.limit);
194 tableInfo.value.page.curr = page.value.curr; 209 tableInfo.value.page.limit = page.value.limit;
195 getTableData(); 210 tableInfo.value.page.curr = page.value.curr;
211 getTableData();
212 } else {
213
214 }
196 }; 215 };
197 216
217 // 获取元数据表格
198 const getMetaTableData = () => { 218 const getMetaTableData = () => {
199 getMetaTableCollectList({}).then((res: any) => { 219 getMetaTableCollectList({}).then((res: any) => {
200 metadataTableInfo.value.loading = false; 220 metadataTableInfo.value.loading = false;
201 metadataTableInfo.value.data = res.data.records || []; 221 const data = res.data.records || [];
202 metadataTableInfo.value.page.curr = res.data.pageIndex; 222 metadataTableInfo.value.data = data;
203 metadataTableInfo.value.page.limit = res.data.pageSize; 223 // metadataTableInfo.value.page.curr = res.data.pageIndex;
204 metadataTableInfo.value.page.rows = res.data.totalRows; 224 // metadataTableInfo.value.page.limit = res.data.pageSize;
225 // metadataTableInfo.value.page.rows = res.data.totalRows;
226 if (route.query.type === 'edit') {
227 nextTick(() => {
228 data.map((row) => {
229 taskDetail.value.metaGuids.indexOf(row.guid) > -1 && metadataTableRef.value.tableRef.toggleRowSelection(row, true);
230 });
231 })
232 }
205 }) 233 })
206 } 234 }
207 235
...@@ -220,11 +248,73 @@ const btnClick = async (btn, bType = null) => { ...@@ -220,11 +248,73 @@ const btnClick = async (btn, bType = null) => {
220 step.value++; 248 step.value++;
221 } else if (type == 'prev') { 249 } else if (type == 'prev') {
222 step.value--; 250 step.value--;
251 } else if (type == 'path') {
252 if (selectRowData.value.length == 0) {
253 ElMessage({
254 type: 'warning',
255 message: '请选择元数据'
256 })
257 return
258 }
259 const formEl = taskFormRef.value.ruleFormRef;
260 const form = taskFormRef.value.formInline;
261 const subForm = { ...form };
262 submitForm(formEl, subForm);
223 } else { 263 } else {
224 toPath() 264 toPath()
225 } 265 }
226 }; 266 };
227 267
268 const submitForm = (formEl, info) => {
269 if (!formEl) return;
270 formEl.validate((valid, fields) => {
271 if (valid) {
272 const params = {
273 classifyGuid: templateInfo.value.guid,
274 metaGuids: selectRowData.value,
275 ...info
276 }
277 if (route.query.type === 'edit') {
278 params.guid = taskDetail.value.guid;
279 params.execGuid = taskDetail.value.execGuid;
280 cgTaskUpdate(params).then((res: any) => {
281 if (res.code == proxy.$passCode) {
282 toPath()
283 } else {
284 ElMessage({
285 type: "error",
286 message: res.msg,
287 });
288 }
289 }).catch(() => {
290 ElMessage({
291 type: "error",
292 message: '请求失败',
293 });
294 })
295 } else {
296 cgTaskSave(params).then((res: any) => {
297 if (res.code == proxy.$passCode) {
298 toPath()
299 } else {
300 ElMessage({
301 type: "error",
302 message: res.msg,
303 });
304 }
305 }).catch(() => {
306 ElMessage({
307 type: "error",
308 message: '请求失败',
309 });
310 })
311 }
312 } else {
313 console.log("error submit!", fields);
314 }
315 });
316 };
317
228 // 监听滚动事件 318 // 监听滚动事件
229 const handleScroll = () => { 319 const handleScroll = () => {
230 if (listPage.value.curr < listPage.value.totalPages) { 320 if (listPage.value.curr < listPage.value.totalPages) {
...@@ -258,7 +348,11 @@ const getPermissionList = (val, init = false) => { ...@@ -258,7 +348,11 @@ const getPermissionList = (val, init = false) => {
258 querySearch(asideSearchInput.value) 348 querySearch(asideSearchInput.value)
259 } 349 }
260 if (data.length) { 350 if (data.length) {
261 templateInfo.value = data[0]; 351 if (route.query.type == 'edit') {
352 templateInfo.value = data.filter(item => item.guid == taskDetail.value.classifyGuid)[0]
353 } else {
354 templateInfo.value = data[0];
355 }
262 getClassifyTree() 356 getClassifyTree()
263 } 357 }
264 } 358 }
...@@ -273,17 +367,27 @@ const getClassifyTree = () => { ...@@ -273,17 +367,27 @@ const getClassifyTree = () => {
273 const params = { 367 const params = {
274 guid: templateInfo.value.guid 368 guid: templateInfo.value.guid
275 } 369 }
370 treeInfo.value.loading = true;
276 getClassifyTreeList(params).then((res: any) => { 371 getClassifyTreeList(params).then((res: any) => {
277 if (res.code == proxy.$passCode) { 372 if (res.code == proxy.$passCode) {
278 const data = res.data || []; 373 const data = res.data || [];
279 treeInfo.value.data = data; 374 treeInfo.value.data = data;
375 treeInfoRef.value.setCurrentKey('');
376 tableInfo.value.data = [];
280 } 377 }
378 treeInfo.value.loading = false;
379 }).catch(() => {
380 treeInfo.value.loading = false;
281 }) 381 })
282 } 382 }
283 383
284 onActivated(() => { 384 onActivated(() => {
285 getPermissionList({}); 385 if (route.query.type == 'edit') {
286 getMetaTableData(); 386 getTaskDetail({ guid: route.query.guid })
387 } else {
388 getPermissionList({});
389 getMetaTableData();
390 }
287 }) 391 })
288 392
289 onBeforeMount(() => { 393 onBeforeMount(() => {
...@@ -323,17 +427,17 @@ onBeforeMount(() => { ...@@ -323,17 +427,17 @@ onBeforeMount(() => {
323 </div> 427 </div>
324 <div class="panel_content"> 428 <div class="panel_content">
325 <div class="box_left"> 429 <div class="box_left">
326 <Tree :treeInfo="treeInfo" @nodeClick="nodeClick" /> 430 <Tree ref="treeInfoRef" :treeInfo="treeInfo" @nodeClick="nodeClick" />
327 </div> 431 </div>
328 <div class="box_right"> 432 <div class="box_right">
329 <div class="table_panel_wrap"> 433 <div class="table_panel_wrap">
330 <Table :tableInfo="tableInfo" @tableBtnClick="tableBtnClick" @tablePageChange="tablePageChange" /> 434 <Table :tableInfo="tableInfo" @tablePageChange="tablePageChange" />
331 </div> 435 </div>
332 </div> 436 </div>
333 </div> 437 </div>
334 </div> 438 </div>
335 <div class="content_main panel" v-show="step == 1"> 439 <div class="content_main panel" v-show="step == 1">
336 <ContentWrap id="id-approveInfo" title="创建任务" expandSwicth style="margin-top: 15px" :isExpand="expand1" 440 <ContentWrap title="创建任务" expandSwicth style="margin-top: 15px" :isExpand="expand1"
337 @expand="(v) => expand1 = v"> 441 @expand="(v) => expand1 = v">
338 <div class="form_panel"> 442 <div class="form_panel">
339 <Form ref="taskFormRef" formId="edit-standard-form" :itemList="taskFormItems" :rules="taskFormRules" 443 <Form ref="taskFormRef" formId="edit-standard-form" :itemList="taskFormItems" :rules="taskFormRules"
...@@ -342,7 +446,9 @@ onBeforeMount(() => { ...@@ -342,7 +446,9 @@ onBeforeMount(() => {
342 </ContentWrap> 446 </ContentWrap>
343 <ContentWrap id="id-approveInfo" title="选择元数据" expandSwicth style="margin-top: 15px" :isExpand="expand2" 447 <ContentWrap id="id-approveInfo" title="选择元数据" expandSwicth style="margin-top: 15px" :isExpand="expand2"
344 @expand="(v) => expand2 = v"> 448 @expand="(v) => expand2 = v">
345 <Table :tableInfo="metadataTableInfo" /> 449 <div class="table_panel_wrap full">
450 <Table ref="metadataTableRef" :tableInfo="metadataTableInfo" @tableSelectionChange="tableSelectionChange" />
451 </div>
346 </ContentWrap> 452 </ContentWrap>
347 </div> 453 </div>
348 <div class="tool_btns"> 454 <div class="tool_btns">
...@@ -466,7 +572,6 @@ onBeforeMount(() => { ...@@ -466,7 +572,6 @@ onBeforeMount(() => {
466 .box_left { 572 .box_left {
467 width: 240px; 573 width: 240px;
468 height: 100%; 574 height: 100%;
469 padding-top: 12px;
470 border-right: 1px solid #d9d9d9; 575 border-right: 1px solid #d9d9d9;
471 576
472 .aside_title { 577 .aside_title {
...@@ -479,13 +584,13 @@ onBeforeMount(() => { ...@@ -479,13 +584,13 @@ onBeforeMount(() => {
479 } 584 }
480 585
481 .tree_panel { 586 .tree_panel {
482 padding: 0; 587 height: 100%;
483 } 588 }
484 } 589 }
485 590
486 .box_right { 591 .box_right {
487 width: 100%; 592 width: calc(100% - 240px);
488 padding-top: 12px; 593 padding-top: 8px;
489 594
490 .el-breadcrumb { 595 .el-breadcrumb {
491 padding: 0 12px; 596 padding: 0 12px;
...@@ -494,10 +599,26 @@ onBeforeMount(() => { ...@@ -494,10 +599,26 @@ onBeforeMount(() => {
494 } 599 }
495 } 600 }
496 601
602 :deep(#id-approveInfo) {
603 height: calc(100% - 192px);
604
605 .el-card__body {
606 height: calc(100% - 50px) !important;
607
608 .card-body-content {
609 height: 100%;
610 }
611 }
612 }
613
497 .table_panel_wrap { 614 .table_panel_wrap {
498 width: 100%; 615 width: 100%;
499 height: 100%; 616 height: 100%;
500 padding: 0 12px; 617 padding: 0 12px;
618
619 &.full {
620 padding: 0;
621 }
501 } 622 }
502 } 623 }
503 624
......
...@@ -9,328 +9,17 @@ import useUserStore from "@/store/modules/user"; ...@@ -9,328 +9,17 @@ import useUserStore from "@/store/modules/user";
9 import { ElMessage, ElMessageBox } from "element-plus"; 9 import { ElMessage, ElMessageBox } from "element-plus";
10 10
11 import useDataAssetStore from "@/store/modules/dataAsset"; 11 import useDataAssetStore from "@/store/modules/dataAsset";
12 import { getListingList, listingDelete, listingUpdateStatus, filterVal, getParamsDataList } from "@/api/modules/dataProduct"; 12 import { getTaskExecPageList, filterVal } from "@/api/modules/dataInventory";
13 import { TableColumnWidth } from '@/utils/enum'; 13 import { TableColumnWidth } from '@/utils/enum';
14 14
15 import Table from "@/components/Table/index.vue"; 15 import Table from "@/components/Table/index.vue";
16 16
17 const { proxy } = getCurrentInstance() as any; 17 const { proxy } = getCurrentInstance() as any;
18 const router = useRouter(); 18 const router = useRouter();
19 const route = useRoute();
19 const userStore = useUserStore(); 20 const userStore = useUserStore();
20 const userData = JSON.parse(userStore.userData); 21 const userData = JSON.parse(userStore.userData);
21 const assetStore = useDataAssetStore(); 22 const assetStore = useDataAssetStore();
22 const datas = [
23 {
24 "updateTime": "2024-07-16 13:17:00",
25 "updateUserName": "数往知来管理员",
26 "guid": "4e0e76c48fa043d5b35d09f3ccc7c265",
27 "approvalGuid": null,
28 "standardSetGuid": "58d1178a04904d599284fc1e61594c43",
29 "fieldStandardCode": "COL202406070021",
30 "dataVersion": 1,
31 "chName": "地址",
32 "enName": "address",
33 "dataTypeValue": "字符型",
34 "dataTypeCode": "varchar",
35 "dataDicGuid": "",
36 "dataDicName": null,
37 "isDataDic": "N",
38 "fieldLength": 600,
39 "fieldPrecision": null,
40 "dataState": 0,
41 "approveState": "N",
42 "dataCategory": "合伙人",
43 "dataEncryptionLevel": "界面加密",
44 "businessDefDesc": "地址",
45 "flowFlag": null,
46 "flowCode": null,
47 "functionCode": null,
48 "createStaffGuid": null,
49 "createUserId": "98df01b8d86c46f786dd10b4d0eb11dd",
50 "displayVersion": "V1",
51 "standardSetName": null,
52 "ruleType": null
53 },
54 {
55 "updateTime": "2024-01-27 10:19:45",
56 "updateUserName": "数往知来管理员",
57 "guid": "bc630207357c466dbff7613ea38985cc",
58 "approvalGuid": null,
59 "standardSetGuid": "58d1178a04904d599284fc1e61594c43",
60 "fieldStandardCode": "COL202401260124",
61 "dataVersion": 1,
62 "chName": "包含最小销售包装单元数量",
63 "enName": "inboxQuantity",
64 "dataTypeValue": "整型",
65 "dataTypeCode": "int",
66 "dataDicGuid": null,
67 "dataDicName": null,
68 "isDataDic": null,
69 "fieldLength": null,
70 "fieldPrecision": null,
71 "dataState": 1,
72 "approveState": "A",
73 "dataCategory": null,
74 "dataEncryptionLevel": "明文显示",
75 "businessDefDesc": "当前药品追溯码中包含的最小销售包装单元药品追溯码的数量,发货类型为03时可选",
76 "flowFlag": null,
77 "flowCode": null,
78 "functionCode": null,
79 "createStaffGuid": null,
80 "createUserId": "98df01b8d86c46f786dd10b4d0eb11dd",
81 "displayVersion": "V1",
82 "standardSetName": null,
83 "ruleType": null
84 },
85 {
86 "updateTime": "2024-01-27 11:03:59",
87 "updateUserName": "审批人4",
88 "guid": "420f2a68bd4441bf92010eadf698b685",
89 "approvalGuid": null,
90 "standardSetGuid": "58d1178a04904d599284fc1e61594c43",
91 "fieldStandardCode": "COL202401260122",
92 "dataVersion": 1,
93 "chName": "包装层级",
94 "enName": "packageLevel",
95 "dataTypeValue": "字符型",
96 "dataTypeCode": "varchar",
97 "dataDicGuid": null,
98 "dataDicName": null,
99 "isDataDic": null,
100 "fieldLength": 200,
101 "fieldPrecision": null,
102 "dataState": 1,
103 "approveState": "A",
104 "dataCategory": null,
105 "dataEncryptionLevel": "明文显示",
106 "businessDefDesc": "当前药品追溯码所处包装层级描述,发货类型为03时可选",
107 "flowFlag": null,
108 "flowCode": null,
109 "functionCode": null,
110 "createStaffGuid": null,
111 "createUserId": "98df01b8d86c46f786dd10b4d0eb11dd",
112 "displayVersion": "V1",
113 "standardSetName": null,
114 "ruleType": null
115 },
116 {
117 "updateTime": "2024-06-06 10:01:06",
118 "updateUserName": "审批人1",
119 "guid": "f841e1848ab94b1e81a0217a09a7a3d3",
120 "approvalGuid": "b674bffe8d2f4132918016b6baaf75aa",
121 "standardSetGuid": "58d1178a04904d599284fc1e61594c43",
122 "fieldStandardCode": "COL202401260120",
123 "dataVersion": 1,
124 "chName": "上一级包装药品追溯码",
125 "enName": "parentDTC",
126 "dataTypeValue": "字符型",
127 "dataTypeCode": "varchar",
128 "dataDicGuid": "",
129 "dataDicName": null,
130 "isDataDic": "N",
131 "fieldLength": 200,
132 "fieldPrecision": null,
133 "dataState": 1,
134 "approveState": "Y",
135 "dataCategory": "",
136 "dataEncryptionLevel": "明文显示",
137 "businessDefDesc": "当前药品追溯码大一级包装上的药品追溯码,发货类型为03时可选;当存在上一级包装时必选",
138 "flowFlag": null,
139 "flowCode": null,
140 "functionCode": null,
141 "createStaffGuid": null,
142 "createUserId": "98df01b8d86c46f786dd10b4d0eb11dd",
143 "displayVersion": "V1",
144 "standardSetName": null,
145 "ruleType": null
146 },
147 {
148 "updateTime": "2024-01-26 00:10:47",
149 "updateUserName": "数往知来管理员",
150 "guid": "d4d42dea2a5844b4a7f9238806ea507b",
151 "approvalGuid": null,
152 "standardSetGuid": "58d1178a04904d599284fc1e61594c43",
153 "fieldStandardCode": "COL202401260118",
154 "dataVersion": 1,
155 "chName": "药品追溯码",
156 "enName": "DTC",
157 "dataTypeValue": "字符型",
158 "dataTypeCode": "varchar",
159 "dataDicGuid": null,
160 "dataDicName": null,
161 "isDataDic": null,
162 "fieldLength": 200,
163 "fieldPrecision": null,
164 "dataState": 0,
165 "approveState": "N",
166 "dataCategory": null,
167 "dataEncryptionLevel": "明文显示",
168 "businessDefDesc": "用于唯一标识药品各级销售包装单元的代码,发货类型为03时可选",
169 "flowFlag": null,
170 "flowCode": null,
171 "functionCode": null,
172 "createStaffGuid": null,
173 "createUserId": "98df01b8d86c46f786dd10b4d0eb11dd",
174 "displayVersion": "V1",
175 "standardSetName": null,
176 "ruleType": null
177 },
178 {
179 "updateTime": "2024-01-26 00:10:47",
180 "updateUserName": "数往知来管理员",
181 "guid": "ff9d0e4f6fbb444c8dcf6f67bffcb659",
182 "approvalGuid": null,
183 "standardSetGuid": "58d1178a04904d599284fc1e61594c43",
184 "fieldStandardCode": "COL202401260116",
185 "dataVersion": 1,
186 "chName": "发货数量",
187 "enName": "deliveryQuantity",
188 "dataTypeValue": "整型",
189 "dataTypeCode": "int",
190 "dataDicGuid": null,
191 "dataDicName": null,
192 "isDataDic": null,
193 "fieldLength": null,
194 "fieldPrecision": null,
195 "dataState": 0,
196 "approveState": "N",
197 "dataCategory": null,
198 "dataEncryptionLevel": "明文显示",
199 "businessDefDesc": "发货的最小销售包装单元数量",
200 "flowFlag": null,
201 "flowCode": null,
202 "functionCode": null,
203 "createStaffGuid": null,
204 "createUserId": "98df01b8d86c46f786dd10b4d0eb11dd",
205 "displayVersion": "V1",
206 "standardSetName": null,
207 "ruleType": null
208 },
209 {
210 "updateTime": "2024-01-26 00:10:46",
211 "updateUserName": "数往知来管理员",
212 "guid": "fe88ac9e8d9c4f148833dbb3976fca77",
213 "approvalGuid": null,
214 "standardSetGuid": "58d1178a04904d599284fc1e61594c43",
215 "fieldStandardCode": "COL202401260114",
216 "dataVersion": 1,
217 "chName": "药品生产批号",
218 "enName": "batch",
219 "dataTypeValue": "字符型",
220 "dataTypeCode": "varchar",
221 "dataDicGuid": null,
222 "dataDicName": null,
223 "isDataDic": null,
224 "fieldLength": 20,
225 "fieldPrecision": null,
226 "dataState": 0,
227 "approveState": "N",
228 "dataCategory": null,
229 "dataEncryptionLevel": "明文显示",
230 "businessDefDesc": "药品包装上标示的生产批号",
231 "flowFlag": null,
232 "flowCode": null,
233 "functionCode": null,
234 "createStaffGuid": null,
235 "createUserId": "98df01b8d86c46f786dd10b4d0eb11dd",
236 "displayVersion": "V1",
237 "standardSetName": null,
238 "ruleType": null
239 },
240 {
241 "updateTime": "2024-01-26 00:10:45",
242 "updateUserName": "数往知来管理员",
243 "guid": "9759837e0d72472ab7441c1873c9159a",
244 "approvalGuid": null,
245 "standardSetGuid": "58d1178a04904d599284fc1e61594c43",
246 "fieldStandardCode": "COL202401260112",
247 "dataVersion": 1,
248 "chName": "药品有效期截止日期",
249 "enName": "expirationDate",
250 "dataTypeValue": "日期型",
251 "dataTypeCode": "date",
252 "dataDicGuid": null,
253 "dataDicName": null,
254 "isDataDic": null,
255 "fieldLength": null,
256 "fieldPrecision": null,
257 "dataState": 0,
258 "approveState": "N",
259 "dataCategory": null,
260 "dataEncryptionLevel": "明文显示",
261 "businessDefDesc": "药品有效期的截止日期",
262 "flowFlag": null,
263 "flowCode": null,
264 "functionCode": null,
265 "createStaffGuid": null,
266 "createUserId": "98df01b8d86c46f786dd10b4d0eb11dd",
267 "displayVersion": "V1",
268 "standardSetName": null,
269 "ruleType": null
270 },
271 {
272 "updateTime": "2024-01-26 00:10:45",
273 "updateUserName": "数往知来管理员",
274 "guid": "a39ed6123c6a420d9d1265315e714f86",
275 "approvalGuid": null,
276 "standardSetGuid": "58d1178a04904d599284fc1e61594c43",
277 "fieldStandardCode": "COL202401260110",
278 "dataVersion": 1,
279 "chName": "药品生产日期",
280 "enName": "productionDate",
281 "dataTypeValue": "日期型",
282 "dataTypeCode": "date",
283 "dataDicGuid": null,
284 "dataDicName": null,
285 "isDataDic": null,
286 "fieldLength": null,
287 "fieldPrecision": null,
288 "dataState": 0,
289 "approveState": "N",
290 "dataCategory": null,
291 "dataEncryptionLevel": "明文显示",
292 "businessDefDesc": "药品包装上标示的生产日期",
293 "flowFlag": null,
294 "flowCode": null,
295 "functionCode": null,
296 "createStaffGuid": null,
297 "createUserId": "98df01b8d86c46f786dd10b4d0eb11dd",
298 "displayVersion": "V1",
299 "standardSetName": null,
300 "ruleType": null
301 },
302 {
303 "updateTime": "2024-01-26 00:10:45",
304 "updateUserName": "数往知来管理员",
305 "guid": "ea597c1b8bb24a5ab053a80b084de98c",
306 "approvalGuid": null,
307 "standardSetGuid": "58d1178a04904d599284fc1e61594c43",
308 "fieldStandardCode": "COL202401260108",
309 "dataVersion": 1,
310 "chName": "统一社会信用代码(进口药品代理企业)",
311 "enName": "drugImporterUSCID",
312 "dataTypeValue": "字符型",
313 "dataTypeCode": "varchar",
314 "dataDicGuid": null,
315 "dataDicName": null,
316 "isDataDic": null,
317 "fieldLength": 18,
318 "fieldPrecision": null,
319 "dataState": 0,
320 "approveState": "N",
321 "dataCategory": null,
322 "dataEncryptionLevel": "明文显示",
323 "businessDefDesc": "进口药品代理企业的统一社会信用代码,进口药品必选;没有统一社会信用代码时使用组织机构代码",
324 "flowFlag": null,
325 "flowCode": null,
326 "functionCode": null,
327 "createStaffGuid": null,
328 "createUserId": "98df01b8d86c46f786dd10b4d0eb11dd",
329 "displayVersion": "V1",
330 "standardSetName": null,
331 "ruleType": null
332 }
333 ]
334 23
335 const page = ref({ 24 const page = ref({
336 limit: 50, 25 limit: 50,
...@@ -349,30 +38,33 @@ const tableInfo = ref({ ...@@ -349,30 +38,33 @@ const tableInfo = ref({
349 id: "mapping-table", 38 id: "mapping-table",
350 fields: [ 39 fields: [
351 { label: "序号", type: "index", width: 56, align: "center", fixed: "left" }, 40 { label: "序号", type: "index", width: 56, align: "center", fixed: "left" },
352 { label: "任务名称", field: "chName", width: 96 }, 41 { label: "任务名称", field: "taskName", width: 96 },
353 { 42 {
354 label: "目录名称", field: "dataTypeValue", width: 120, type: "text_btn", columClass: 'text_btn', click: (scope) => { 43 label: "目录名称", field: "cgDirName", width: 120, type: "text_btn", columClass: 'text_btn', click: (scope) => {
355 router.push({ 44 router.push({
356 name: "templateConfig", 45 name: "templateConfig",
357 query: { guid: scope.row.damGuid }, 46 query: { guid: scope.row.damGuid },
358 }); 47 });
359 } 48 }
360 }, 49 },
361 { label: "分类分级模板", field: "dataTypeValue", width: 200 }, 50 {
362 { label: "元数据", field: "fieldStandardCode", width: 200 }, 51 label: "元数据", field: "metaNames", width: 200, getName: (scope) => {
363 { label: "任务修改人", field: "dataCategory", width: 120 }, 52 const metaNames = scope.row.metaNames || [];
53 return metaNames.join(',');
54 }
55 },
56 { label: "任务修改人", field: "updateUserName", width: 120 },
364 { label: "修改时间", field: "updateTime", width: TableColumnWidth.DATETIME }, 57 { label: "修改时间", field: "updateTime", width: TableColumnWidth.DATETIME },
365 { label: "确认次数", field: "fieldLength", width: 96, align: 'right' }, 58 { label: "结果确认人", field: "confirmUserName", width: 120 },
366 { label: "结果确认人", field: "updateUserName", width: 120 }, 59 { label: "确认时间", field: "confirmTime", width: TableColumnWidth.DATETIME },
367 { label: "确认时间", field: "updateTime", width: TableColumnWidth.DATETIME },
368 { 60 {
369 label: "结果状态", field: "approveState", width: TableColumnWidth.STATE, align: 'center', type: "tag", getName: (scope) => { 61 label: "结果状态", field: "status", width: TableColumnWidth.STATE, align: 'center', type: "tag", getName: (scope) => {
370 return filterVal(scope.row.approveState, 'approveState'); 62 return filterVal(scope.row.status, 'confirmStatus');
371 } 63 }
372 }, 64 },
373 ], 65 ],
374 loading: false, 66 loading: false,
375 data: datas || [], 67 data: [],
376 page: { 68 page: {
377 type: "normal", 69 type: "normal",
378 rows: 0, 70 rows: 0,
...@@ -386,19 +78,6 @@ const tableInfo = ref({ ...@@ -386,19 +78,6 @@ const tableInfo = ref({
386 let row = scope.row, btnArr: any = [ 78 let row = scope.row, btnArr: any = [
387 { label: "查看结果", value: "path" }, 79 { label: "查看结果", value: "path" },
388 ]; 80 ];
389 // if (row.approveState == 'Y') {
390 // if (row.listingStatus == 'Y') {
391 // btnArr.splice(0, 0, { label: "详情", value: "detail" });
392 // } else {
393 // btnArr.splice(0, 0, { label: "编辑", value: "edit" }, { label: "详情", value: "detail" }, { label: "删除", value: "delete" });
394 // }
395 // } else {
396 // if (row.approveState == 'A') {
397 // btnArr.splice(0, 0, { label: "详情", value: "detail" });
398 // } else {
399 // btnArr.splice(0, 0, { label: "编辑", value: "edit" }, { label: "详情", value: "detail" }, { label: "删除", value: "delete" });
400 // }
401 // }
402 return btnArr; 81 return btnArr;
403 }, 82 },
404 }, 83 },
...@@ -406,10 +85,11 @@ const tableInfo = ref({ ...@@ -406,10 +85,11 @@ const tableInfo = ref({
406 85
407 const getTableData = () => { 86 const getTableData = () => {
408 tableInfo.value.loading = true; 87 tableInfo.value.loading = true;
409 getListingList( 88 getTaskExecPageList(
410 Object.assign({}, searchItemValue.value, { 89 Object.assign({}, searchItemValue.value, {
411 pageIndex: page.value.curr, 90 pageIndex: page.value.curr,
412 pageSize: page.value.limit, 91 pageSize: page.value.limit,
92 taskGuid: route.query.guid
413 }) 93 })
414 ).then((res: any) => { 94 ).then((res: any) => {
415 tableInfo.value.loading = false; 95 tableInfo.value.loading = false;
...@@ -486,10 +166,7 @@ const getFirstPageData = () => { ...@@ -486,10 +166,7 @@ const getFirstPageData = () => {
486 } 166 }
487 167
488 onActivated(() => { 168 onActivated(() => {
489 if (assetStore.isRefresh) {//如果是首次加载,则不需要调用 169 getFirstPageData()
490 getFirstPageData();
491 assetStore.set(false);
492 }
493 }) 170 })
494 171
495 onBeforeMount(() => { 172 onBeforeMount(() => {
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!