abc5146e by lxs

分类分级任务联调

1 parent d9e56607
......@@ -277,8 +277,8 @@ export const cgTaskDelete = (data) => request({
// 手动执行任务
export const runExecTask = (data) => request({
url: `${import.meta.env.VITE_APP_CHECK_BASEURL}/cg-task/exec-task`,
method: 'put',
data
method: 'post',
params: data
})
// 分类分级任务日志
......@@ -288,6 +288,47 @@ export const getTaskExecPageList = (data) => request({
data
})
// 分类分级任务执行树形数据
export const getTaskExeTreeList = (data) => request({
url: `${import.meta.env.VITE_APP_CHECK_BASEURL}/cg-task-exec/classify/tree-list`,
method: 'get',
params: data
})
// 分类分级任务执行字段统计
export const getTaskFieldCount = (data) => request({
url: `${import.meta.env.VITE_APP_CHECK_BASEURL}/cg-task-exec-result/confirm-field-cnt`,
method: 'get',
params: data
})
// 分类分级任务执行字段查询
export const execTaskFieldList = (data) => request({
url: `${import.meta.env.VITE_APP_CHECK_BASEURL}/cg-task-exec-result/confirm-field-list-query`,
method: 'post',
data
})
// 分类分级任务执行库表查询
export const execTaskSheetList = (data) => request({
url: `${import.meta.env.VITE_APP_CHECK_BASEURL}/cg-task-exec-result/confirm-db-list-query`,
method: 'post',
data
})
// 分类分级任务执行任务确认
export const execTaskConfirm = (data) => request({
url: `${import.meta.env.VITE_APP_CHECK_BASEURL}/cg-task-exec-result/confirm-task`,
method: 'post',
data
})
// 分类分级任务执行字段确认
export const execFieldConfirm = (data) => request({
url: `${import.meta.env.VITE_APP_CHECK_BASEURL}/cg-task-exec-result/confirm-field`,
method: 'post',
data
})
// 标签规则-分页
export const getCgLabelPageList = (data) => request({
url: `${import.meta.env.VITE_APP_CHECK_BASEURL}/cg-label/page-list`,
......@@ -334,6 +375,18 @@ export const filterVal = (val, type) => {
status = '--';
break;
}
} else if(type == 'isCgChange'){
switch (val) {
case 'N':
status = '待确认';
break;
case 'Y':
status = '已确认';
break;
default:
status = '待确认';
break;
}
}
return status;
}
......
......@@ -3,7 +3,17 @@ import { computed, reactive, ref } from 'vue'
import { Search } from '@element-plus/icons-vue'
import type { FormInstance, FormRules } from 'element-plus'
import { debounce } from "@/utils/common"
const emits = defineEmits(["tableSearch", "toolFilterChange", "loadMore","remoteMethod","treeSelectLoad","selectChange","treeSelectNodeChange","treeSelectNodeClick"]);
const emits = defineEmits([
"tableSearch",
"toolFilterChange",
"loadMore",
"remoteMethod",
"treeSelectLoad",
"selectChange",
"treeSelectNodeChange",
"treeSelectNodeClick",
"cascaderChange",
]);
const props = defineProps({
itemList: {
type: Array,
......@@ -19,6 +29,7 @@ const props = defineProps({
}
})
const formRef = ref()
const formCascaderRef = ref();
const formInline: any = computed(() => {
let items = setFormFields(props.itemList);
return reactive(items);
......@@ -34,9 +45,16 @@ const resetForm = (formEl: FormInstance | undefined) => {
emits('tableSearch', form, true)
})
}
const getCascaderCheckedData = () => {
const formCascader = formCascaderRef.value[0] || formCascaderRef.value;
const data = formCascader.getCheckedNodes();
return data;
};
defineExpose({
formInline,
formRef
formRef,
getCascaderCheckedData
})
const setFormFields = (list: any) => {
let obj = {}
......@@ -68,10 +86,13 @@ const selectChange = (val, row) => {
const handleTreeSelectNodeChange = (node, item) => {
emits("treeSelectNodeChange", node, item);
}
const handleTreeSelectNodeClick = (node, item)=>{
const handleTreeSelectNodeClick = (node, item) => {
emits("treeSelectNodeClick", node, item);
}
const inputChange = (val)=>{
const cascaderChange = (val, item) => {
emits("cascaderChange", val, item);
}
const inputChange = (val) => {
onSubmit()
}
onMounted(() => {
......@@ -86,58 +107,49 @@ onMounted(() => {
:class="{ 'width_auto': item.type == 'radio-button' }" :prop="item.field">
<template v-if="item.type == 'select'">
<el-select :class="{ 'is-multiple': item.multiple }" v-model="formInline[item.field]"
:placeholder="item.placeholder" :clearable="item.clearable" :filterable="item.filterable" @change="(val) => selectChange(val, item)">
<el-option v-for="opt in item.options" :label="item.props?.label ? opt[item.props.label] : opt.label" :value="item.props?.value ? opt[item.props.value] : opt.value" />
:placeholder="item.placeholder" :clearable="item.clearable" :filterable="item.filterable"
@change="(val) => selectChange(val, item)">
<el-option v-for="opt in item.options" :label="item.props?.label ? opt[item.props.label] : opt.label"
:value="item.props?.value ? opt[item.props.value] : opt.value" />
</el-select>
</template>
<template v-else-if="item.type == 'input-select'">
<el-input v-model.trim="formInline[item.field]" :placeholder="item.placeholder" class="input-with-select" :maxlength="item.maxlength ?? ''"
:suffix-icon="Search">
<el-input v-model.trim="formInline[item.field]" :placeholder="item.placeholder" class="input-with-select"
:maxlength="item.maxlength ?? ''" :suffix-icon="Search">
<template #prepend>
<span v-for="child in item.children">
<el-select v-model="formItemList[child.field]" :placeholder="child.placeholder"
:clearable="item.clearable" style="vertical-align: inherit;">
<el-option v-for="opts in child.options" :label="child.props?.label ? opts[item.props.label] : opts.label" :value="child.props?.value ? opts[item.props.value] : opts.value" />
<el-option v-for="opts in child.options"
:label="child.props?.label ? opts[item.props.label] : opts.label"
:value="child.props?.value ? opts[item.props.value] : opts.value" />
</el-select>
</span>
</template>
</el-input>
</template>
<template v-else-if="item.type=='tree-select'">
<template v-else-if="item.type == 'tree-select'">
<div class="select_slots_panel">
<div class="slot-prefix" v-for="child in item.children">
<el-select v-model="formInline[child.field]" :placeholder="child.placeholder" @change="(val) => selectChange(val, child)" >
<el-select v-model="formInline[child.field]" :placeholder="child.placeholder"
@change="(val) => selectChange(val, child)">
<el-option v-for="cpt in child.options" :label="cpt.label" :value="cpt.value" />
</el-select>
</div>
</div>
<div class="slot-default">
<el-tree-select
v-model="formInline[item.field]"
:data="item.options"
:placeholder="item.placeholder"
:clearable="item.clearable"
:filterable="item.filterable"
:disabled="item.disabled"
:lazy="item.lazy ?? true"
:check-strictly = "item.checkStrictly ?? false"
:node-key="item.nodeKey ?? 'guid'"
:load="(node, resolve) => treeSelectLoad(node, resolve, item)"
:props="item.props"
:multiple="item.multiple ?? false"
:render-after-expand="true"
:teleported="item.teleported ?? true"
:default-expanded-keys="item.expandKeys"
:collapse-tags-tooltip="item.collapseTagsTooltip ?? false"
:collapse-tags="item.collapseTags ?? false"
:max-collapse-tags="item.maxTags ?? 1"
:show-checkbox="item.showCheckbox ?? false"
@change="(val) => selectChange(val, item)"
@current-change="(node) => handleTreeSelectNodeChange(node, item)"
@node-click = "(node)=>handleTreeSelectNodeClick(node, item)"
>
</div>
<div class="slot-default">
<el-tree-select v-model="formInline[item.field]" :data="item.options" :placeholder="item.placeholder"
:clearable="item.clearable" :filterable="item.filterable" :disabled="item.disabled"
:lazy="item.lazy ?? true" :check-strictly="item.checkStrictly ?? false" :node-key="item.nodeKey ?? 'guid'"
:load="(node, resolve) => treeSelectLoad(node, resolve, item)" :props="item.props"
:multiple="item.multiple ?? false" :render-after-expand="true" :teleported="item.teleported ?? true"
:default-expanded-keys="item.expandKeys" :collapse-tags-tooltip="item.collapseTagsTooltip ?? false"
:collapse-tags="item.collapseTags ?? false" :max-collapse-tags="item.maxTags ?? 1"
:show-checkbox="item.showCheckbox ?? false" @change="(val) => selectChange(val, item)"
@current-change="(node) => handleTreeSelectNodeChange(node, item)"
@node-click="(node) => handleTreeSelectNodeClick(node, item)">
<!-- <template #default="{ node, data }">
<!-- <template #default="{ node, data }">
<template v-if="item.getName">
<div
class="left-code"
......@@ -153,10 +165,10 @@ onMounted(() => {
{{ item.getName(data, node) }}
</div>
</template>
<span v-else>{{ data[item.props.label] }}</span>
</template> -->
</el-tree-select>
</div>
<span v-else>{{ data[item.props.label] }}</span>
</template> -->
</el-tree-select>
</div>
</template>
<template v-else-if="item.type == 'date-time'">
......@@ -178,13 +190,21 @@ onMounted(() => {
<div class="slot-default">
<el-select :class="{ 'is-multiple': item.multiple }" v-model="formInline[item.field]"
:placeholder="item.placeholder" :multiple="item.multiple" collapse-tags collapse-tags-tooltip
@change="(val) => selectChange(val, item)"
:max-collapse-tags="3" :filterable="item.filterable" :clearable="item.clearable" v-loadmore="loadMore">
@change="(val) => selectChange(val, item)" :max-collapse-tags="3" :filterable="item.filterable"
:clearable="item.clearable" v-loadmore="loadMore">
<el-option v-for="opt in item.options" :label="opt.label" :value="opt.value" />
</el-select>
</div>
</div>
</template>
<template v-else-if="item.type == 'cascader'">
<el-cascader ref="formCascaderRef" :class="[item.col, { is_block: item.block }]"
v-model="formInline[item.field]" :options="item.options" :props="item.props" :placeholder="item.placeholder"
:show-all-levels="item.showAllLevels ?? true" :clearable="item.clearable"
:filterable="item.filterable ?? false" :collapse-tags="item.collapse ?? false"
:collapse-tags-tooltip="item.tagsTooltip ?? false" :max-collapse-tags="item.maxTags ?? 1"
:disabled="item.disabled ?? false" @change="(val) => cascaderChange(val, item)" />
</template>
<template v-else>
<el-input v-model.trim="formInline[item.field]" :placeholder="item.placeholder" :clearable="item.clearable"
@clear="inputChange" />
......
<script lang="ts" setup name="TableTools">
import TableSearch from './table_search.vue'
const emits = defineEmits(["search", "filterChange","loadMore","remoteMethod","treeSelectLoad","selectChange","treeSelectNodeChange","treeSelectNodeClick"]);
const emits = defineEmits(["search", "filterChange","loadMore","remoteMethod","treeSelectLoad","selectChange","treeSelectNodeChange","treeSelectNodeClick","cascaderChange"]);
const props = defineProps({
searchItems: {
type: Array,
......@@ -53,6 +53,14 @@ const handleTreeSelectNodeChange = (node, item) => {
const treeSelectNodeClick = (node, item)=>{
emits("treeSelectNodeClick", node, item);
}
const cascaderChange = (val, item) => {
emits("cascaderChange", val, item);
}
const getCascaderCheckedData = ()=>{
return toolSearch.value.getCascaderCheckedData();
}
defineExpose({
toolSearch,
})
......@@ -61,14 +69,15 @@ defineExpose({
<template>
<div class="table-tools">
<div class="tools_search">
<TableSearch ref="toolSearch" :itemList="itemList" :init="props.init??true"
:formId="formId"
@tableSearch="tableSearch"
<TableSearch ref="toolSearch" :itemList="itemList" :init="props.init??true"
:formId="formId"
@tableSearch="tableSearch"
@toolFilterChange="toolFilterChange" @loadMore="loadMore"
@treeSelectLoad="treeSelectLoad"
@selectChange="selectChange"
@treeSelectNodeChange="handleTreeSelectNodeChange"
@treeSelectNodeClick="treeSelectNodeClick"
@cascaderChange="cascaderChange"
/>
</div>
<div class="tools_bar" v-if="bars?.length">
......
......@@ -74,15 +74,8 @@ const routes: RouteRecordRaw[] = [
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',
......@@ -119,7 +112,7 @@ const routes: RouteRecordRaw[] = [
},
beforeEnter: (to, from) => {
if (to.query.classStandardName) {
to.meta.title = `编辑-${to.query.classStandardName}`;
to.meta.title = `编辑-${to.query.classStandardName}`;
}
}
},
......
......@@ -33,7 +33,7 @@ const useUserStore = defineStore(
function getToken(data, state) {
data.platformGuid = "7f16f697aec111ef8656fa163e60becd";
data.userType = 2;
data.validateUri = location.origin + '/';
data.validateUri = location.origin == 'http://localhost:9000' ? 'http://localhost:9000/' : location.origin + '/';
return getTokenPromise.value = getTokenByCode(data).then((res: any) => {
getTokenPromise.value = null;
console.log(res);
......
......@@ -12,14 +12,13 @@ import useDataAssetStore from "@/store/modules/dataAsset";
import { filterVal, getCgTaskPageList, cgTaskDelete, runExecTask } from "@/api/modules/dataInventory";
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 loading = ref(false);
const page = ref({
limit: 50,
curr: 1,
......@@ -41,8 +40,8 @@ const tableInfo = ref({
{
label: "目录名称", field: "cgDirName", width: 120, type: "text_btn", columClass: 'text_btn', click: (scope) => {
router.push({
name: "templateConfig",
query: { guid: scope.row.damGuid },
name: "classifyGradeCatalogue",
// query: { guid: scope.row.damGuid },
});
}
},
......@@ -68,13 +67,8 @@ const tableInfo = ref({
}
},
],
loading: false,
data: [],
page: {
type: "normal",
rows: 0,
...page.value,
},
showPage: false,
actionInfo: {
label: "操作",
type: "btn",
......@@ -97,21 +91,18 @@ const tableInfo = ref({
});
const getTableData = () => {
tableInfo.value.loading = true;
loading.value = true;
getCgTaskPageList(
Object.assign({}, searchItemValue.value, {
pageIndex: page.value.curr,
pageSize: page.value.limit,
pageSize: -1,
})
).then((res: any) => {
tableInfo.value.loading = false;
loading.value = 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;
loading.value = false;
});
};
......@@ -122,10 +113,10 @@ const tableBtnClick = (scope, btn) => {
if (type == 'confirm' || type == 'modify' || type == 'edit' || type == "log") {
toPath(type);
} else if (type == 'run') {
const guids = [currTableData.value.guid];
runExecTask(guids).then((res: any) => {
const params = {guid: currTableData.value.guid};
runExecTask(params).then((res: any) => {
if (res.code == proxy.$passCode) {
getFirstPageData();
getTableData();
} else {
ElMessage({
type: "error",
......@@ -181,14 +172,6 @@ const toPath = (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: "确定",
......@@ -198,7 +181,7 @@ const open = (msg, type, isBatch = false) => {
const guids = [currTableData.value.guid];
cgTaskDelete(guids).then((res: any) => {
if (res.code == proxy.$passCode) {
getFirstPageData();
getTableData();
ElMessage({
type: "success",
message: "删除成功",
......@@ -210,41 +193,35 @@ const open = (msg, type, isBatch = false) => {
});
}
}).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);
// }
getFirstPageData()
})
onBeforeMount(() => {
getTableData()
})
</script>
<template>
<div class="container_wrap" v-if="tableInfo.data.length">
<div class="table_panel_wrap">
<Table :tableInfo="tableInfo" @tableBtnClick="tableBtnClick" @tablePageChange="tablePageChange" />
<div class="container_wrap" v-loading="loading">
<div class="table_tool_wrap" v-if="tableInfo.data.length">
<div class="table_title">分类分级任务</div>
</div>
</div>
<div class="container_wrap" v-else>
<div class="card-noData">
<div class="table_panel_wrap" v-if="tableInfo.data.length">
<Table :tableInfo="tableInfo" @tableBtnClick="tableBtnClick" />
</div>
<div class="card-noData" v-else>
<img src="@/assets/images/no-data.png" :style="{ width: '96px', height: '96px' }" />
<p>暂无日志记录</p>
<p>暂无分类分级任务,<span class="text_btn" @click="toPath('add')">去新建</span></p>
</div>
</div>
</template>
......@@ -252,7 +229,7 @@ onBeforeMount(() => {
<style scoped lang="scss">
.table_tool_wrap {
width: 100%;
height: 40px !important;
min-height: unset;
padding: 0 8px;
.table_title {
......@@ -266,8 +243,8 @@ onBeforeMount(() => {
.table_panel_wrap {
width: 100%;
height: 100%;
padding: 0px 8px 0;
height: calc(100% - 40px);
padding: 8px 8px 16px;
}
.card-noData {
......
......@@ -11,639 +11,45 @@ import { Search, Warning } from "@element-plus/icons-vue";
import { setItemsDisabled, tagMethod, tagType, changeNum, } from "@/utils/common";
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";
import { getCgTaskDetail, getTaskExeTreeList, getTaskFieldCount, execTaskFieldList, execTaskSheetList, execTaskConfirm, execFieldConfirm, filterVal, } from "@/api/modules/dataInventory";
const { proxy } = getCurrentInstance() as any;
const router = useRouter();
const route = useRoute();
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 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"
},
const classifyData = ref([
{ classifyName: '未分类', guid: 'unclassified' },
])
const treeData = ref([
{
"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"
}
classifyName: "全部",
guid: "all",
children: [
{ classifyName: '未分类', guid: 'unclassified' },
],
"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 data2 = [
{}
]
const treeIndex: any = ref({})
const treeInfo = ref({
]);
const currTreeNode = ref({})
const treeInfo: any = ref({
id: "data-pickup-tree",
filter: true,
queryValue: "",
queryPlaceholder: "输入组织名称搜索",
props: {
label: "organisationName",
label: "classifyName",
value: "guid",
},
nodeKey: 'guid',
expandedKey: [],
expandOnNodeClick: false,
data: data1 || [],
data: [],
});
const templateInfo = ref({
title: '医疗数据分类分级模板',
mark: '待确认',
descGroup: [
{ label: '目录名称', value: '医疗数据', type: 'text_btn' },
{ label: '执行时间', value: '2021-12-12 09:12:13' },
{ label: '分级分类模板', value: '医疗数据分级分类', type: 'text_btn' },
{ label: '版本', value: 'V5' },
{ label: '元数据名称', value: '名称1、名称2、名称3' },
],
})
const taskDetail = ref({})
const fieldCounts = ref({})
const tabsInfo = ref({
activeName: 'field',
tabs: [
......@@ -652,99 +58,82 @@ const tabsInfo = ref({
]
});
const sheetParams = ref({});
const sheetItemList = ref([
{
type: "select",
label: "",
placeholder: '变更类型',
field: 'dataSourceGuid',
field: 'isCgChange',
default: '',
options: [],
props: {
label: 'databaseNameZh',
value: 'guid'
},
options: [
{ label: '已确认', value: 'Y' },
{ label: '待确认', value: 'N' },
],
clearable: true,
},
{
type: "select",
type: "input",
label: "",
placeholder: '数据库名',
field: 'dataSourceGuid',
field: 'databaseName',
default: '',
options: [],
props: {
label: 'databaseNameZh',
value: 'guid'
},
clearable: true,
},
{
type: "select",
type: "input",
label: "",
placeholder: '表中文/英文名',
field: 'dataSourceGuid',
field: 'tableName',
default: '',
options: [],
props: {
label: 'databaseNameZh',
value: 'guid'
},
clearable: true,
},
]);
const fieldParams = ref({});
const fieldItemList = ref([
{
type: "select",
label: "",
placeholder: '变更类型',
field: 'dataSourceGuid',
field: 'isCgChange',
default: '',
options: [],
props: {
label: 'databaseNameZh',
value: 'guid'
},
options: [
{ label: '已确认', value: 'Y' },
{ label: '待确认', value: 'N' },
],
clearable: true,
},
{
type: "select",
type: "input",
label: "",
placeholder: '字段中文/英文名',
field: 'dataSourceGuid',
field: 'fieldName',
default: '',
options: [],
props: {
label: 'databaseNameZh',
value: 'guid'
},
clearable: true,
},
{
type: "select",
type: "input",
label: "",
placeholder: '表中文/英文名',
field: 'dataSourceGuid',
field: 'tableName',
default: '',
options: [],
props: {
label: 'databaseNameZh',
value: 'guid'
},
clearable: true,
},
{
type: "select",
type: "cascader",
label: "",
placeholder: '分类',
field: 'dataSourceGuid',
default: '',
field: 'classifyName',
default: [],
options: [],
showAllLevels: true,
props: {
label: 'databaseNameZh',
value: 'guid'
checkStrictly: true,
expandTrigger: "hover",
label: "classifyName",
value: "guid",
},
filterable: true,
clearable: true,
},
{
......@@ -755,28 +144,22 @@ const fieldItemList = ref([
default: '',
options: [],
props: {
label: 'databaseNameZh',
label: 'gradeName',
value: 'guid'
},
clearable: true,
},
{
type: "select",
type: "input",
label: "",
placeholder: '数据库名',
field: 'dataSourceGuid',
field: 'databaseName',
default: '',
options: [],
props: {
label: 'databaseNameZh',
value: 'guid'
},
clearable: true,
},
]);
const checked1 = ref(false);
const checked2 = ref(false);
const page = ref({
limit: 50,
......@@ -789,33 +172,28 @@ const page = ref({
{ 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: "isCgChange", width: 140, align: 'center', type: "tag", getName: (scope) => {
// return filterVal(scope.row.isCgChange, 'isCgChange');
// }
// },
{ label: "表中文名", field: "tableChName", width: 120 },
{
label: "分类分级变更状态", field: "damCode", width: 140, align: 'center', type: "tag", getName: (scope) => {
return filterVal(scope.row.status, 'status');
}
},
{ label: "表中文名", field: "damTypeName", width: 120 },
{
label: "表英文名", field: "damName", width: 200, type: "text_btn", columClass: 'text_btn', click: (scope) => {
router.push({
name: "templateConfig",
query: { guid: scope.row.damGuid },
});
}
label: "表英文名", field: "tableName", width: 200, type: "text_btn", value: 'tab'
},
{ label: "数据库名", field: "damTypeName", width: 120 },
{ label: "字段数", field: "damTypeName", width: 96, align: 'right' },
{ label: "已分类字段数", field: "damTypeName", width: 120, align: 'right' },
{ label: "已分级字段数", field: "damTypeName", width: 120, align: 'right' },
{ label: "数据库名", field: "database", width: 120 },
{ label: "字段数", field: "fieldNum", width: 96, align: 'right' },
{ label: "已分类字段数", field: "classifyFieldNum", width: 120, align: 'right' },
{ label: "已分级字段数", field: "gradeFieldNum", width: 120, align: 'right' },
],
loading: false,
data: datas || [],
data: [],
page: {
type: "normal",
rows: 0,
......@@ -831,22 +209,35 @@ const fieldTableInfo = ref({
fields: [
{ label: "序号", type: "index", width: 56, align: "center", fixed: "left" },
{
label: "分类分级变更状态", field: "approveState", width: 140, align: 'center', type: "tag", getName: (scope) => {
return filterVal(scope.row.approveState, 'approveState');
label: "分类分级变更状态", field: "isCgChange", width: 140, align: 'center', type: "tag", getName: (scope) => {
return filterVal(scope.row.isCgChange, 'isCgChange');
}
},
{ label: "字段名", field: "damTypeName", width: 200 },
{ label: "字段中文名", field: "damTypeName", width: 200 },
{ label: "分类", field: "damTypeName", width: 280, type: 'select', columClass: 'edit_cell' },
{ label: "分级", field: "damTypeName", width: 120, type: 'select', columClass: 'edit_cell' },
{ label: "标签", field: "damCode", width: 96 },
{ label: "规则", field: "damCode", width: 200 },
{ label: "表中文名", field: "damTypeName", width: 120 },
{ label: "表英文名", field: "damName", width: 200 },
{ label: "数据库名", field: "damTypeName", width: 120 },
{ label: "字段名", field: "fieldName", width: 120 },
{ label: "字段中文名", field: "fieldChName", width: 200 },
{
label: "分类", field: "classifyDetailName", width: 280,
type: "cascader",
options: [],
showAllLevels: true,
props: {
checkStrictly: true,
expandTrigger: "hover",
label: "classifyName",
value: "guid",
},
filterable: true,
clearable: true,
},
{ label: "分级", field: "gradeDetailName", width: 120, type: 'select' },
{ label: "标签", field: "label", width: 96 },
{ label: "规则", field: "ruleDetail", width: 200 },
{ label: "表英文名", field: "tableName", width: 200 },
{ label: "表中文名", field: "tableChName", width: 120 },
{ label: "数据库名", field: "database", width: 120 },
],
loading: false,
data: data2 || [],
data: [],
showPage: true,
page: {
type: "normal",
......@@ -856,168 +247,183 @@ const fieldTableInfo = ref({
actionInfo: {
label: "操作",
type: "btn",
width: 80,
btns: (scope) => {
let row = scope.row, btnArr: any = [
{ label: "编辑", value: "edit" },
];
// 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;
},
width: 60,
},
})
// 获取任务详情
const getTaskDetail = (data) => {
getCgTaskDetail(data).then((res: any) => {
if (res.code == proxy.$passCode) {
const data = res.data || {};
taskDetail.value = data;
getFieldCount({ execGuid: data.execGuid })
getFieldTree({ execGuid: data.execGuid })
getSheetTableData();
getFieldTableData();
}
})
}
// 获取字段统计
const getFieldCount = (data) => {
getTaskFieldCount(data).then((res: any) => {
if (res.code == proxy.$passCode) {
const data = res.data || {};
fieldCounts.value = data;
}
})
}
// 获取字段统计
const getFieldTree = (data) => {
getTaskExeTreeList(data).then((res: any) => {
if (res.code == proxy.$passCode) {
const data = res.data || [];
treeData.value[0].children.splice(1);
treeData.value[0].children.push(...data);
treeInfo.value.data = treeData.value;
treeInfo.value.expandedKey = ['all'];
classifyData.value.splice(1);
classifyData.value.push(...data);
fieldItemList.value[3].options = JSON.parse(JSON.stringify(classifyData.value));
fieldTableInfo.value.fields[4].options = JSON.parse(JSON.stringify(classifyData.value));
}
})
}
const tabChange = (val) => {
tabsInfo.value.activeName = val;
}
const nodeClick = (data) => {
treeIndex.value = data
currTreeNode.value = data;
getFieldTableData();
}
const getTableData = () => {
tableInfo.value.loading = true;
getListingList(
Object.assign({}, searchItemValue.value, {
pageIndex: page.value.curr,
pageSize: page.value.limit,
// 获取库表数据
const getSheetTableData = () => {
sheetTableInfo.value.loading = true;
execTaskSheetList(
Object.assign({}, { ...sheetParams.value }, {
// changeStatus: checked2.value ? 'N' : 'Y',
execGuid: taskDetail.value.execGuid,
pageIndex: sheetTableInfo.value.page.curr,
pageSize: sheetTableInfo.value.page.limit,
})
).then((res: any) => {
sheetTableInfo.value.loading = false;
if (res.code == proxy.$passCode) {
sheetTableInfo.value.data = res.data.records || [];
sheetTableInfo.value.page.curr = res.data.pageIndex;
sheetTableInfo.value.page.limit = res.data.pageSize;
sheetTableInfo.value.page.rows = res.data.totalRows;
}
})
.catch((res) => {
fieldTableInfo.value.loading = false;
});
};
// 获取字段表格数据
const getFieldTableData = () => {
fieldTableInfo.value.loading = true;
execTaskFieldList(
Object.assign({}, { ...sheetParams.value }, {
isClassify: checked1.value ? 'Y' : 'N',
changeStatus: '',
execGuid: taskDetail.value.execGuid,
classifyDetailGuid: currTreeNode.value.guid,
pageIndex: fieldTableInfo.value.page.curr,
pageSize: fieldTableInfo.value.page.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;
fieldTableInfo.value.loading = false;
if (res.code == proxy.$passCode) {
let data = res.data.records || [];
data.map(item => item.STATE = '');
fieldTableInfo.value.data = data;
fieldTableInfo.value.page.curr = res.data.pageIndex;
fieldTableInfo.value.page.limit = res.data.pageSize;
fieldTableInfo.value.page.rows = res.data.totalRows;
}
})
.catch((res) => {
tableInfo.value.loading = false;
fieldTableInfo.value.loading = false;
});
};
const tableCellClassName = (scope) => {
return (scope.column.label == '分类' || scope.column.label == '分级') && scope.row['STATE'] === 'Running' ? 'edit_cell' : ''
}
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");
}
};
if (type == 'tab') {
tabsInfo.value.activeName = 'field';
fieldItemList.value[2].default = row.tableName;
} else if (type == "edit") {
row.STATE = 'Running';
} else if (type == 'save') {
const toPath = (type = null) => {
router.push({
name: "taskConfig",
query: {
type
},
});
}
row.STATE = '';
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 tablePageChange = (info) => {
if (tabsInfo.value.activeName == 'sheet') {
sheetTableInfo.value.page.limit = Number(info.limit);
sheetTableInfo.value.page.curr = Number(info.curr);
getSheetTableData();
} else {
fieldTableInfo.value.page.limit = page.value.limit;
fieldTableInfo.value.page.curr = page.value.curr;
getFieldTableData();
}
};
const getFirstPageData = () => {
page.value.curr = 1
tableInfo.value.page.curr = 1;
getTableData();
}
const btnClick = async (btn, bType = null) => {
const type = btn.value;
if (type == 'path') {
router.push({
name: "classifyGradeCatalogue",
// query: { guid: taskDetail.value.damGuid },
});
} else if (type == 'cancel') {
router.push({
name: "taskConfig",
});
} else if (type == 'confirm') {
}
};
/** 搜索查询分类分级模板。 */
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 searchSheet = (val: any, clear: boolean = false) => {
if (clear) {
sheetItemList.value.map(item => item.default = '')
}
sheetParams.value = Object.assign({}, { ...sheetParams.value }, { ...val });
getSheetTableData();
};
const changTable = () => {
// toSearch({})
const searchField = (val: any, clear: boolean = false) => {
if (clear) {
fieldItemList.value.map(item => item.default = '')
}
fieldParams.value = Object.assign({}, { ...fieldParams.value }, { ...val });
getFieldTableData();
};
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(() => {
getTaskDetail({ guid: route.query.guid })
})
</script>
......@@ -1029,29 +435,35 @@ onBeforeMount(() => {
<div class="template_panel">
<div class="panel_title">
<div class="title_wrap">
<span class="title_text">{{ templateInfo.title }}</span>
<el-tag type="warning">{{ templateInfo.mark }}</el-tag>
<span class="title_text">{{ taskDetail.taskName }}</span>
<el-tag type="warning">{{ filterVal(taskDetail.confirmStatus, 'confirmStatus') }}</el-tag>
</div>
</div>
<div class="title_desc">
<div class="desc_group">
<div class="desc_item">
<span class="desc_label">目录名称:</span>
<span class="desc_value text_btn">医疗数据</span>
<span class="desc_value text_btn" @click="btnClick({ value: 'path' })">{{ taskDetail.cgDirName || '--'
}}</span>
</div>
<div class="desc_item">
<span class="desc_label">执行时间:</span>
<span class="desc_value">2021-12-12 09:12:13</span>
<span class="desc_value">{{ taskDetail.cgDirName || '--' }}</span>
</div>
</div>
<div class="desc_group">
<div class="desc_item">
<span class="desc_label">分类:</span>
<span class="desc_value text_btn">医疗数据</span>
<span class="desc_value text_btn">{{ taskDetail.classifyName || '--' }}</span>
</div>
<div class="desc_item">
<span class="desc_label">分级:</span>
<span class="desc_value text_btn">{{ taskDetail.gradeName || '--' }}</span>
</div>
<div class="desc_item">
<span class="desc_label">元数据名称:</span>
<span class="desc_value">名称1、名称2、名称3</span>
<span class="desc_value">{{ (taskDetail.metaNames || []).length ? taskDetail.metaNames.join(',') : '--'
}}</span>
</div>
</div>
</div>
......@@ -1060,13 +472,13 @@ onBeforeMount(() => {
<Warning />
</el-icon>
<span>本次分类分级任务共涉及: </span>
<span class="text_btn">40</span>
<span class="text_btn">{{ changeNum(fieldCounts.tableNum || 0) }}</span>
<span>张表,共</span>
<span class="text_btn">4023</span>
<span class="text_btn">{{ changeNum(fieldCounts.fieldNum || 0) }}</span>
<span>个字段,已分类</span>
<span class="text_btn">2099</span>
<span class="text_btn">{{ changeNum(fieldCounts.classifyFieldNum || 0) }}</span>
<span>个字段,已分级</span>
<span class="text_btn">1987</span>
<span class="text_btn">{{ changeNum(fieldCounts.gradeFieldNum || 0) }}</span>
<span>个字段</span>
</p>
</div>
......@@ -1074,7 +486,7 @@ onBeforeMount(() => {
<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" />
<TableTools :searchItems="sheetItemList" :searchId="'sheet-search'" :init="false" @search="searchSheet" />
</div>
<div class="table_panel_wrap">
<Table :tableInfo="sheetTableInfo" @tableBtnClick="tableBtnClick" @tablePageChange="tablePageChange" />
......@@ -1082,13 +494,12 @@ onBeforeMount(() => {
</div>
<div class="panel flex" v-show="tabsInfo.activeName == 'field'">
<div class="box_left">
<div class="aside_title">分类分级目录</div>
<Tree :treeInfo="treeInfo" @nodeClick="nodeClick" />
</div>
<div class="box_right">
<div class="table_tool_wrap">
<TableTools :searchItems="fieldItemList" :searchId="'template-manage-search'"
@search="searchTemplate" />
<TableTools :searchItems="fieldItemList" :searchId="'field-search'" :init="false"
@search="searchField" />
<div class="tools_btns">
<div class="btns">
<el-button type="primary" plain @click="btnClick({ value: 'batch' })">批量变量分类分级</el-button>
......@@ -1097,28 +508,30 @@ onBeforeMount(() => {
</div>
<div class="checkboxs">
<el-checkbox v-model="checked1">仅看未分级分类</el-checkbox>
<el-checkbox v-model="checked2">仅看变更</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" border :height="'100%'"
style="width: 100%; display: inline-block" :style="{ 'min-height': '100%' }">
style="width: 100%; display: inline-block" :style="{ 'min-height': '100%' }"
:cell-class-name="tableCellClassName">
<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>
<div v-else-if="item.type == 'tag'">
<el-tag :type="item.tagType ? item.tagType(scope) : tagType(scope.row, item.field)">{{
<el-tag v-if="item.type == 'tag'"
:type="item.tagType ? item.tagType(scope) : tagType(scope.row, item.field)">{{
item.getName ? item.getName(scope) : tagMethod(scope.row, item.field)
}}</el-tag>
</div>
}}</el-tag>
<el-select v-else-if="item.type == 'select' && scope.row['STATE'] === 'Running'"
v-model="scope.row[item.field]" :placeholder="item.placeholder"
:disabled="item.disabled ?? false" :clearable="item.clearable ?? true" size="small" />
<el-cascader v-else-if="item.type == 'cascader' && scope.row['STATE'] === 'Running'"
v-model="scope.row[item.field]" :options="item.options" :props="item.props"
:disabled="item.disabled ?? false" :clearable="item.clearable ?? true" size="small" />
<span v-else>
{{ item.getName ? item.getName(scope) : scope.row[item.field] !== 0 && !scope.row[item.field]
?
......@@ -1126,18 +539,11 @@ onBeforeMount(() => {
</span>
</template>
</el-table-column>
<el-table-column label="操作" :width="fieldTableInfo.actionInfo.width"
:class-name="fieldTableInfo.actionInfo.columClass" fixed="right">
<el-table-column label="操作" :width="fieldTableInfo.actionInfo.width" fixed="right">
<template #default="scope">
<template v-for="(btn, b) in Array.isArray(fieldTableInfo.actionInfo.btns)
? fieldTableInfo.actionInfo.btns
: fieldTableInfo.actionInfo.btns(scope)">
<span class="operate_btn" :class="{ active: btn.visible ?? true }" v-if="btn.visible ?? true">
<span class="text_btn" :class="{ 'is-disabled': !!btn.disabled }"
@click="(btn.click && !btn.disabled && !scope.row.disabled) ? btn.click(scope, btn) : tableBtnClick(scope, btn)"
v-preReClick>{{ btn.label }}</span>
</span>
</template>
<span class="text_btn"
@click="tableBtnClick(scope, { value: scope.row['STATE'] === 'Running' ? 'save' : 'edit' })"
v-preReClick>{{ scope.row['STATE'] === 'Running' ? '保存' : '编辑' }}</span>
</template>
</el-table-column>
</el-table>
......@@ -1152,7 +558,7 @@ onBeforeMount(() => {
<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>
<el-button type="primary" @click="btnClick({ value: 'confirm' })">确认变更</el-button>
</div>
</div>
</div>
......@@ -1290,10 +696,10 @@ onBeforeMount(() => {
}
.panel_content {
height: 100%;
height: calc(100% - 145px);
.panel {
height: calc(100% - 47px);
height: calc(100% - 35px);
padding: 0 16px;
&.flex {
......@@ -1319,12 +725,14 @@ onBeforeMount(() => {
}
.tree_panel {
padding: 0;
height: 100%;
padding: 8px 0;
}
}
.box_right {
width: calc(100% - 240px);
height: 100%;
}
}
}
......@@ -1342,7 +750,7 @@ onBeforeMount(() => {
:deep(.table_tool_wrap) {
.table-tools {
.tools_search {
padding-top: 12px;
padding-top: 8px;
}
}
}
......@@ -1356,17 +764,38 @@ onBeforeMount(() => {
.table_panel_wrap {
width: 100%;
height: calc(100% - 40px);
height: calc(100% - 48px);
padding: 4px 0 0;
&.panel {
height: calc(100% - 135px);
height: calc(100% - 171px);
.table_panel {
width: 100%;
height: 100%;
}
}
:deep(.el-table) {
td.el-table__cell {
&.edit_cell {
padding: 0;
.cell {
padding: 0 4px;
line-height: 1;
.el-cascader {
width: 100%;
.el-input .el-input__inner {
height: auto !important;
}
}
}
}
}
}
}
}
}
......
......@@ -152,14 +152,16 @@ const metadataTableInfo = ref({
const getTaskDetail = (data) => {
getCgTaskDetail(data).then((res: any) => {
const data = res.data || {};
taskDetail.value = data;
taskFormItems.value.map((item) => {
item.default = data[item.field] || '';
})
selectRowData.value = data.metaGuids || [];
getPermissionList({});
getMetaTableData();
if (res.code == proxy.$passCode) {
const data = res.data || {};
taskDetail.value = data;
taskFormItems.value.map((item) => {
item.default = data[item.field] || '';
})
selectRowData.value = data.metaGuids || [];
getPermissionList({});
getMetaTableData();
}
})
}
......@@ -179,22 +181,22 @@ const getTableData = () => {
})
).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;
if (res.code == proxy.$passCode) {
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 toPath = (type = null) => {
const toPath = () => {
router.push({
name: "taskConfig",
query: {
type
},
query: {},
});
}
......@@ -218,17 +220,16 @@ const tablePageChange = (info) => {
const getMetaTableData = () => {
getMetaTableCollectList({}).then((res: any) => {
metadataTableInfo.value.loading = false;
const data = res.data.records || [];
metadataTableInfo.value.data = data;
// metadataTableInfo.value.page.curr = res.data.pageIndex;
// metadataTableInfo.value.page.limit = res.data.pageSize;
// metadataTableInfo.value.page.rows = res.data.totalRows;
if (route.query.type === 'edit') {
nextTick(() => {
data.map((row) => {
taskDetail.value.metaGuids.indexOf(row.guid) > -1 && metadataTableRef.value.tableRef.toggleRowSelection(row, true);
});
})
if (res.code == proxy.$passCode) {
const data = res.data.records || [];
metadataTableInfo.value.data = data;
if (route.query.type === 'edit') {
nextTick(() => {
data.map((row) => {
taskDetail.value.metaGuids.indexOf(row.guid) > -1 && metadataTableRef.value.tableRef.toggleRowSelection(row, true);
});
})
}
}
})
}
......@@ -330,7 +331,7 @@ const listClick = (row) => {
};
// 获取分类列表
const getPermissionList = (val, init = false) => {
const getPermissionList = (val, init = true) => {
let params: any = val ? { ...val } : {}
params.pageIndex = listPage.value.curr;
params.pageSize = listPage.value.limit;
......@@ -343,18 +344,18 @@ const getPermissionList = (val, init = false) => {
permissionList.value = JSON.parse(JSON.stringify(data))
currpermissionList.value = JSON.parse(JSON.stringify(data))
listPage.value.totalPages = res.data.totalPages
if (data.length) {
if (route.query.type == 'edit') {
templateInfo.value = data.filter(item => item.guid == taskDetail.value.classifyGuid)[0]
} else {
templateInfo.value = data[0];
}
getClassifyTree()
}
} else {
permissionList.value.push(...JSON.parse(JSON.stringify(data)))
querySearch(asideSearchInput.value)
}
if (data.length) {
if (route.query.type == 'edit') {
templateInfo.value = data.filter(item => item.guid == taskDetail.value.classifyGuid)[0]
} else {
templateInfo.value = data[0];
}
getClassifyTree()
}
}
listLoading.value = false
}).catch(() => {
......@@ -365,23 +366,32 @@ const getPermissionList = (val, init = false) => {
// 获取树形列表
const getClassifyTree = () => {
const params = {
guid: templateInfo.value.guid
classifyGradeGuid: templateInfo.value.guid
}
treeInfo.value.loading = true;
getClassifyTreeList(params).then((res: any) => {
treeInfo.value.loading = false;
if (res.code == proxy.$passCode) {
const data = res.data || [];
treeInfo.value.data = data;
treeInfoRef.value.setCurrentKey('');
tableInfo.value.data = [];
}
treeInfo.value.loading = false;
}).catch(() => {
treeInfo.value.loading = false;
})
}
onActivated(() => {
// if (route.query.type == 'edit') {
// getTaskDetail({ guid: route.query.guid })
// } else {
// getPermissionList({});
// getMetaTableData();
// }
})
onBeforeMount(() => {
if (route.query.type == 'edit') {
getTaskDetail({ guid: route.query.guid })
} else {
......@@ -390,10 +400,6 @@ onActivated(() => {
}
})
onBeforeMount(() => {
// getPermissionList({})
})
</script>
<template>
......
......@@ -12,8 +12,6 @@ import useDataAssetStore from "@/store/modules/dataAsset";
import { getTaskExecPageList, filterVal } from "@/api/modules/dataInventory";
import { TableColumnWidth } from '@/utils/enum';
import Table from "@/components/Table/index.vue";
const { proxy } = getCurrentInstance() as any;
const router = useRouter();
const route = useRoute();
......@@ -21,6 +19,7 @@ const userStore = useUserStore();
const userData = JSON.parse(userStore.userData);
const assetStore = useDataAssetStore();
const loading = ref(false);
const page = ref({
limit: 50,
curr: 1,
......@@ -63,7 +62,6 @@ const tableInfo = ref({
}
},
],
loading: false,
data: [],
page: {
type: "normal",
......@@ -84,7 +82,7 @@ const tableInfo = ref({
});
const getTableData = () => {
tableInfo.value.loading = true;
loading.value = true;
getTaskExecPageList(
Object.assign({}, searchItemValue.value, {
pageIndex: page.value.curr,
......@@ -92,14 +90,16 @@ const getTableData = () => {
taskGuid: route.query.guid
})
).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;
loading.value = false;
if (res.code == proxy.$passCode) {
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;
loading.value = false;
});
};
......@@ -109,8 +109,6 @@ const tableBtnClick = (scope, btn) => {
currTableData.value = row;
if (type == "path") {
toPath(type);
} else if (type === "delete") {
open("此操作将永久删除,是否继续?", "warning");
}
};
......@@ -133,32 +131,6 @@ const tablePageChange = (info) => {
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;
......@@ -176,18 +148,13 @@ 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">
<div class="container_wrap" v-loading="loading">
<div class="table_panel_wrap" v-if="tableInfo.data.length">
<Table :tableInfo="tableInfo" @tableBtnClick="tableBtnClick" @tablePageChange="tablePageChange" />
</div>
</div>
<div class="container_wrap" v-else>
<div class="card-noData">
<div class="card-noData" v-else>
<img src="@/assets/images/no-data.png" :style="{ width: '96px', height: '96px' }" />
<p>暂无分类分级任务<span class="text_btn" @click="toPath('add')">去新建</span></p>
<p>暂无分类分级任务日志记录</p>
</div>
</div>
</template>
......@@ -209,7 +176,7 @@ onBeforeMount(() => {
.table_panel_wrap {
width: 100%;
height: calc(100% - 40px);
height: 100%;
padding: 0px 8px 0;
}
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!