4e55cd6b by lxs

分级分类任务更新

1 parent 4e06bf62
......@@ -34,7 +34,7 @@ const routes: RouteRecordRaw[] = [
cache: true,
reuse: true,
editPage: true,
activeMenu: '/data-inventory/classify-grade-manage/template-config'
activeMenu: '/data-inventory/classify-grade-manage/task-config'
},
beforeEnter: (to, from) => {
if (to.query.name) {
......@@ -45,6 +45,46 @@ const routes: RouteRecordRaw[] = [
}
},
{
path: 'task-detail',
name: 'taskDetail',
component: () => import('@/views/data_inventory/taskDetail.vue'),
meta: {
title: '结果-',
sidebar: false,
breadcrumb: false,
cache: true,
reuse: true,
editPage: true,
activeMenu: '/data-inventory/classify-grade-manage/task-config'
},
beforeEnter: (to, from) => {
if (to.query.type == 'confirm') {
to.meta.title = `${to.query.name}-结果确认`;
} else {
to.meta.title = `${to.query.name}-结果修改`;
}
}
},
{
path: 'task-log',
name: 'taskLog',
component: () => import('@/views/data_inventory/taskLog.vue'),
meta: {
title: '分级分类日志',
sidebar: false,
breadcrumb: false,
cache: true,
reuse: true,
editPage: true,
activeMenu: '/data-inventory/classify-grade-manage/task-config'
},
beforeEnter: (to, from) => {
// if (to.query.name) {
// to.meta.title = `编辑-${to.query.name}`;
// }
}
},
{
path: 'template-config',
name: 'templateConfig',
component: () => import('@/views/data_inventory/templateConfig.vue'),
......
......@@ -19,6 +19,319 @@ const router = useRouter();
const userStore = useUserStore();
const userData = JSON.parse(userStore.userData);
const assetStore = useDataAssetStore();
const datas = [
{
"updateTime": "2024-07-16 13:17:00",
"updateUserName": "数往知来管理员",
"guid": "4e0e76c48fa043d5b35d09f3ccc7c265",
"approvalGuid": null,
"standardSetGuid": "58d1178a04904d599284fc1e61594c43",
"fieldStandardCode": "COL202406070021",
"dataVersion": 1,
"chName": "地址",
"enName": "address",
"dataTypeValue": "字符型",
"dataTypeCode": "varchar",
"dataDicGuid": "",
"dataDicName": null,
"isDataDic": "N",
"fieldLength": 600,
"fieldPrecision": null,
"dataState": 0,
"approveState": "N",
"dataCategory": "合伙人",
"dataEncryptionLevel": "界面加密",
"businessDefDesc": "地址",
"flowFlag": null,
"flowCode": null,
"functionCode": null,
"createStaffGuid": null,
"createUserId": "98df01b8d86c46f786dd10b4d0eb11dd",
"displayVersion": "V1",
"standardSetName": null,
"ruleType": null
},
{
"updateTime": "2024-01-27 10:19:45",
"updateUserName": "数往知来管理员",
"guid": "bc630207357c466dbff7613ea38985cc",
"approvalGuid": null,
"standardSetGuid": "58d1178a04904d599284fc1e61594c43",
"fieldStandardCode": "COL202401260124",
"dataVersion": 1,
"chName": "包含最小销售包装单元数量",
"enName": "inboxQuantity",
"dataTypeValue": "整型",
"dataTypeCode": "int",
"dataDicGuid": null,
"dataDicName": null,
"isDataDic": null,
"fieldLength": null,
"fieldPrecision": null,
"dataState": 1,
"approveState": "A",
"dataCategory": null,
"dataEncryptionLevel": "明文显示",
"businessDefDesc": "当前药品追溯码中包含的最小销售包装单元药品追溯码的数量,发货类型为03时可选",
"flowFlag": null,
"flowCode": null,
"functionCode": null,
"createStaffGuid": null,
"createUserId": "98df01b8d86c46f786dd10b4d0eb11dd",
"displayVersion": "V1",
"standardSetName": null,
"ruleType": null
},
{
"updateTime": "2024-01-27 11:03:59",
"updateUserName": "审批人4",
"guid": "420f2a68bd4441bf92010eadf698b685",
"approvalGuid": null,
"standardSetGuid": "58d1178a04904d599284fc1e61594c43",
"fieldStandardCode": "COL202401260122",
"dataVersion": 1,
"chName": "包装层级",
"enName": "packageLevel",
"dataTypeValue": "字符型",
"dataTypeCode": "varchar",
"dataDicGuid": null,
"dataDicName": null,
"isDataDic": null,
"fieldLength": 200,
"fieldPrecision": null,
"dataState": 1,
"approveState": "A",
"dataCategory": null,
"dataEncryptionLevel": "明文显示",
"businessDefDesc": "当前药品追溯码所处包装层级描述,发货类型为03时可选",
"flowFlag": null,
"flowCode": null,
"functionCode": null,
"createStaffGuid": null,
"createUserId": "98df01b8d86c46f786dd10b4d0eb11dd",
"displayVersion": "V1",
"standardSetName": null,
"ruleType": null
},
{
"updateTime": "2024-06-06 10:01:06",
"updateUserName": "审批人1",
"guid": "f841e1848ab94b1e81a0217a09a7a3d3",
"approvalGuid": "b674bffe8d2f4132918016b6baaf75aa",
"standardSetGuid": "58d1178a04904d599284fc1e61594c43",
"fieldStandardCode": "COL202401260120",
"dataVersion": 1,
"chName": "上一级包装药品追溯码",
"enName": "parentDTC",
"dataTypeValue": "字符型",
"dataTypeCode": "varchar",
"dataDicGuid": "",
"dataDicName": null,
"isDataDic": "N",
"fieldLength": 200,
"fieldPrecision": null,
"dataState": 1,
"approveState": "Y",
"dataCategory": "",
"dataEncryptionLevel": "明文显示",
"businessDefDesc": "当前药品追溯码大一级包装上的药品追溯码,发货类型为03时可选;当存在上一级包装时必选",
"flowFlag": null,
"flowCode": null,
"functionCode": null,
"createStaffGuid": null,
"createUserId": "98df01b8d86c46f786dd10b4d0eb11dd",
"displayVersion": "V1",
"standardSetName": null,
"ruleType": null
},
{
"updateTime": "2024-01-26 00:10:47",
"updateUserName": "数往知来管理员",
"guid": "d4d42dea2a5844b4a7f9238806ea507b",
"approvalGuid": null,
"standardSetGuid": "58d1178a04904d599284fc1e61594c43",
"fieldStandardCode": "COL202401260118",
"dataVersion": 1,
"chName": "药品追溯码",
"enName": "DTC",
"dataTypeValue": "字符型",
"dataTypeCode": "varchar",
"dataDicGuid": null,
"dataDicName": null,
"isDataDic": null,
"fieldLength": 200,
"fieldPrecision": null,
"dataState": 0,
"approveState": "N",
"dataCategory": null,
"dataEncryptionLevel": "明文显示",
"businessDefDesc": "用于唯一标识药品各级销售包装单元的代码,发货类型为03时可选",
"flowFlag": null,
"flowCode": null,
"functionCode": null,
"createStaffGuid": null,
"createUserId": "98df01b8d86c46f786dd10b4d0eb11dd",
"displayVersion": "V1",
"standardSetName": null,
"ruleType": null
},
{
"updateTime": "2024-01-26 00:10:47",
"updateUserName": "数往知来管理员",
"guid": "ff9d0e4f6fbb444c8dcf6f67bffcb659",
"approvalGuid": null,
"standardSetGuid": "58d1178a04904d599284fc1e61594c43",
"fieldStandardCode": "COL202401260116",
"dataVersion": 1,
"chName": "发货数量",
"enName": "deliveryQuantity",
"dataTypeValue": "整型",
"dataTypeCode": "int",
"dataDicGuid": null,
"dataDicName": null,
"isDataDic": null,
"fieldLength": null,
"fieldPrecision": null,
"dataState": 0,
"approveState": "N",
"dataCategory": null,
"dataEncryptionLevel": "明文显示",
"businessDefDesc": "发货的最小销售包装单元数量",
"flowFlag": null,
"flowCode": null,
"functionCode": null,
"createStaffGuid": null,
"createUserId": "98df01b8d86c46f786dd10b4d0eb11dd",
"displayVersion": "V1",
"standardSetName": null,
"ruleType": null
},
{
"updateTime": "2024-01-26 00:10:46",
"updateUserName": "数往知来管理员",
"guid": "fe88ac9e8d9c4f148833dbb3976fca77",
"approvalGuid": null,
"standardSetGuid": "58d1178a04904d599284fc1e61594c43",
"fieldStandardCode": "COL202401260114",
"dataVersion": 1,
"chName": "药品生产批号",
"enName": "batch",
"dataTypeValue": "字符型",
"dataTypeCode": "varchar",
"dataDicGuid": null,
"dataDicName": null,
"isDataDic": null,
"fieldLength": 20,
"fieldPrecision": null,
"dataState": 0,
"approveState": "N",
"dataCategory": null,
"dataEncryptionLevel": "明文显示",
"businessDefDesc": "药品包装上标示的生产批号",
"flowFlag": null,
"flowCode": null,
"functionCode": null,
"createStaffGuid": null,
"createUserId": "98df01b8d86c46f786dd10b4d0eb11dd",
"displayVersion": "V1",
"standardSetName": null,
"ruleType": null
},
{
"updateTime": "2024-01-26 00:10:45",
"updateUserName": "数往知来管理员",
"guid": "9759837e0d72472ab7441c1873c9159a",
"approvalGuid": null,
"standardSetGuid": "58d1178a04904d599284fc1e61594c43",
"fieldStandardCode": "COL202401260112",
"dataVersion": 1,
"chName": "药品有效期截止日期",
"enName": "expirationDate",
"dataTypeValue": "日期型",
"dataTypeCode": "date",
"dataDicGuid": null,
"dataDicName": null,
"isDataDic": null,
"fieldLength": null,
"fieldPrecision": null,
"dataState": 0,
"approveState": "N",
"dataCategory": null,
"dataEncryptionLevel": "明文显示",
"businessDefDesc": "药品有效期的截止日期",
"flowFlag": null,
"flowCode": null,
"functionCode": null,
"createStaffGuid": null,
"createUserId": "98df01b8d86c46f786dd10b4d0eb11dd",
"displayVersion": "V1",
"standardSetName": null,
"ruleType": null
},
{
"updateTime": "2024-01-26 00:10:45",
"updateUserName": "数往知来管理员",
"guid": "a39ed6123c6a420d9d1265315e714f86",
"approvalGuid": null,
"standardSetGuid": "58d1178a04904d599284fc1e61594c43",
"fieldStandardCode": "COL202401260110",
"dataVersion": 1,
"chName": "药品生产日期",
"enName": "productionDate",
"dataTypeValue": "日期型",
"dataTypeCode": "date",
"dataDicGuid": null,
"dataDicName": null,
"isDataDic": null,
"fieldLength": null,
"fieldPrecision": null,
"dataState": 0,
"approveState": "N",
"dataCategory": null,
"dataEncryptionLevel": "明文显示",
"businessDefDesc": "药品包装上标示的生产日期",
"flowFlag": null,
"flowCode": null,
"functionCode": null,
"createStaffGuid": null,
"createUserId": "98df01b8d86c46f786dd10b4d0eb11dd",
"displayVersion": "V1",
"standardSetName": null,
"ruleType": null
},
{
"updateTime": "2024-01-26 00:10:45",
"updateUserName": "数往知来管理员",
"guid": "ea597c1b8bb24a5ab053a80b084de98c",
"approvalGuid": null,
"standardSetGuid": "58d1178a04904d599284fc1e61594c43",
"fieldStandardCode": "COL202401260108",
"dataVersion": 1,
"chName": "统一社会信用代码(进口药品代理企业)",
"enName": "drugImporterUSCID",
"dataTypeValue": "字符型",
"dataTypeCode": "varchar",
"dataDicGuid": null,
"dataDicName": null,
"isDataDic": null,
"fieldLength": 18,
"fieldPrecision": null,
"dataState": 0,
"approveState": "N",
"dataCategory": null,
"dataEncryptionLevel": "明文显示",
"businessDefDesc": "进口药品代理企业的统一社会信用代码,进口药品必选;没有统一社会信用代码时使用组织机构代码",
"flowFlag": null,
"flowCode": null,
"functionCode": null,
"createStaffGuid": null,
"createUserId": "98df01b8d86c46f786dd10b4d0eb11dd",
"displayVersion": "V1",
"standardSetName": null,
"ruleType": null
}
]
const page = ref({
limit: 50,
curr: 1,
......@@ -36,10 +349,17 @@ const tableInfo = ref({
id: "mapping-table",
fields: [
{ label: "序号", type: "index", width: 56, align: "center", fixed: "left" },
{ label: "任务名称", field: "damCode", width: 96 },
{ label: "目录名称", field: "damName", width: 120 },
{ label: "分类分级模板", field: "damTypeName", width: 200 },
{ label: "元数据", field: "damTypeName", width: 200 },
{ label: "任务名称", field: "chName", width: 96 },
{
label: "目录名称", field: "dataTypeValue", width: 120, type: "text_btn", columClass: 'text_btn', click: (scope) => {
router.push({
name: "templateConfig",
query: { guid: scope.row.damGuid },
});
}
},
{ label: "分类分级模板", field: "dataTypeValue", width: 200 },
{ label: "元数据", field: "fieldStandardCode", width: 200 },
// {
// label: "是否公共数据", field: "isPublicData", width: 120, getName: (scope) => {
// return scope.row.isPublicData == 'Y' ? '是' : '否';
......@@ -50,10 +370,10 @@ const tableInfo = ref({
return filterVal(scope.row.approveState, 'approveState');
}
},
{ label: "任务修改人", field: "damName", width: 120 },
{ label: "任务修改人", field: "dataCategory", width: 120 },
{ label: "修改时间", field: "updateTime", width: TableColumnWidth.DATETIME },
{ label: "确认次数", field: "damName", width: 96, align: 'right' },
{ label: "结果确认人", field: "damName", width: 120 },
{ label: "确认次数", field: "fieldLength", width: 96, align: 'right' },
{ label: "结果确认人", field: "updateUserName", width: 120 },
{ label: "确认时间", field: "updateTime", width: TableColumnWidth.DATETIME },
{
label: "结果状态", field: "approveState", width: TableColumnWidth.STATE, align: 'center', type: "tag", getName: (scope) => {
......@@ -62,7 +382,7 @@ const tableInfo = ref({
},
],
loading: false,
data: [],
data: datas || [],
page: {
type: "normal",
rows: 0,
......@@ -71,22 +391,28 @@ const tableInfo = ref({
actionInfo: {
label: "操作",
type: "btn",
width: 200,
width: 280,
btns: (scope) => {
let row = scope.row, btnArr: any = [];
if (row.approveState == 'Y') {
if (row.listingStatus == 'Y') {
btnArr.splice(0, 0, { label: "详情", value: "detail" });
} else {
btnArr.splice(0, 0, { label: "编辑", value: "edit" }, { label: "详情", value: "detail" }, { label: "删除", value: "delete" });
}
} else {
if (row.approveState == 'A') {
btnArr.splice(0, 0, { label: "详情", value: "detail" });
} else {
btnArr.splice(0, 0, { label: "编辑", value: "edit" }, { label: "详情", value: "detail" }, { label: "删除", value: "delete" });
}
}
let row = scope.row, btnArr: any = [
{ label: "结果确认", value: "confirm" },
{ label: "结果修改", value: "modify" },
{ label: "编辑", value: "edit" },
{ label: "日志", value: "log" },
{ label: "删除", value: "delete" }
];
// if (row.approveState == 'Y') {
// if (row.listingStatus == 'Y') {
// btnArr.splice(0, 0, { label: "详情", value: "detail" });
// } else {
// btnArr.splice(0, 0, { label: "编辑", value: "edit" }, { label: "详情", value: "detail" }, { label: "删除", value: "delete" });
// }
// } else {
// if (row.approveState == 'A') {
// btnArr.splice(0, 0, { label: "详情", value: "detail" });
// } else {
// btnArr.splice(0, 0, { label: "编辑", value: "edit" }, { label: "详情", value: "detail" }, { label: "删除", value: "delete" });
// }
// }
return btnArr;
},
},
......@@ -115,7 +441,7 @@ const tableBtnClick = (scope, btn) => {
const type = btn.value;
const row = scope.row;
currTableData.value = row;
if (type == "detail" || type === "edit") {
if(type == 'confirm' || type == 'modify' || type == 'edit' || type == "log"){
toPath(type);
} else if (type === "delete") {
open("此操作将永久删除,是否继续?", "warning");
......@@ -130,7 +456,7 @@ const toPath = (type) => {
type
},
});
} else {
} else if(type == 'edit'){
router.push({
name: "taskEdit",
query: {
......@@ -139,6 +465,24 @@ const toPath = (type) => {
type
},
});
} else if(type == 'confirm' || type == 'modify'){
router.push({
name: "taskDetail",
query: {
guid: currTableData.value.guid,
name: currTableData.value.damName,
type
},
});
} else {
router.push({
name: "taskLog",
query: {
guid: currTableData.value.guid,
name: currTableData.value.damName,
type
},
});
}
}
......
<route lang="yaml">
name: taskDetail //分类分级任务结果
</route>
<script lang="ts" setup name="taskDetail">
import { ref, onMounted } from "vue";
import { useRouter, useRoute } from "vue-router";
import useUserStore from "@/store/modules/user";
import { ElMessage, ElMessageBox } from "element-plus";
import { Search } from "@element-plus/icons-vue";
import useDataAssetStore from "@/store/modules/dataAsset";
import TableTools from '@/components/Tools/table_tools.vue';
import Table from "@/components/Table/index.vue";
import { getListingList, listingDelete, listingUpdateStatus, filterVal, getParamsDataList } from "@/api/modules/dataProduct";
const { proxy } = getCurrentInstance() as any;
const router = useRouter();
const userStore = useUserStore();
const userData = JSON.parse(userStore.userData);
const assetStore = useDataAssetStore();
const datas = [
{
"updateTime": "2024-07-16 13:17:00",
"updateUserName": "数往知来管理员",
"guid": "4e0e76c48fa043d5b35d09f3ccc7c265",
"approvalGuid": null,
"standardSetGuid": "58d1178a04904d599284fc1e61594c43",
"fieldStandardCode": "COL202406070021",
"dataVersion": 1,
"chName": "地址",
"enName": "address",
"dataTypeValue": "字符型",
"dataTypeCode": "varchar",
"dataDicGuid": "",
"dataDicName": null,
"isDataDic": "N",
"fieldLength": 600,
"fieldPrecision": null,
"dataState": 0,
"approveState": "N",
"dataCategory": "合伙人",
"dataEncryptionLevel": "界面加密",
"businessDefDesc": "地址",
"flowFlag": null,
"flowCode": null,
"functionCode": null,
"createStaffGuid": null,
"createUserId": "98df01b8d86c46f786dd10b4d0eb11dd",
"displayVersion": "V1",
"standardSetName": null,
"ruleType": null
},
{
"updateTime": "2024-01-27 10:19:45",
"updateUserName": "数往知来管理员",
"guid": "bc630207357c466dbff7613ea38985cc",
"approvalGuid": null,
"standardSetGuid": "58d1178a04904d599284fc1e61594c43",
"fieldStandardCode": "COL202401260124",
"dataVersion": 1,
"chName": "包含最小销售包装单元数量",
"enName": "inboxQuantity",
"dataTypeValue": "整型",
"dataTypeCode": "int",
"dataDicGuid": null,
"dataDicName": null,
"isDataDic": null,
"fieldLength": null,
"fieldPrecision": null,
"dataState": 1,
"approveState": "A",
"dataCategory": null,
"dataEncryptionLevel": "明文显示",
"businessDefDesc": "当前药品追溯码中包含的最小销售包装单元药品追溯码的数量,发货类型为03时可选",
"flowFlag": null,
"flowCode": null,
"functionCode": null,
"createStaffGuid": null,
"createUserId": "98df01b8d86c46f786dd10b4d0eb11dd",
"displayVersion": "V1",
"standardSetName": null,
"ruleType": null
},
{
"updateTime": "2024-01-27 11:03:59",
"updateUserName": "审批人4",
"guid": "420f2a68bd4441bf92010eadf698b685",
"approvalGuid": null,
"standardSetGuid": "58d1178a04904d599284fc1e61594c43",
"fieldStandardCode": "COL202401260122",
"dataVersion": 1,
"chName": "包装层级",
"enName": "packageLevel",
"dataTypeValue": "字符型",
"dataTypeCode": "varchar",
"dataDicGuid": null,
"dataDicName": null,
"isDataDic": null,
"fieldLength": 200,
"fieldPrecision": null,
"dataState": 1,
"approveState": "A",
"dataCategory": null,
"dataEncryptionLevel": "明文显示",
"businessDefDesc": "当前药品追溯码所处包装层级描述,发货类型为03时可选",
"flowFlag": null,
"flowCode": null,
"functionCode": null,
"createStaffGuid": null,
"createUserId": "98df01b8d86c46f786dd10b4d0eb11dd",
"displayVersion": "V1",
"standardSetName": null,
"ruleType": null
},
{
"updateTime": "2024-06-06 10:01:06",
"updateUserName": "审批人1",
"guid": "f841e1848ab94b1e81a0217a09a7a3d3",
"approvalGuid": "b674bffe8d2f4132918016b6baaf75aa",
"standardSetGuid": "58d1178a04904d599284fc1e61594c43",
"fieldStandardCode": "COL202401260120",
"dataVersion": 1,
"chName": "上一级包装药品追溯码",
"enName": "parentDTC",
"dataTypeValue": "字符型",
"dataTypeCode": "varchar",
"dataDicGuid": "",
"dataDicName": null,
"isDataDic": "N",
"fieldLength": 200,
"fieldPrecision": null,
"dataState": 1,
"approveState": "Y",
"dataCategory": "",
"dataEncryptionLevel": "明文显示",
"businessDefDesc": "当前药品追溯码大一级包装上的药品追溯码,发货类型为03时可选;当存在上一级包装时必选",
"flowFlag": null,
"flowCode": null,
"functionCode": null,
"createStaffGuid": null,
"createUserId": "98df01b8d86c46f786dd10b4d0eb11dd",
"displayVersion": "V1",
"standardSetName": null,
"ruleType": null
},
{
"updateTime": "2024-01-26 00:10:47",
"updateUserName": "数往知来管理员",
"guid": "d4d42dea2a5844b4a7f9238806ea507b",
"approvalGuid": null,
"standardSetGuid": "58d1178a04904d599284fc1e61594c43",
"fieldStandardCode": "COL202401260118",
"dataVersion": 1,
"chName": "药品追溯码",
"enName": "DTC",
"dataTypeValue": "字符型",
"dataTypeCode": "varchar",
"dataDicGuid": null,
"dataDicName": null,
"isDataDic": null,
"fieldLength": 200,
"fieldPrecision": null,
"dataState": 0,
"approveState": "N",
"dataCategory": null,
"dataEncryptionLevel": "明文显示",
"businessDefDesc": "用于唯一标识药品各级销售包装单元的代码,发货类型为03时可选",
"flowFlag": null,
"flowCode": null,
"functionCode": null,
"createStaffGuid": null,
"createUserId": "98df01b8d86c46f786dd10b4d0eb11dd",
"displayVersion": "V1",
"standardSetName": null,
"ruleType": null
},
{
"updateTime": "2024-01-26 00:10:47",
"updateUserName": "数往知来管理员",
"guid": "ff9d0e4f6fbb444c8dcf6f67bffcb659",
"approvalGuid": null,
"standardSetGuid": "58d1178a04904d599284fc1e61594c43",
"fieldStandardCode": "COL202401260116",
"dataVersion": 1,
"chName": "发货数量",
"enName": "deliveryQuantity",
"dataTypeValue": "整型",
"dataTypeCode": "int",
"dataDicGuid": null,
"dataDicName": null,
"isDataDic": null,
"fieldLength": null,
"fieldPrecision": null,
"dataState": 0,
"approveState": "N",
"dataCategory": null,
"dataEncryptionLevel": "明文显示",
"businessDefDesc": "发货的最小销售包装单元数量",
"flowFlag": null,
"flowCode": null,
"functionCode": null,
"createStaffGuid": null,
"createUserId": "98df01b8d86c46f786dd10b4d0eb11dd",
"displayVersion": "V1",
"standardSetName": null,
"ruleType": null
},
{
"updateTime": "2024-01-26 00:10:46",
"updateUserName": "数往知来管理员",
"guid": "fe88ac9e8d9c4f148833dbb3976fca77",
"approvalGuid": null,
"standardSetGuid": "58d1178a04904d599284fc1e61594c43",
"fieldStandardCode": "COL202401260114",
"dataVersion": 1,
"chName": "药品生产批号",
"enName": "batch",
"dataTypeValue": "字符型",
"dataTypeCode": "varchar",
"dataDicGuid": null,
"dataDicName": null,
"isDataDic": null,
"fieldLength": 20,
"fieldPrecision": null,
"dataState": 0,
"approveState": "N",
"dataCategory": null,
"dataEncryptionLevel": "明文显示",
"businessDefDesc": "药品包装上标示的生产批号",
"flowFlag": null,
"flowCode": null,
"functionCode": null,
"createStaffGuid": null,
"createUserId": "98df01b8d86c46f786dd10b4d0eb11dd",
"displayVersion": "V1",
"standardSetName": null,
"ruleType": null
},
{
"updateTime": "2024-01-26 00:10:45",
"updateUserName": "数往知来管理员",
"guid": "9759837e0d72472ab7441c1873c9159a",
"approvalGuid": null,
"standardSetGuid": "58d1178a04904d599284fc1e61594c43",
"fieldStandardCode": "COL202401260112",
"dataVersion": 1,
"chName": "药品有效期截止日期",
"enName": "expirationDate",
"dataTypeValue": "日期型",
"dataTypeCode": "date",
"dataDicGuid": null,
"dataDicName": null,
"isDataDic": null,
"fieldLength": null,
"fieldPrecision": null,
"dataState": 0,
"approveState": "N",
"dataCategory": null,
"dataEncryptionLevel": "明文显示",
"businessDefDesc": "药品有效期的截止日期",
"flowFlag": null,
"flowCode": null,
"functionCode": null,
"createStaffGuid": null,
"createUserId": "98df01b8d86c46f786dd10b4d0eb11dd",
"displayVersion": "V1",
"standardSetName": null,
"ruleType": null
},
{
"updateTime": "2024-01-26 00:10:45",
"updateUserName": "数往知来管理员",
"guid": "a39ed6123c6a420d9d1265315e714f86",
"approvalGuid": null,
"standardSetGuid": "58d1178a04904d599284fc1e61594c43",
"fieldStandardCode": "COL202401260110",
"dataVersion": 1,
"chName": "药品生产日期",
"enName": "productionDate",
"dataTypeValue": "日期型",
"dataTypeCode": "date",
"dataDicGuid": null,
"dataDicName": null,
"isDataDic": null,
"fieldLength": null,
"fieldPrecision": null,
"dataState": 0,
"approveState": "N",
"dataCategory": null,
"dataEncryptionLevel": "明文显示",
"businessDefDesc": "药品包装上标示的生产日期",
"flowFlag": null,
"flowCode": null,
"functionCode": null,
"createStaffGuid": null,
"createUserId": "98df01b8d86c46f786dd10b4d0eb11dd",
"displayVersion": "V1",
"standardSetName": null,
"ruleType": null
},
{
"updateTime": "2024-01-26 00:10:45",
"updateUserName": "数往知来管理员",
"guid": "ea597c1b8bb24a5ab053a80b084de98c",
"approvalGuid": null,
"standardSetGuid": "58d1178a04904d599284fc1e61594c43",
"fieldStandardCode": "COL202401260108",
"dataVersion": 1,
"chName": "统一社会信用代码(进口药品代理企业)",
"enName": "drugImporterUSCID",
"dataTypeValue": "字符型",
"dataTypeCode": "varchar",
"dataDicGuid": null,
"dataDicName": null,
"isDataDic": null,
"fieldLength": 18,
"fieldPrecision": null,
"dataState": 0,
"approveState": "N",
"dataCategory": null,
"dataEncryptionLevel": "明文显示",
"businessDefDesc": "进口药品代理企业的统一社会信用代码,进口药品必选;没有统一社会信用代码时使用组织机构代码",
"flowFlag": null,
"flowCode": null,
"functionCode": null,
"createStaffGuid": null,
"createUserId": "98df01b8d86c46f786dd10b4d0eb11dd",
"displayVersion": "V1",
"standardSetName": null,
"ruleType": null
}
]
const templateInfo = ref({
title: '医疗数据分类分级模板',
descGroup: [
{ label: '模型确认人', value: '管理员 ' },
{ label: '模型确认时间', value: '2021-12-12 09:12:13' },
],
tags: [
{ type: 'info', name: '医疗行业分类' },
{ type: 'success', name: '五级' },
{ type: 'primary', name: 'V5' },
],
desc: '适用于各级医疗机构、卫生健康管理部门、公共卫生服务机构、相关专项业务服务机构、相关信息技术服务机构等开展医疗健康数据分类分级。适用于各级医疗机构、卫生健康管理部门、公共卫生服务机构、相关专项业务服务机构、相关信息技术服务机构等开展医疗健康数据分类分级。适用于各级医疗机构、卫生健康。'
})
const tabsInfo = ref({
activeName: 'sheet',
tabs: [
{ label: '库表', name: 'sheet' },
{ label: '字段', name: 'field' },
]
});
const sheetItemList = ref([
{
type: "select",
label: "",
placeholder: '变更类型',
field: 'dataSourceGuid',
default: '',
options: [],
props: {
label: 'databaseNameZh',
value: 'guid'
},
clearable: true,
},
{
type: "select",
label: "",
placeholder: '数据库名',
field: 'dataSourceGuid',
default: '',
options: [],
props: {
label: 'databaseNameZh',
value: 'guid'
},
clearable: true,
},
{
type: "select",
label: "",
placeholder: '表中文/英文名',
field: 'dataSourceGuid',
default: '',
options: [],
props: {
label: 'databaseNameZh',
value: 'guid'
},
clearable: true,
},
]);
const fieldItemList = ref([
{
type: "select",
label: "",
placeholder: '变更类型',
field: 'dataSourceGuid',
default: '',
options: [],
props: {
label: 'databaseNameZh',
value: 'guid'
},
clearable: true,
},
{
type: "select",
label: "",
placeholder: '字段中文/英文名',
field: 'dataSourceGuid',
default: '',
options: [],
props: {
label: 'databaseNameZh',
value: 'guid'
},
clearable: true,
},
{
type: "select",
label: "",
placeholder: '表中文/英文名',
field: 'dataSourceGuid',
default: '',
options: [],
props: {
label: 'databaseNameZh',
value: 'guid'
},
clearable: true,
},
{
type: "select",
label: "",
placeholder: '分类',
field: 'dataSourceGuid',
default: '',
options: [],
props: {
label: 'databaseNameZh',
value: 'guid'
},
clearable: true,
},
{
type: "select",
label: "",
placeholder: '分级',
field: 'dataSourceGuid',
default: '',
options: [],
props: {
label: 'databaseNameZh',
value: 'guid'
},
clearable: true,
},
{
type: "select",
label: "",
placeholder: '数据库名',
field: 'dataSourceGuid',
default: '',
options: [],
props: {
label: 'databaseNameZh',
value: 'guid'
},
clearable: true,
},
]);
const checked1 = ref(false);
const checked2 = ref(false);
const page = ref({
limit: 50,
curr: 1,
sizes: [
{ label: "10", value: 10 },
{ label: "50", value: 50 },
{ label: "100", value: 100 },
{ label: "150", value: 150 },
{ label: "200", value: 200 },
],
});
const searchItemValue: any = ref({});
const currTableData: any = ref({});
const sheetTableInfo = ref({
id: "mapping-table",
fields: [
{ label: "序号", type: "index", width: 56, align: "center", fixed: "left" },
{ label: "标签", field: "damCode", width: 96 },
{ label: "分类", field: "damTypeName", width: 380 },
{ label: "分级", field: "damName", width: 55 },
{ label: "规则", field: "damTypeName", width: 380 },
],
loading: false,
data: datas || [],
page: {
type: "normal",
rows: 0,
...page.value,
},
actionInfo: {
show: false
},
});
const fieldTableInfo = ref({
id: "metadata-table",
fields: [
{ label: "序号", type: "index", width: 56, align: "center", fixed: "left" },
{ label: "数据库名称", field: "damCode", width: 200 },
{ label: "数据库名", field: "damTypeName", width: 200 },
{ label: "总表数", field: "damName", width: 120, align: "right" },
{ label: "存储量(约/MB)", field: "damTypeName", width: 200, align: "right" },
],
loading: false,
data: [],
page: {
type: "normal",
rows: 0,
...page.value,
},
actionInfo: {
show: false
},
})
const tabChange = (val) => {
tabsInfo.value.activeName = val;
}
const getTableData = () => {
tableInfo.value.loading = true;
getListingList(
Object.assign({}, searchItemValue.value, {
pageIndex: page.value.curr,
pageSize: page.value.limit,
})
).then((res: any) => {
tableInfo.value.loading = false;
tableInfo.value.data = res.data.records || [];
tableInfo.value.page.curr = res.data.pageIndex;
tableInfo.value.page.limit = res.data.pageSize;
tableInfo.value.page.rows = res.data.totalRows;
})
.catch((res) => {
tableInfo.value.loading = false;
});
};
const tableBtnClick = (scope, btn) => {
const type = btn.value;
const row = scope.row;
currTableData.value = row;
if (type == "detail" || type === "edit") {
toPath(type);
} else if (type === "delete") {
open("此操作将永久删除,是否继续?", "warning");
}
};
const toPath = (type = null) => {
router.push({
name: "taskConfig",
query: {
type
},
});
}
const tablePageChange = (info) => {
page.value.curr = Number(info.curr);
page.value.limit = Number(info.limit);
tableInfo.value.page.limit = page.value.limit;
tableInfo.value.page.curr = page.value.curr;
getTableData();
};
const open = (msg, type, isBatch = false) => {
ElMessageBox.confirm(msg, "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: type,
}).then(() => {
const guids = [currTableData.value.guid];
listingDelete(guids).then((res: any) => {
if (res.code == proxy.$passCode) {
getFirstPageData();
ElMessage({
type: "success",
message: "删除成功",
});
} else {
ElMessage({
type: "error",
message: res.msg,
});
}
}).catch((res) => {
tableInfo.value.loading = false;
});
});
};
const getFirstPageData = () => {
page.value.curr = 1
tableInfo.value.page.curr = 1;
getTableData();
}
const btnClick = async (btn, bType = null) => {
const type = btn.value;
};
/** 搜索查询分类分级模板。 */
const searchTemplate = (val: any, clear: boolean = false) => {
// page.value.curr = 1;
// if (clear) {
// searchItemList.value.map(item => item.default = '')
// page.value.planName = '';
// page.value.state = null;
// getTableData();
// return;
// }
// page.value.planName = val.planName;
// page.value.state = val.state;
// getTableData();
};
const changTable = () => {
// toSearch({})
};
const getPermissionList = (val, init = false) => {
let params: any = val ? { ...val } : {}
// params.pageIndex = listPage.value.curr;
// params.pageSize = listPage.value.limit;
// getPermissionDictList(params).then((res: any) => {
// if (res.code == proxy.$passCode) {
// const data = res.data?.records || []
// if (init) {
// permissionList.value = JSON.parse(JSON.stringify(data))
// currpermissionList.value = JSON.parse(JSON.stringify(data))
// listPage.value.totalPages = res.data.totalPages
// toSearch({})
// } else {
// permissionList.value.push(...JSON.parse(JSON.stringify(data)))
// querySearch(asideSearchInput.value)
// }
// }
// listLoading.value = false
// }).catch(() => {
// listLoading.value = false
// })
}
onActivated(() => {
})
onBeforeMount(() => {
})
</script>
<template>
<div class="container_wrap full flex">
<div class="main_wrap full">
<div class="content_main panel">
<div class="template_panel">
<div class="panel_title">
<span class="title_text">{{ templateInfo.title }}</span>
<div class="title_desc">
<div class="desc_group" v-for="desc in templateInfo.descGroup">
<span class="desc_label">{{ desc.label }}</span>
<span class="desc_value">{{ desc.value }}</span>
</div>
</div>
</div>
<div class="panel_tags">
<el-tag v-for="tag in templateInfo.tags" :type="tag.type">{{ tag.name }}</el-tag>
</div>
<p class="panel_desc">{{ templateInfo.desc }}</p>
</div>
<div class="panel_content">
<Tabs class="panel_tabs" :tabs-info="tabsInfo" @tab-change="tabChange" />
<div class="panel" v-show="tabsInfo.activeName == 'sheet'">
<div class="table_tool_wrap">
<TableTools :searchItems="sheetItemList" :searchId="'template-manage-search'" @search="searchTemplate" />
</div>
<div class="table_panel_wrap">
<Table :tableInfo="sheetTableInfo" @tableBtnClick="tableBtnClick" @tablePageChange="tablePageChange" />
</div>
</div>
<div class="panel" v-show="tabsInfo.activeName == 'field'">
<div class="table_tool_wrap">
<TableTools :searchItems="fieldItemList" :searchId="'template-manage-search'" @search="searchTemplate" />
<div class="tools_btns">
<div class="btns">
<el-button type="primary" plain @click="btnClick({ value: 'batch' })">批量变量分类分级</el-button>
<el-button plain @click="btnClick({ value: 'import' })">导入</el-button>
<el-button plain @click="btnClick({ value: 'export' })">导出</el-button>
</div>
<div class="checkboxs">
<el-checkbox v-model="checked1">仅看未分级分类</el-checkbox>
<el-checkbox v-model="checked2">仅看变更</el-checkbox>
</div>
</div>
</div>
<div class="table_panel_wrap panel">
<div class="table_panel">
<el-table ref="costTableRef" :data="fieldTableInfo.data" show-summary border>
<el-table-column v-for="(item, i) in fieldTableInfo.fields" :label="item.label" :width="item.width"
:min-width="item.minWidth" :fixed="item.fixed" :align="item.align"
:sortable="item.sortable ?? false" :prop="item.field" :class-name="item.columClass"
show-overflow-tooltip>
<template #default="scope">
<div class="select_cell" v-if="item.type == 'select'">
<el-select v-model="scope.row[item.field]" :placeholder="item.placeholder"
:disabled="item.disabled" :clearable="item.clearable || true" />
</div>
<span v-else>
{{ item.getName ? item.getName(scope) : scope.row[item.field] !== 0 && !scope.row[item.field] ?
"--" : scope.row[item.field] }}
</span>
</template>
</el-table-column>
</el-table>
</div>
</div>
</div>
</div>
</div>
<div class="tool_btns">
<div class="btns">
<el-button @click="btnClick({ value: 'cancel' })">暂存</el-button>
<el-button type="primary" @click="btnClick({ value: 'next' })">确认变更</el-button>
</div>
</div>
</div>
</div>
</template>
<style scoped lang="scss">
.container_wrap {
.aside_wrap {
width: 199px;
border-right: 1px solid #d9d9d9;
box-shadow: none;
.aside_title {
width: calc(100% - 32px);
display: inline-block;
}
.icon-add.el-icon {
width: 24px;
height: 24px;
vertical-align: middle;
cursor: pointer;
svg {
width: 24px;
height: 24px;
}
}
.tree_panel {
height: calc(100% - 72px);
padding-top: 0;
border-bottom: 1px solid #d9d9d9;
:deep(.el-tree) {
margin: 0;
height: calc(100% - 32px);
overflow: hidden auto;
}
}
.page_nav_wrap.concise {
justify-content: center;
}
}
}
.container_wrap {
overflow: hidden auto;
.main_wrap {
padding: 0;
&.full {
width: 100%;
}
.content_main {
display: flex;
flex-direction: column;
height: calc(100% - 45px);
overflow: hidden auto;
flex: 1;
&.panel {
padding: 0 16px;
}
.template_panel {
padding: 0 8px;
.panel_title {
display: flex;
justify-content: space-between;
align-items: center;
margin: 8px 0;
.title_text {
font-size: 16px;
color: #212121;
line-height: 24px;
font-weight: 600;
}
.title_desc {
display: flex;
.desc_group {
margin-left: 16px;
}
}
}
.panel_tags {
.el-tag {
margin-right: 8px;
}
}
.panel_desc {
margin: 8px 0;
font-size: 14px;
color: #666;
}
}
.panel_content {
height: 100%;
.panel {
height: calc(100% - 51px);
}
:deep(.panel_tabs) {
.el-tabs__header {
margin-bottom: 8px;
}
.el-tabs__nav-scroll {
// margin: 0 16px;
}
}
:deep(.table_tool_wrap) {
.table-tools {
.tools_search {
padding-top: 4px;
}
}
}
.tools_btns {
display: flex;
justify-content: space-between;
align-items: center;
padding: 4px 0 8px;
}
.table_panel_wrap {
width: 100%;
height: calc(100% - 40px);
padding: 4px 0 0;
&.panel {
height: calc(100% - 80px);
}
}
}
}
.tool_btns {
height: 44px;
margin: 0 -8px;
display: flex;
justify-content: center;
align-items: center;
border-top: 1px solid #d9d9d9;
}
}
}
</style>
......@@ -20,6 +20,290 @@ const userStore = useUserStore();
const userData = JSON.parse(userStore.userData);
const assetStore = useDataAssetStore();
const data1 = [
{
"children": [
{
"children": null,
"parentGuids": [
"c32ddd77191ff4afe149538ef4b2e0c3"
],
"guid": "9c92df55a19cdce88f61e20a8e1e8a65",
"tenantGuid": "9e5b9d7bfd8c4f4f8079e05de19bf7e0",
"organisationCode": "11150001",
"organisationName": "链享供应链运营一部",
"bizState": "Y",
"createTime": "2023-10-25 14:23:31",
"createUserName": "测试",
"parentGuid": "c32ddd77191ff4afe149538ef4b2e0c3",
"orderNum": 1,
"level": 2,
"levelCode": "1.1",
"displayCreateTime": "2023-10-25 14:23:31"
}
],
"parentGuids": null,
"guid": "c32ddd77191ff4afe149538ef4b2e0c3",
"tenantGuid": "9e5b9d7bfd8c4f4f8079e05de19bf7e0",
"organisationCode": "1115004",
"organisationName": "链享供应链",
"bizState": "Y",
"createTime": "2023-08-15 12:59:10",
"createUserName": "测试",
"parentGuid": "",
"orderNum": 2,
"level": 0,
"levelCode": "1",
"displayCreateTime": "2023-08-15 12:59:10"
},
{
"children": [
{
"children": [
{
"children": null,
"parentGuids": [
"e10332122834077907cd5ea61fa576c1",
"cdae7bb3cafb560482cad1b89a1e4b78"
],
"guid": "16ea472a155c07433a63220f2ae1afe9",
"tenantGuid": "9e5b9d7bfd8c4f4f8079e05de19bf7e0",
"organisationCode": "11160011",
"organisationName": "链享运营一部1组",
"bizState": "S",
"createTime": "2023-10-25 13:15:57",
"createUserName": "测试",
"parentGuid": "cdae7bb3cafb560482cad1b89a1e4b78",
"orderNum": 1,
"level": 2,
"levelCode": "2.1.1",
"displayCreateTime": "2023-10-25 13:15:57"
}
],
"parentGuids": [
"e10332122834077907cd5ea61fa576c1"
],
"guid": "cdae7bb3cafb560482cad1b89a1e4b78",
"tenantGuid": "9e5b9d7bfd8c4f4f8079e05de19bf7e0",
"organisationCode": "1116001",
"organisationName": "链享运营一部",
"bizState": "S",
"createTime": "2023-10-25 13:14:15",
"createUserName": "测试",
"parentGuid": "e10332122834077907cd5ea61fa576c1",
"orderNum": 1,
"level": 1,
"levelCode": "2.1",
"displayCreateTime": "2023-10-25 13:14:15"
},
{
"children": null,
"parentGuids": [
"e10332122834077907cd5ea61fa576c1"
],
"guid": "d98b44ffb35e4d17cf68f9a922e1c7b7",
"tenantGuid": "9e5b9d7bfd8c4f4f8079e05de19bf7e0",
"organisationCode": null,
"organisationName": "二部",
"bizState": "Y",
"createTime": "2023-10-26 09:45:36",
"createUserName": "测试",
"parentGuid": "e10332122834077907cd5ea61fa576c1",
"orderNum": 2,
"level": 1,
"levelCode": "2.2",
"displayCreateTime": "2023-10-26 09:45:36"
}
],
"parentGuids": null,
"guid": "e10332122834077907cd5ea61fa576c1",
"tenantGuid": "9e5b9d7bfd8c4f4f8079e05de19bf7e0",
"organisationCode": "1115005",
"organisationName": "链享医药",
"bizState": "Y",
"createTime": "2023-09-12 15:59:35",
"createUserName": "测试",
"parentGuid": null,
"orderNum": 3,
"level": 0,
"levelCode": "2",
"displayCreateTime": "2023-09-12 15:59:35"
},
{
"children": [
{
"children": null,
"parentGuids": [
"9bd46f0f4fcf429518fae6ecb4849a9e"
],
"guid": "870f23ae47e036eb88b35f726c31959b",
"tenantGuid": "9e5b9d7bfd8c4f4f8079e05de19bf7e0",
"organisationCode": null,
"organisationName": "运用三部",
"bizState": "Y",
"createTime": "2024-04-28 16:33:24",
"createUserName": "数往知来管理员",
"parentGuid": "9bd46f0f4fcf429518fae6ecb4849a9e",
"orderNum": 3,
"level": 1,
"levelCode": "3.3",
"displayCreateTime": "2024-04-28 16:33:24"
},
{
"children": null,
"parentGuids": [
"9bd46f0f4fcf429518fae6ecb4849a9e"
],
"guid": "e06049046241dd71b153f227dbe7f801",
"tenantGuid": "9e5b9d7bfd8c4f4f8079e05de19bf7e0",
"organisationCode": null,
"organisationName": "运营二部",
"bizState": "Y",
"createTime": "2023-11-14 16:01:50",
"createUserName": "数往知来管理员",
"parentGuid": "9bd46f0f4fcf429518fae6ecb4849a9e",
"orderNum": 40,
"level": 1,
"levelCode": "3.2",
"displayCreateTime": "2023-11-14 16:01:50"
},
{
"children": null,
"parentGuids": [
"9bd46f0f4fcf429518fae6ecb4849a9e"
],
"guid": "731cd185c868da8af48b492068ffaed4",
"tenantGuid": "9e5b9d7bfd8c4f4f8079e05de19bf7e0",
"organisationCode": null,
"organisationName": "运营一部",
"bizState": "Y",
"createTime": "2023-11-14 15:19:35",
"createUserName": "测试",
"parentGuid": "9bd46f0f4fcf429518fae6ecb4849a9e",
"orderNum": 41,
"level": 1,
"levelCode": "3.1",
"displayCreateTime": "2023-11-14 15:19:35"
}
],
"parentGuids": null,
"guid": "9bd46f0f4fcf429518fae6ecb4849a9e",
"tenantGuid": "9e5b9d7bfd8c4f4f8079e05de19bf7e0",
"organisationCode": null,
"organisationName": "药企服务事业部1",
"bizState": "Y",
"createTime": "2023-11-14 14:49:14",
"createUserName": "数往知来管理员",
"parentGuid": "",
"orderNum": 4,
"level": 0,
"levelCode": "3",
"displayCreateTime": "2023-11-14 14:49:14"
},
{
"children": [
{
"children": null,
"parentGuids": [
"23be149ea3167a3f7f2d383023336efe"
],
"guid": "e5f2b4958ee2d99309a41e0c6e1447c8",
"tenantGuid": "9e5b9d7bfd8c4f4f8079e05de19bf7e0",
"organisationCode": null,
"organisationName": "智能存储装备部",
"bizState": "Y",
"createTime": "2023-11-14 16:09:36",
"createUserName": "数往知来管理员",
"parentGuid": "23be149ea3167a3f7f2d383023336efe",
"orderNum": 51,
"level": 1,
"levelCode": "4.1",
"displayCreateTime": "2023-11-14 16:09:36"
}
],
"parentGuids": null,
"guid": "23be149ea3167a3f7f2d383023336efe",
"tenantGuid": "9e5b9d7bfd8c4f4f8079e05de19bf7e0",
"organisationCode": null,
"organisationName": "医药物联网事业部",
"bizState": "Y",
"createTime": "2023-11-14 15:11:35",
"createUserName": "数往知来管理员",
"parentGuid": "",
"orderNum": 5,
"level": 0,
"levelCode": "4",
"displayCreateTime": "2023-11-14 15:11:35"
},
{
"children": null,
"parentGuids": null,
"guid": "1d82e875163749ca9ae45809ec432ae8",
"tenantGuid": "9e5b9d7bfd8c4f4f8079e05de19bf7e0",
"organisationCode": null,
"organisationName": "财务管理中心",
"bizState": "S",
"createTime": "2023-11-14 15:14:07",
"createUserName": "数往知来管理员",
"parentGuid": "",
"orderNum": 6,
"level": 0,
"levelCode": "6",
"displayCreateTime": "2023-11-14 15:14:07"
},
{
"children": null,
"parentGuids": null,
"guid": "cd9e6a0c76102364a9e88b79b28b0b32",
"tenantGuid": "9e5b9d7bfd8c4f4f8079e05de19bf7e0",
"organisationCode": null,
"organisationName": "资产服务",
"bizState": "Y",
"createTime": "2024-08-14 11:40:33",
"createUserName": "数往知来管理员",
"parentGuid": "",
"orderNum": 7,
"level": 0,
"levelCode": "9",
"displayCreateTime": "2024-08-14 11:40:33"
},
{
"children": [
{
"children": null,
"parentGuids": [
"dac448b77fa35f798bb4a06d8fd86334"
],
"guid": "cb76777efe69182cfb2c75d41944553c",
"tenantGuid": "9e5b9d7bfd8c4f4f8079e05de19bf7e0",
"organisationCode": null,
"organisationName": "审批1",
"bizState": "Y",
"createTime": "2024-01-17 14:28:36",
"createUserName": "数往知来管理员",
"parentGuid": "dac448b77fa35f798bb4a06d8fd86334",
"orderNum": 100,
"level": 1,
"levelCode": "8.1",
"displayCreateTime": "2024-01-17 14:28:36"
}
],
"parentGuids": null,
"guid": "dac448b77fa35f798bb4a06d8fd86334",
"tenantGuid": "9e5b9d7bfd8c4f4f8079e05de19bf7e0",
"organisationCode": null,
"organisationName": "审批组织",
"bizState": "Y",
"createTime": "2024-01-16 11:38:24",
"createUserName": "数往知来管理员",
"parentGuid": "",
"orderNum": 99,
"level": 0,
"levelCode": "8",
"displayCreateTime": "2024-01-16 11:38:24"
}
]
const step = ref(0);
const selectIndex = ref(0);
const asideSearchInput = ref("");
......@@ -81,289 +365,7 @@ const treeInfo = ref({
nodeKey: 'guid',
expandedKey: [],
expandOnNodeClick: false,
data: [
{
"children": [
{
"children": null,
"parentGuids": [
"c32ddd77191ff4afe149538ef4b2e0c3"
],
"guid": "9c92df55a19cdce88f61e20a8e1e8a65",
"tenantGuid": "9e5b9d7bfd8c4f4f8079e05de19bf7e0",
"organisationCode": "11150001",
"organisationName": "链享供应链运营一部",
"bizState": "Y",
"createTime": "2023-10-25 14:23:31",
"createUserName": "测试",
"parentGuid": "c32ddd77191ff4afe149538ef4b2e0c3",
"orderNum": 1,
"level": 2,
"levelCode": "1.1",
"displayCreateTime": "2023-10-25 14:23:31"
}
],
"parentGuids": null,
"guid": "c32ddd77191ff4afe149538ef4b2e0c3",
"tenantGuid": "9e5b9d7bfd8c4f4f8079e05de19bf7e0",
"organisationCode": "1115004",
"organisationName": "链享供应链",
"bizState": "Y",
"createTime": "2023-08-15 12:59:10",
"createUserName": "测试",
"parentGuid": "",
"orderNum": 2,
"level": 0,
"levelCode": "1",
"displayCreateTime": "2023-08-15 12:59:10"
},
{
"children": [
{
"children": [
{
"children": null,
"parentGuids": [
"e10332122834077907cd5ea61fa576c1",
"cdae7bb3cafb560482cad1b89a1e4b78"
],
"guid": "16ea472a155c07433a63220f2ae1afe9",
"tenantGuid": "9e5b9d7bfd8c4f4f8079e05de19bf7e0",
"organisationCode": "11160011",
"organisationName": "链享运营一部1组",
"bizState": "S",
"createTime": "2023-10-25 13:15:57",
"createUserName": "测试",
"parentGuid": "cdae7bb3cafb560482cad1b89a1e4b78",
"orderNum": 1,
"level": 2,
"levelCode": "2.1.1",
"displayCreateTime": "2023-10-25 13:15:57"
}
],
"parentGuids": [
"e10332122834077907cd5ea61fa576c1"
],
"guid": "cdae7bb3cafb560482cad1b89a1e4b78",
"tenantGuid": "9e5b9d7bfd8c4f4f8079e05de19bf7e0",
"organisationCode": "1116001",
"organisationName": "链享运营一部",
"bizState": "S",
"createTime": "2023-10-25 13:14:15",
"createUserName": "测试",
"parentGuid": "e10332122834077907cd5ea61fa576c1",
"orderNum": 1,
"level": 1,
"levelCode": "2.1",
"displayCreateTime": "2023-10-25 13:14:15"
},
{
"children": null,
"parentGuids": [
"e10332122834077907cd5ea61fa576c1"
],
"guid": "d98b44ffb35e4d17cf68f9a922e1c7b7",
"tenantGuid": "9e5b9d7bfd8c4f4f8079e05de19bf7e0",
"organisationCode": null,
"organisationName": "二部",
"bizState": "Y",
"createTime": "2023-10-26 09:45:36",
"createUserName": "测试",
"parentGuid": "e10332122834077907cd5ea61fa576c1",
"orderNum": 2,
"level": 1,
"levelCode": "2.2",
"displayCreateTime": "2023-10-26 09:45:36"
}
],
"parentGuids": null,
"guid": "e10332122834077907cd5ea61fa576c1",
"tenantGuid": "9e5b9d7bfd8c4f4f8079e05de19bf7e0",
"organisationCode": "1115005",
"organisationName": "链享医药",
"bizState": "Y",
"createTime": "2023-09-12 15:59:35",
"createUserName": "测试",
"parentGuid": null,
"orderNum": 3,
"level": 0,
"levelCode": "2",
"displayCreateTime": "2023-09-12 15:59:35"
},
{
"children": [
{
"children": null,
"parentGuids": [
"9bd46f0f4fcf429518fae6ecb4849a9e"
],
"guid": "870f23ae47e036eb88b35f726c31959b",
"tenantGuid": "9e5b9d7bfd8c4f4f8079e05de19bf7e0",
"organisationCode": null,
"organisationName": "运用三部",
"bizState": "Y",
"createTime": "2024-04-28 16:33:24",
"createUserName": "数往知来管理员",
"parentGuid": "9bd46f0f4fcf429518fae6ecb4849a9e",
"orderNum": 3,
"level": 1,
"levelCode": "3.3",
"displayCreateTime": "2024-04-28 16:33:24"
},
{
"children": null,
"parentGuids": [
"9bd46f0f4fcf429518fae6ecb4849a9e"
],
"guid": "e06049046241dd71b153f227dbe7f801",
"tenantGuid": "9e5b9d7bfd8c4f4f8079e05de19bf7e0",
"organisationCode": null,
"organisationName": "运营二部",
"bizState": "Y",
"createTime": "2023-11-14 16:01:50",
"createUserName": "数往知来管理员",
"parentGuid": "9bd46f0f4fcf429518fae6ecb4849a9e",
"orderNum": 40,
"level": 1,
"levelCode": "3.2",
"displayCreateTime": "2023-11-14 16:01:50"
},
{
"children": null,
"parentGuids": [
"9bd46f0f4fcf429518fae6ecb4849a9e"
],
"guid": "731cd185c868da8af48b492068ffaed4",
"tenantGuid": "9e5b9d7bfd8c4f4f8079e05de19bf7e0",
"organisationCode": null,
"organisationName": "运营一部",
"bizState": "Y",
"createTime": "2023-11-14 15:19:35",
"createUserName": "测试",
"parentGuid": "9bd46f0f4fcf429518fae6ecb4849a9e",
"orderNum": 41,
"level": 1,
"levelCode": "3.1",
"displayCreateTime": "2023-11-14 15:19:35"
}
],
"parentGuids": null,
"guid": "9bd46f0f4fcf429518fae6ecb4849a9e",
"tenantGuid": "9e5b9d7bfd8c4f4f8079e05de19bf7e0",
"organisationCode": null,
"organisationName": "药企服务事业部1",
"bizState": "Y",
"createTime": "2023-11-14 14:49:14",
"createUserName": "数往知来管理员",
"parentGuid": "",
"orderNum": 4,
"level": 0,
"levelCode": "3",
"displayCreateTime": "2023-11-14 14:49:14"
},
{
"children": [
{
"children": null,
"parentGuids": [
"23be149ea3167a3f7f2d383023336efe"
],
"guid": "e5f2b4958ee2d99309a41e0c6e1447c8",
"tenantGuid": "9e5b9d7bfd8c4f4f8079e05de19bf7e0",
"organisationCode": null,
"organisationName": "智能存储装备部",
"bizState": "Y",
"createTime": "2023-11-14 16:09:36",
"createUserName": "数往知来管理员",
"parentGuid": "23be149ea3167a3f7f2d383023336efe",
"orderNum": 51,
"level": 1,
"levelCode": "4.1",
"displayCreateTime": "2023-11-14 16:09:36"
}
],
"parentGuids": null,
"guid": "23be149ea3167a3f7f2d383023336efe",
"tenantGuid": "9e5b9d7bfd8c4f4f8079e05de19bf7e0",
"organisationCode": null,
"organisationName": "医药物联网事业部",
"bizState": "Y",
"createTime": "2023-11-14 15:11:35",
"createUserName": "数往知来管理员",
"parentGuid": "",
"orderNum": 5,
"level": 0,
"levelCode": "4",
"displayCreateTime": "2023-11-14 15:11:35"
},
{
"children": null,
"parentGuids": null,
"guid": "1d82e875163749ca9ae45809ec432ae8",
"tenantGuid": "9e5b9d7bfd8c4f4f8079e05de19bf7e0",
"organisationCode": null,
"organisationName": "财务管理中心",
"bizState": "S",
"createTime": "2023-11-14 15:14:07",
"createUserName": "数往知来管理员",
"parentGuid": "",
"orderNum": 6,
"level": 0,
"levelCode": "6",
"displayCreateTime": "2023-11-14 15:14:07"
},
{
"children": null,
"parentGuids": null,
"guid": "cd9e6a0c76102364a9e88b79b28b0b32",
"tenantGuid": "9e5b9d7bfd8c4f4f8079e05de19bf7e0",
"organisationCode": null,
"organisationName": "资产服务",
"bizState": "Y",
"createTime": "2024-08-14 11:40:33",
"createUserName": "数往知来管理员",
"parentGuid": "",
"orderNum": 7,
"level": 0,
"levelCode": "9",
"displayCreateTime": "2024-08-14 11:40:33"
},
{
"children": [
{
"children": null,
"parentGuids": [
"dac448b77fa35f798bb4a06d8fd86334"
],
"guid": "cb76777efe69182cfb2c75d41944553c",
"tenantGuid": "9e5b9d7bfd8c4f4f8079e05de19bf7e0",
"organisationCode": null,
"organisationName": "审批1",
"bizState": "Y",
"createTime": "2024-01-17 14:28:36",
"createUserName": "数往知来管理员",
"parentGuid": "dac448b77fa35f798bb4a06d8fd86334",
"orderNum": 100,
"level": 1,
"levelCode": "8.1",
"displayCreateTime": "2024-01-17 14:28:36"
}
],
"parentGuids": null,
"guid": "dac448b77fa35f798bb4a06d8fd86334",
"tenantGuid": "9e5b9d7bfd8c4f4f8079e05de19bf7e0",
"organisationCode": null,
"organisationName": "审批组织",
"bizState": "Y",
"createTime": "2024-01-16 11:38:24",
"createUserName": "数往知来管理员",
"parentGuid": "",
"orderNum": 99,
"level": 0,
"levelCode": "8",
"displayCreateTime": "2024-01-16 11:38:24"
}
],
data: data1 || [],
});
const expand1 = ref(true)
......@@ -436,6 +438,8 @@ const tableInfo = ref({
const metadataTableInfo = ref({
id: "metadata-table",
multiple: true,
rowKey: 'guid',
fields: [
{ label: "序号", type: "index", width: 56, align: "center", fixed: "left" },
{ label: "数据库名称", field: "damCode", width: 200 },
......
<route lang="yaml">
name: taskLog //分类分级任务日志
</route>
<script lang="ts" setup name="taskLog">
import { ref, onMounted } from "vue";
import { useRouter, useRoute } from "vue-router";
import useUserStore from "@/store/modules/user";
import { ElMessage, ElMessageBox } from "element-plus";
import useDataAssetStore from "@/store/modules/dataAsset";
import { getListingList, listingDelete, listingUpdateStatus, filterVal, getParamsDataList } from "@/api/modules/dataProduct";
import { TableColumnWidth } from '@/utils/enum';
import Table from "@/components/Table/index.vue";
const { proxy } = getCurrentInstance() as any;
const router = useRouter();
const userStore = useUserStore();
const userData = JSON.parse(userStore.userData);
const assetStore = useDataAssetStore();
const datas = [
{
"updateTime": "2024-07-16 13:17:00",
"updateUserName": "数往知来管理员",
"guid": "4e0e76c48fa043d5b35d09f3ccc7c265",
"approvalGuid": null,
"standardSetGuid": "58d1178a04904d599284fc1e61594c43",
"fieldStandardCode": "COL202406070021",
"dataVersion": 1,
"chName": "地址",
"enName": "address",
"dataTypeValue": "字符型",
"dataTypeCode": "varchar",
"dataDicGuid": "",
"dataDicName": null,
"isDataDic": "N",
"fieldLength": 600,
"fieldPrecision": null,
"dataState": 0,
"approveState": "N",
"dataCategory": "合伙人",
"dataEncryptionLevel": "界面加密",
"businessDefDesc": "地址",
"flowFlag": null,
"flowCode": null,
"functionCode": null,
"createStaffGuid": null,
"createUserId": "98df01b8d86c46f786dd10b4d0eb11dd",
"displayVersion": "V1",
"standardSetName": null,
"ruleType": null
},
{
"updateTime": "2024-01-27 10:19:45",
"updateUserName": "数往知来管理员",
"guid": "bc630207357c466dbff7613ea38985cc",
"approvalGuid": null,
"standardSetGuid": "58d1178a04904d599284fc1e61594c43",
"fieldStandardCode": "COL202401260124",
"dataVersion": 1,
"chName": "包含最小销售包装单元数量",
"enName": "inboxQuantity",
"dataTypeValue": "整型",
"dataTypeCode": "int",
"dataDicGuid": null,
"dataDicName": null,
"isDataDic": null,
"fieldLength": null,
"fieldPrecision": null,
"dataState": 1,
"approveState": "A",
"dataCategory": null,
"dataEncryptionLevel": "明文显示",
"businessDefDesc": "当前药品追溯码中包含的最小销售包装单元药品追溯码的数量,发货类型为03时可选",
"flowFlag": null,
"flowCode": null,
"functionCode": null,
"createStaffGuid": null,
"createUserId": "98df01b8d86c46f786dd10b4d0eb11dd",
"displayVersion": "V1",
"standardSetName": null,
"ruleType": null
},
{
"updateTime": "2024-01-27 11:03:59",
"updateUserName": "审批人4",
"guid": "420f2a68bd4441bf92010eadf698b685",
"approvalGuid": null,
"standardSetGuid": "58d1178a04904d599284fc1e61594c43",
"fieldStandardCode": "COL202401260122",
"dataVersion": 1,
"chName": "包装层级",
"enName": "packageLevel",
"dataTypeValue": "字符型",
"dataTypeCode": "varchar",
"dataDicGuid": null,
"dataDicName": null,
"isDataDic": null,
"fieldLength": 200,
"fieldPrecision": null,
"dataState": 1,
"approveState": "A",
"dataCategory": null,
"dataEncryptionLevel": "明文显示",
"businessDefDesc": "当前药品追溯码所处包装层级描述,发货类型为03时可选",
"flowFlag": null,
"flowCode": null,
"functionCode": null,
"createStaffGuid": null,
"createUserId": "98df01b8d86c46f786dd10b4d0eb11dd",
"displayVersion": "V1",
"standardSetName": null,
"ruleType": null
},
{
"updateTime": "2024-06-06 10:01:06",
"updateUserName": "审批人1",
"guid": "f841e1848ab94b1e81a0217a09a7a3d3",
"approvalGuid": "b674bffe8d2f4132918016b6baaf75aa",
"standardSetGuid": "58d1178a04904d599284fc1e61594c43",
"fieldStandardCode": "COL202401260120",
"dataVersion": 1,
"chName": "上一级包装药品追溯码",
"enName": "parentDTC",
"dataTypeValue": "字符型",
"dataTypeCode": "varchar",
"dataDicGuid": "",
"dataDicName": null,
"isDataDic": "N",
"fieldLength": 200,
"fieldPrecision": null,
"dataState": 1,
"approveState": "Y",
"dataCategory": "",
"dataEncryptionLevel": "明文显示",
"businessDefDesc": "当前药品追溯码大一级包装上的药品追溯码,发货类型为03时可选;当存在上一级包装时必选",
"flowFlag": null,
"flowCode": null,
"functionCode": null,
"createStaffGuid": null,
"createUserId": "98df01b8d86c46f786dd10b4d0eb11dd",
"displayVersion": "V1",
"standardSetName": null,
"ruleType": null
},
{
"updateTime": "2024-01-26 00:10:47",
"updateUserName": "数往知来管理员",
"guid": "d4d42dea2a5844b4a7f9238806ea507b",
"approvalGuid": null,
"standardSetGuid": "58d1178a04904d599284fc1e61594c43",
"fieldStandardCode": "COL202401260118",
"dataVersion": 1,
"chName": "药品追溯码",
"enName": "DTC",
"dataTypeValue": "字符型",
"dataTypeCode": "varchar",
"dataDicGuid": null,
"dataDicName": null,
"isDataDic": null,
"fieldLength": 200,
"fieldPrecision": null,
"dataState": 0,
"approveState": "N",
"dataCategory": null,
"dataEncryptionLevel": "明文显示",
"businessDefDesc": "用于唯一标识药品各级销售包装单元的代码,发货类型为03时可选",
"flowFlag": null,
"flowCode": null,
"functionCode": null,
"createStaffGuid": null,
"createUserId": "98df01b8d86c46f786dd10b4d0eb11dd",
"displayVersion": "V1",
"standardSetName": null,
"ruleType": null
},
{
"updateTime": "2024-01-26 00:10:47",
"updateUserName": "数往知来管理员",
"guid": "ff9d0e4f6fbb444c8dcf6f67bffcb659",
"approvalGuid": null,
"standardSetGuid": "58d1178a04904d599284fc1e61594c43",
"fieldStandardCode": "COL202401260116",
"dataVersion": 1,
"chName": "发货数量",
"enName": "deliveryQuantity",
"dataTypeValue": "整型",
"dataTypeCode": "int",
"dataDicGuid": null,
"dataDicName": null,
"isDataDic": null,
"fieldLength": null,
"fieldPrecision": null,
"dataState": 0,
"approveState": "N",
"dataCategory": null,
"dataEncryptionLevel": "明文显示",
"businessDefDesc": "发货的最小销售包装单元数量",
"flowFlag": null,
"flowCode": null,
"functionCode": null,
"createStaffGuid": null,
"createUserId": "98df01b8d86c46f786dd10b4d0eb11dd",
"displayVersion": "V1",
"standardSetName": null,
"ruleType": null
},
{
"updateTime": "2024-01-26 00:10:46",
"updateUserName": "数往知来管理员",
"guid": "fe88ac9e8d9c4f148833dbb3976fca77",
"approvalGuid": null,
"standardSetGuid": "58d1178a04904d599284fc1e61594c43",
"fieldStandardCode": "COL202401260114",
"dataVersion": 1,
"chName": "药品生产批号",
"enName": "batch",
"dataTypeValue": "字符型",
"dataTypeCode": "varchar",
"dataDicGuid": null,
"dataDicName": null,
"isDataDic": null,
"fieldLength": 20,
"fieldPrecision": null,
"dataState": 0,
"approveState": "N",
"dataCategory": null,
"dataEncryptionLevel": "明文显示",
"businessDefDesc": "药品包装上标示的生产批号",
"flowFlag": null,
"flowCode": null,
"functionCode": null,
"createStaffGuid": null,
"createUserId": "98df01b8d86c46f786dd10b4d0eb11dd",
"displayVersion": "V1",
"standardSetName": null,
"ruleType": null
},
{
"updateTime": "2024-01-26 00:10:45",
"updateUserName": "数往知来管理员",
"guid": "9759837e0d72472ab7441c1873c9159a",
"approvalGuid": null,
"standardSetGuid": "58d1178a04904d599284fc1e61594c43",
"fieldStandardCode": "COL202401260112",
"dataVersion": 1,
"chName": "药品有效期截止日期",
"enName": "expirationDate",
"dataTypeValue": "日期型",
"dataTypeCode": "date",
"dataDicGuid": null,
"dataDicName": null,
"isDataDic": null,
"fieldLength": null,
"fieldPrecision": null,
"dataState": 0,
"approveState": "N",
"dataCategory": null,
"dataEncryptionLevel": "明文显示",
"businessDefDesc": "药品有效期的截止日期",
"flowFlag": null,
"flowCode": null,
"functionCode": null,
"createStaffGuid": null,
"createUserId": "98df01b8d86c46f786dd10b4d0eb11dd",
"displayVersion": "V1",
"standardSetName": null,
"ruleType": null
},
{
"updateTime": "2024-01-26 00:10:45",
"updateUserName": "数往知来管理员",
"guid": "a39ed6123c6a420d9d1265315e714f86",
"approvalGuid": null,
"standardSetGuid": "58d1178a04904d599284fc1e61594c43",
"fieldStandardCode": "COL202401260110",
"dataVersion": 1,
"chName": "药品生产日期",
"enName": "productionDate",
"dataTypeValue": "日期型",
"dataTypeCode": "date",
"dataDicGuid": null,
"dataDicName": null,
"isDataDic": null,
"fieldLength": null,
"fieldPrecision": null,
"dataState": 0,
"approveState": "N",
"dataCategory": null,
"dataEncryptionLevel": "明文显示",
"businessDefDesc": "药品包装上标示的生产日期",
"flowFlag": null,
"flowCode": null,
"functionCode": null,
"createStaffGuid": null,
"createUserId": "98df01b8d86c46f786dd10b4d0eb11dd",
"displayVersion": "V1",
"standardSetName": null,
"ruleType": null
},
{
"updateTime": "2024-01-26 00:10:45",
"updateUserName": "数往知来管理员",
"guid": "ea597c1b8bb24a5ab053a80b084de98c",
"approvalGuid": null,
"standardSetGuid": "58d1178a04904d599284fc1e61594c43",
"fieldStandardCode": "COL202401260108",
"dataVersion": 1,
"chName": "统一社会信用代码(进口药品代理企业)",
"enName": "drugImporterUSCID",
"dataTypeValue": "字符型",
"dataTypeCode": "varchar",
"dataDicGuid": null,
"dataDicName": null,
"isDataDic": null,
"fieldLength": 18,
"fieldPrecision": null,
"dataState": 0,
"approveState": "N",
"dataCategory": null,
"dataEncryptionLevel": "明文显示",
"businessDefDesc": "进口药品代理企业的统一社会信用代码,进口药品必选;没有统一社会信用代码时使用组织机构代码",
"flowFlag": null,
"flowCode": null,
"functionCode": null,
"createStaffGuid": null,
"createUserId": "98df01b8d86c46f786dd10b4d0eb11dd",
"displayVersion": "V1",
"standardSetName": null,
"ruleType": null
}
]
const page = ref({
limit: 50,
curr: 1,
sizes: [
{ label: "10", value: 10 },
{ label: "50", value: 50 },
{ label: "100", value: 100 },
{ label: "150", value: 150 },
{ label: "200", value: 200 },
],
});
const searchItemValue: any = ref({});
const currTableData: any = ref({});
const tableInfo = ref({
id: "mapping-table",
fields: [
{ label: "序号", type: "index", width: 56, align: "center", fixed: "left" },
{ label: "任务名称", field: "chName", width: 96 },
{
label: "目录名称", field: "dataTypeValue", width: 120, type: "text_btn", columClass: 'text_btn', click: (scope) => {
router.push({
name: "templateConfig",
query: { guid: scope.row.damGuid },
});
}
},
{ label: "分类分级模板", field: "dataTypeValue", width: 200 },
{ label: "元数据", field: "fieldStandardCode", width: 200 },
// {
// label: "是否公共数据", field: "isPublicData", width: 120, getName: (scope) => {
// return scope.row.isPublicData == 'Y' ? '是' : '否';
// }
// },
{
label: "执行状态", field: "approveState", width: TableColumnWidth.STATE, align: 'center', type: "tag", getName: (scope) => {
return filterVal(scope.row.approveState, 'approveState');
}
},
{ label: "任务修改人", field: "dataCategory", width: 120 },
{ label: "修改时间", field: "updateTime", width: TableColumnWidth.DATETIME },
{ label: "确认次数", field: "fieldLength", width: 96, align: 'right' },
{ label: "结果确认人", field: "updateUserName", width: 120 },
{ label: "确认时间", field: "updateTime", width: TableColumnWidth.DATETIME },
{
label: "结果状态", field: "approveState", width: TableColumnWidth.STATE, align: 'center', type: "tag", getName: (scope) => {
return filterVal(scope.row.approveState, 'approveState');
}
},
],
loading: false,
data: datas || [],
page: {
type: "normal",
rows: 0,
...page.value,
},
actionInfo: {
label: "操作",
type: "btn",
width: 280,
btns: (scope) => {
let row = scope.row, btnArr: any = [
{ label: "结果确认", value: "confirm" },
{ label: "结果修改", value: "modify" },
{ label: "编辑", value: "edit" },
{ label: "日志", value: "log" },
{ label: "删除", value: "delete" }
];
// if (row.approveState == 'Y') {
// if (row.listingStatus == 'Y') {
// btnArr.splice(0, 0, { label: "详情", value: "detail" });
// } else {
// btnArr.splice(0, 0, { label: "编辑", value: "edit" }, { label: "详情", value: "detail" }, { label: "删除", value: "delete" });
// }
// } else {
// if (row.approveState == 'A') {
// btnArr.splice(0, 0, { label: "详情", value: "detail" });
// } else {
// btnArr.splice(0, 0, { label: "编辑", value: "edit" }, { label: "详情", value: "detail" }, { label: "删除", value: "delete" });
// }
// }
return btnArr;
},
},
});
const getTableData = () => {
tableInfo.value.loading = true;
getListingList(
Object.assign({}, searchItemValue.value, {
pageIndex: page.value.curr,
pageSize: page.value.limit,
})
).then((res: any) => {
tableInfo.value.loading = false;
tableInfo.value.data = res.data.records || [];
tableInfo.value.page.curr = res.data.pageIndex;
tableInfo.value.page.limit = res.data.pageSize;
tableInfo.value.page.rows = res.data.totalRows;
})
.catch((res) => {
tableInfo.value.loading = false;
});
};
const tableBtnClick = (scope, btn) => {
const type = btn.value;
const row = scope.row;
currTableData.value = row;
if (type == "detail" || type === "edit") {
toPath(type);
} else if (type === "delete") {
open("此操作将永久删除,是否继续?", "warning");
}
};
const toPath = (type) => {
if (type == 'add') {
router.push({
name: "taskEdit",
query: {
type
},
});
} else {
router.push({
name: "taskEdit",
query: {
guid: currTableData.value.guid,
name: currTableData.value.damName,
type
},
});
}
}
const tablePageChange = (info) => {
page.value.curr = Number(info.curr);
page.value.limit = Number(info.limit);
tableInfo.value.page.limit = page.value.limit;
tableInfo.value.page.curr = page.value.curr;
getTableData();
};
const open = (msg, type, isBatch = false) => {
ElMessageBox.confirm(msg, "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: type,
}).then(() => {
const guids = [currTableData.value.guid];
listingDelete(guids).then((res: any) => {
if (res.code == proxy.$passCode) {
getFirstPageData();
ElMessage({
type: "success",
message: "删除成功",
});
} else {
ElMessage({
type: "error",
message: res.msg,
});
}
}).catch((res) => {
tableInfo.value.loading = false;
});
});
};
const getFirstPageData = () => {
page.value.curr = 1
tableInfo.value.page.curr = 1;
getTableData();
}
onActivated(() => {
if (assetStore.isRefresh) {//如果是首次加载,则不需要调用
getFirstPageData();
assetStore.set(false);
}
})
onBeforeMount(() => {
})
</script>
<template>
<div class="container_wrap" v-if="tableInfo.data.length">
<div class="table_tool_wrap">
<div class="table_title">分类分级任务</div>
</div>
<div class="table_panel_wrap">
<Table :tableInfo="tableInfo" @tableBtnClick="tableBtnClick" @tablePageChange="tablePageChange" />
</div>
</div>
<div class="container_wrap" v-else>
<div class="card-noData">
<img src="@/assets/images/no-data.png" :style="{ width: '96px', height: '96px' }" />
<p>暂无分类分级任务,<span class="text_btn" @click="toPath('add')">去新建</span></p>
</div>
</div>
</template>
<style scoped lang="scss">
.table_tool_wrap {
width: 100%;
height: 40px !important;
padding: 0 8px;
.table_title {
height: 40px;
line-height: 40px;
font-weight: 600;
font-size: 16px;
color: #212121;
}
}
.table_panel_wrap {
width: 100%;
height: calc(100% - 40px);
padding: 0px 8px 0;
}
.card-noData {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
display: flex;
flex-direction: column;
align-items: center;
}
</style>
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!