8ad5d02b by xukangle

Merge branch 'develop' into dev_20241202_xukangle

2 parents 8e994be3 f86a61ed
......@@ -6,7 +6,11 @@ VITE_APP_TITLE = 数据资产管理系统
VITE_API_BASEURL = http://localhost:9000
# VITE_API_BASEURL = http://10.4.82.1:28052/
# 平台用户 接口请地址
VITE_APP_USER_API_BASEURL = gateway-server/user
VITE_APP_USER_API_BASEURL = gateway-server
#AUTH服务
VITE_APP_AUTH_URL = 'ms-daop-auth-service'
# 系统管理 接口地址
VITE_APP_API_BASEURL = ms-daop-zcgl-system-manager-service
# 文件上传请求地址
......@@ -42,3 +46,4 @@ VITE_API_MESSAGE = ms-swzl-message-notification-service
VITE_BUILD_SOURCEMAP = false
# 是否在打包时开启压缩,支持 gzip 和 brotli
VITE_BUILD_COMPRESS = gzip,brotli
......
......@@ -4,7 +4,7 @@ VITE_APP_TITLE = 数据资产管理系统
VITE_API_BASEURL = https://www.zgsjzc.com/api
# VITE_API_BASEURL = http://49.4.26.201:31709/
# 平台用户 接口请地址
VITE_APP_USER_API_BASEURL = gateway-server/user
VITE_APP_USER_API_BASEURL = gateway-server
# 系统管理 接口地址
VITE_APP_API_BASEURL = ms-daop-zcgl-system-manager-service
# 文件上传请求地址
......
......@@ -3,15 +3,16 @@ import request from "@/utils/request";
/** 获取数往知来接入idaas的token。 */
export const getTokenByCode = (params) => {
return request({
url: `/csbr-zuul/user/idaas-login?code=${params.code}&platformGuid=${params.platformGuid}&userType=${params.userType}`,
method: 'post'
url: `${import.meta.env.VITE_APP_USER_API_BASEURL}/staff/login`,
method: 'post',
data: params
})
}
/** 退出登录 */
export const loginOut = () => {
return request({
url: `/csbr-zuul/user/logout`,
url: `${import.meta.env.VITE_APP_USER_API_BASEURL}/user/logout`,
method: 'get'
})
}
......@@ -19,11 +20,20 @@ export const loginOut = () => {
/** 刷新token,延长过期时间 */
export const refreshToken = (params) => {
return request({
url: `/csbr-zuul/user/refreshToken?refreshToken=${params.refreshToken}`,
url: `${import.meta.env.VITE_APP_USER_API_BASEURL}/user/refreshToken?refreshToken=${params.refreshToken}`,
method: 'post'
})
}
export const getSystemMenu = (params) => {
return request({
url: `${
import.meta.env.VITE_APP_AUTH_URL
}/product-menu-permission/tenant/get-product-menu?tenantGuid=${params.tenantGuid}&platformSystemGuid=32774fcfdf5e43e8b866660374d8bced`,
method: "get",
});
};
// 获取当前用户对应的产品和菜单
export const getUserInfo = () => {
return request({
......
......@@ -123,7 +123,7 @@ const handleClick = (scope, btn) => {
if (scope.row.disabled || btn.disabled) return;
emits("tableBtnClick", scope, btn);
};
const popoverHover = (scope, btn)=>{
const popoverHover = (scope, btn) => {
emits("tableBtnClick", scope, btn);
}
const selectionChange = (val) => {
......@@ -158,7 +158,7 @@ const inputKeyUp = (regexp, scope, item) => {
return;
}
if (regexp) {
scope.row[field] = scope.row[field].replace(regexp,'')
scope.row[field] = scope.row[field].replace(regexp, '')
}
// 特殊处理,apiCreate.vue中defaultParamsTableInfo的pageSize限制输入最大值100.
if (scope.row.paramName == 'pageSize' && scope.row[field] > 100) {
......@@ -175,7 +175,7 @@ const rowClassName = (rowObj) => {
}
const row = rowObj.row;
let className = "";
if (row.ROWID && row.STATUS === "edit" && row.STATE === "Running" ) {
if (row.ROWID && row.STATUS === "edit" && row.STATE === "Running") {
className = "edit_row";
}
return className;
......@@ -202,8 +202,8 @@ const pageChange = (page) => {
let info = { ...page, id: props.tableInfo.id };
emits("tablePageChange", info);
};
const tableRowClassName1 = ({row,rowIndex})=>{
return row.isAlter=="Y"? "primary":""
const tableRowClassName1 = ({ row, rowIndex }) => {
return row.isAlter == "Y" ? "primary" : ""
}
onMounted(() => {
......@@ -220,68 +220,30 @@ onMounted(() => {
</script>
<template>
<div
class="table_panel"
:id="props.tableInfo.id"
:style="{
<div class="table_panel" :id="props.tableInfo.id" :style="{
height: props.tableInfo.height ?? '100%',
'min-height': props.tableInfo.minPanelHeight ?? ''
}"
>
<el-table
ref="tableRef"
:class="{ 'no-edit': props.tableInfo.readonly, 'sort-table': props.tableInfo.sortable }"
:data="tableData"
:highlight-current-row=" props.tableInfo.heightlightRow ?? true"
:show-header="props.tableInfo.showHeader ?? true"
stripe
:border="props.tableInfo.border
}">
<el-table ref="tableRef" :class="{ 'no-edit': props.tableInfo.readonly, 'sort-table': props.tableInfo.sortable }"
:data="tableData" :highlight-current-row="props.tableInfo.heightlightRow ?? true"
:show-header="props.tableInfo.showHeader ?? true" stripe :border="props.tableInfo.border
?? true" :height="props.tableInfo.height === null ? null : (props.tableInfo.height ?? '100%')"
:max-height="maxHeight"
:row-key="rowKey"
:current-row-key="currentRowKey"
:row-class-name="rowClassName"
v-loading="tableDataLoading"
@row-click="rowClick"
@row-dblclick="rowDblClick"
@selection-change="selectionChange"
@select="tableCheckboxSelectChange"
@select-all="tableCheckboxAllSelectChange"
style="width: 100%; display: inline-block"
:style="{ 'min-height': props.tableInfo.minHeight ?? '200px' }"
tooltip-effect="light"
:tooltip-options="{ placement: 'top', popperClass: 'table_cell_tooltip' }"
:show-summary="props.tableInfo.showSummary ?? false"
>
<el-table-column
type="selection"
:width="32"
align="center"
v-if="multiple"
:selectable="rowSelectable"
:fixed="fixedSelection"
/>
<el-table-column
v-for="item in tableFields"
:label="item.label"
:width="item.width"
:min-width="item.minWidth"
:fixed="item.fixed"
:align="item.align"
:type="item.type == 'index' ? '' : undefined"
:sortable="item.sortable ?? false"
:prop="item.field"
:class-name="item.columClass"
:show-overflow-tooltip="item.type != 'switch'"
>
:max-height="maxHeight" :row-key="rowKey" :current-row-key="currentRowKey" :row-class-name="rowClassName"
v-loading="tableDataLoading" @row-click="rowClick" @row-dblclick="rowDblClick" @selection-change="selectionChange"
@select="tableCheckboxSelectChange" @select-all="tableCheckboxAllSelectChange"
style="width: 100%; display: inline-block" :style="{ 'min-height': props.tableInfo.minHeight ?? '200px' }"
tooltip-effect="light" :tooltip-options="{ placement: 'top', popperClass: 'table_cell_tooltip' }"
:show-summary="props.tableInfo.showSummary ?? false">
<el-table-column type="selection" :width="32" align="center" v-if="multiple" :selectable="rowSelectable"
:fixed="fixedSelection" />
<el-table-column v-for="item in tableFields" :label="item.label" :width="item.width" :min-width="item.minWidth"
:fixed="item.fixed" :align="item.align" :type="item.type == 'index' ? '' : undefined"
:sortable="item.sortable ?? false" :prop="item.field" :class-name="item.columClass"
:show-overflow-tooltip="item.type != 'switch'">
<template #header>
<template v-if="!!item?.toolTipContent">
<span style="color:#000;display: inline-block">{{ item.label }}</span>
<el-tooltip
effect="light"
:content="item.toolTipContent"
placement="top"
>
<el-tooltip effect="light" :content="item.toolTipContent" placement="top">
<el-icon style="color:#b2b2b2;">
<QuestionFilled />
</el-icon>
......@@ -303,39 +265,38 @@ onMounted(() => {
<span v-else>{{ props.tableInfo.sortable ? (scope.row.index) : (scope.$index + 1) }}</span>
</template>
<template #default="scope" v-else-if="item.type == 'tag'">
<el-tag v-if="scope.row[item.field] !== undefined" :type="item.tagType?item.tagType(scope):tagType(scope.row, item.field)">{{
item.getName?item.getName(scope):tagMethod(scope.row, item.field)
<el-tag v-if="scope.row[item.field] !== undefined"
:type="item.tagType ? item.tagType(scope) : tagType(scope.row, item.field)">{{
item.getName ? item.getName(scope) : tagMethod(scope.row, item.field)
}}</el-tag>
<span v-else>{{ '--' }}</span>
</template>
<template #default="scope" v-else-if="item.type == 'popover'">
<el-popover
v-if="scope.row[item.field] !== undefined && (item.checkName?item.checkName(scope):true)"
placement="left-start"
:title="props.tableInfo.popoverTitle || '变化'"
:width="476"
trigger="hover"
@show="()=>popoverHover(scope,item)"
>
<el-popover v-if="scope.row[item.field] !== undefined && (item.checkName ? item.checkName(scope) : true)"
placement="left-start" :title="props.tableInfo.popoverTitle || '变化'" :width="476" trigger="hover"
@show="() => popoverHover(scope, item)">
<template #reference>
<span :class="{text_btn:item.checkName?item.checkName(scope):true}">{{ item.getName?item.getName(scope):"详情" }}</span>
</template>
<el-table :data="props.tableInfo.popoverData" v-loading="props.tableInfo.popoverloading"
class="tablePover" :row-class-name="tableRowClassName1" border tooltip-effect="light" :span-method="props.tableInfo?.arraySpanMethod">
<el-table-column v-for="col in item.column" :width="col.width" :property="col.field" :label="col.label" :key="col.field" show-overflow-tooltip >
<span :class="{ text_btn: item.checkName ? item.checkName(scope) : true }">{{
item.getName ? item.getName(scope):"详情" }}</span>
</template>
<el-table :data="props.tableInfo.popoverData" v-loading="props.tableInfo.popoverloading" class="tablePover"
:row-class-name="tableRowClassName1" border tooltip-effect="light"
:span-method="props.tableInfo?.arraySpanMethod">
<el-table-column v-for="col in item.column" :width="col.width" :property="col.field" :label="col.label"
:key="col.field" show-overflow-tooltip>
<template #default="scope">
{{ scope.row[col.field] || '--' }}
</template>
</el-table-column>
</el-table>
</el-popover>
<span v-else>{{item.getName?(item.getName(scope) || '--'):"--"}}</span>
<span v-else>{{ item.getName ? (item.getName(scope) || '--') : "--" }}</span>
</template>
<template #default="scope" v-else-if="item.type == 'filter'">
<span>{{ tagMethod(scope.row, item.field) }}</span>
</template>
<template #default="scope" v-else-if="item.type == 'chnum'">
<span v-if="!!item.isNaN">{{ scope.row[item.field]?changeNum(scope.row[item.field]):"--" }}</span>
<span v-if="!!item.isNaN">{{ scope.row[item.field] ? changeNum(scope.row[item.field]) : "--" }}</span>
<span v-else>{{
scope.row[item.field] != null ?
changeNum(
......@@ -346,18 +307,11 @@ onMounted(() => {
<span v-if="item.unit">{{ item.unit }}</span>
</template>
<template #default="scope" v-else-if="item.type == 'switch'">
<el-switch
v-model="scope.row[item.field]"
inline-prompt
:disabled="!item.isDisabled ? false : item.isDisabled(scope)"
:active-value="item.activeValue"
:inactive-value="item.inactiveValue"
:width="item.switchWidth"
:active-text="item.activeText"
:inactive-text="item.inactiveText"
:before-change="() => beforeChange(scope, item)"
@change="(val) => switchChange(val, scope, item.field)"
/>
<el-switch v-model="scope.row[item.field]" inline-prompt
:disabled="!item.isDisabled ? false : item.isDisabled(scope)" :active-value="item.activeValue"
:inactive-value="item.inactiveValue" :width="item.switchWidth" :active-text="item.activeText"
:inactive-text="item.inactiveText" :before-change="() => beforeChange(scope, item)"
@change="(val) => switchChange(val, scope, item.field)" />
</template>
<template #default="scope" v-else-if="item.type == 'menu'">
{{ item.menus[scope.row[item.field]] }}
......@@ -365,35 +319,24 @@ onMounted(() => {
</template>
<template #default="scope" v-else-if="item.type == 'text_btn'">
<span v-if="scope.row[item.field] != null" :class="item.class + ' text_btn'"
@click="(item.click && !item.disabled && !scope.row.disabled) ? item.click(scope, { label: item.label, value: item.value }): handleClick(scope, { label: item.label, value: item.value })" v-preReClick>{{ item.getName ? item.getName(scope) : scope.row[item.field]
@click="(item.click && !item.disabled && !scope.row.disabled) ? item.click(scope, { label: item.label, value: item.value }) : handleClick(scope, { label: item.label, value: item.value })"
v-preReClick>{{ item.getName ? item.getName(scope) : scope.row[item.field]
}}</span>
<span v-else>--</span>
</template>
<template #default="scope" v-else-if="item.type == 'btn'">
<template v-for="btn in item.btns">
<span
v-if="btn.visible ?? true"
class="text_btn"
@click="(btn.click && !btn.disabled && !scope.row.disabled) ? btn.click(scope, btn):handleClick(scope, btn)"
v-preReClick
>{{ btn.label }}</span
>
<span v-if="btn.visible ?? true" class="text_btn"
@click="(btn.click && !btn.disabled && !scope.row.disabled) ? btn.click(scope, btn) : handleClick(scope, btn)"
v-preReClick>{{ btn.label }}</span>
</template>
</template>
<template #default="scope" v-else-if="item.type == 'input'">
<el-input
v-model.trim="scope.row[item.field]"
placeholder="请输入"
:maxlength="item.maxlength ?? ''"
></el-input>
<el-input v-model.trim="scope.row[item.field]" placeholder="请输入" :maxlength="item.maxlength ?? ''"></el-input>
</template>
<template #default="scope" v-else-if="item.type == 'tooltip'">
<el-tooltip
:placement="item.placement ?? 'bottom-start'"
effect="light"
popper-class="table_tooltip"
:trigger="item.trigger"
>
<el-tooltip :placement="item.placement ?? 'bottom-start'" effect="light" popper-class="table_tooltip"
:trigger="item.trigger">
<template #content>
<div style="width: 236px; text-align: justify">
<p class="tips_title">不符合规则</p>
......@@ -405,159 +348,85 @@ onMounted(() => {
</el-tooltip>
</template>
<template #default="scope" v-else-if="item.type && item.type == 'edit'">
<template v-if="(props.tableInfo.STATUS == 'edit' || scope.row.STATUS == 'edit') && (item.getVisible ? item.getVisible(scope) : true)">
<el-select
v-if="
<template
v-if="(props.tableInfo.STATUS == 'edit' || scope.row.STATUS == 'edit') && (item.getVisible ? item.getVisible(scope) : true)">
<el-select v-if="
editForm[item.field] && editForm[item.field].type == 'select'
"
v-model="scope.row[item.field]"
:placeholder="editForm[item.field].placeholder"
:clearable="editForm[item.field].clearable"
:filterable="editForm[item.field].filterable ?? true"
:disabled="
editForm[item.field].disabled && scope.row.guid !== undefined
"
@change="(val) => selectChange(val, scope, item)"
>
" v-model="scope.row[item.field]" :placeholder="editForm[item.field].placeholder"
:clearable="editForm[item.field].clearable" :filterable="editForm[item.field].filterable ?? true"
:disabled="editForm[item.field].disabled && scope.row.guid !== undefined
" @change="(val) => selectChange(val, scope, item)">
<el-option v-if="props.tableInfo.readonly" label="--" value="" />
<el-option
v-for="opt in editForm[item.field].getOptions ? editForm[item.field].getOptions(scope) : editForm[item.field].options"
:label="editForm[item.field]?.props?.label ? opt[editForm[item.field].props.label] : opt.label"
:value="editForm[item.field]?.props?.value ? opt[editForm[item.field].props.value] : opt.value"
:key="editForm[item.field]?.props?.value ? opt[editForm[item.field].props.value] : opt.value"
/>
:key="editForm[item.field]?.props?.value ? opt[editForm[item.field].props.value] : opt.value" />
</el-select>
<el-input
v-else-if="
<el-input v-else-if="
editForm[item.field] && editForm[item.field].type == 'input'
"
v-model.trim="scope.row[item.field]"
:placeholder="editForm[item.field].placeholder"
:clearable="editForm[item.field].clearable"
:maxlength="editForm[item.field].maxlength ?? ''"
:disabled="
editForm[item.field].disabled && scope.row.guid !== undefined
"
@input="inputKeyUp(editForm[item.field].regexp, scope, editForm[item.field])"
" v-model.trim="scope.row[item.field]" :placeholder="editForm[item.field].placeholder"
:clearable="editForm[item.field].clearable" :maxlength="editForm[item.field].maxlength ?? ''" :disabled="editForm[item.field].disabled && scope.row.guid !== undefined
" @input="inputKeyUp(editForm[item.field].regexp, scope, editForm[item.field])"
@change="(val) => inputChange(val, scope, item)"
@focus="(event) => inputFocus(event, scope, editForm[item.field])"
></el-input>
@focus="(event) => inputFocus(event, scope, editForm[item.field])"></el-input>
<template v-else-if="editForm[item.field] && editForm[item.field].type == 'defaultValue'">
<el-date-picker v-if="scope.row[item.dataTypeName] === 'date'" v-model="scope.row[item.field]" type="date"
format="YYYY-MM-DD" value-format="YYYY-MM-DD" :placeholder="editForm[item.field].placeholder" />
<el-date-picker v-else-if="scope.row[item.dataTypeName] === 'datetime'"
v-model="scope.row[item.field]" :placeholder="editForm[item.field].placeholder" type="datetime" format="YYYY-MM-DD HH:mm:ss"
<el-date-picker v-else-if="scope.row[item.dataTypeName] === 'datetime'" v-model="scope.row[item.field]"
:placeholder="editForm[item.field].placeholder" type="datetime" format="YYYY-MM-DD HH:mm:ss"
value-format="YYYY-MM-DD HH:mm:ss" />
<el-input v-else v-model.trim="scope.row[item.field]" :placeholder="editForm[item.field].placeholder" :clearable="editForm[item.field].clearable"
:maxlength="editForm[item.field].maxlength ?? ''"
<el-input v-else v-model.trim="scope.row[item.field]" :placeholder="editForm[item.field].placeholder"
:clearable="editForm[item.field].clearable" :maxlength="editForm[item.field].maxlength ?? ''"
@input="inputKeyUp(scope.row[item.dataTypeName] == 'int' ? /\D/g : (scope.row[item.dataTypeName] == 'decimal' ? /[^0-9.-]/g : ''), scope, editForm[item.field])"
@change="(val) => inputChange(val, scope, item)" />
</template>
<template
v-else-if="
<template v-else-if="
editForm[item.field] && editForm[item.field].type == 'btn'
"
>
">
<template v-for="btn in scope.row[item.field].btns">
<span
v-if="btn.visible ?? true"
class="text_btn"
@click="(btn.click && !btn.disabled && !scope.row.disabled) ? btn.click(scope, btn):handleClick(scope, btn)"
v-preReClick
>{{ btn.label }}</span
>
<span v-if="btn.visible ?? true" class="text_btn"
@click="(btn.click && !btn.disabled && !scope.row.disabled) ? btn.click(scope, btn) : handleClick(scope, btn)"
v-preReClick>{{ btn.label }}</span>
</template>
</template>
<template
v-else-if="
<template v-else-if="
editForm[item.field] && editForm[item.field].type == 'comb'
"
>
">
<div v-if="scope.row['ruleType'] == 'Serial'" class="input_comb">
<span>
<span>起始值</span>
<el-input
v-model.trim="scope.row.start"
style="width: 40px"
></el-input>
<el-input v-model.trim="scope.row.start" style="width: 40px"></el-input>
</span>
<span>
<span>最大值</span>
<el-input
v-model.trim="scope.row.max"
style="width: 100px"
></el-input>
<el-input v-model.trim="scope.row.max" style="width: 100px"></el-input>
</span>
<span>
<span>长度</span>
<el-input
v-model.trim="scope.row.len"
style="width: 40px"
></el-input>
<el-input v-model.trim="scope.row.len" style="width: 40px"></el-input>
</span>
<span>
<span>步长</span>
<el-input
v-model.trim="scope.row.step"
style="width: 40px"
></el-input>
<el-input v-model.trim="scope.row.step" style="width: 40px"></el-input>
</span>
</div>
<el-input
v-else-if="scope.row['ruleType'] == 'Fixed'"
v-model.trim="scope.row.fixedValue"
clearable
></el-input>
<el-select
v-else-if="scope.row['ruleType'] == 'Separator'"
v-model="scope.row.separator"
clearable
>
<el-option
v-if="props.tableInfo.readonly"
label="--"
value=""
/>
<el-option
v-for="opt in editForm[item.field].codeRule.Separator.options"
:key="opt.value"
:label="opt.label"
:value="opt.value"
/>
<el-input v-else-if="scope.row['ruleType'] == 'Fixed'" v-model.trim="scope.row.fixedValue"
clearable></el-input>
<el-select v-else-if="scope.row['ruleType'] == 'Separator'" v-model="scope.row.separator" clearable>
<el-option v-if="props.tableInfo.readonly" label="--" value="" />
<el-option v-for="opt in editForm[item.field].codeRule.Separator.options" :key="opt.value"
:label="opt.label" :value="opt.value" />
</el-select>
<el-select
v-else-if="scope.row['ruleType'] == 'Date'"
v-model="scope.row.format"
clearable
>
<el-option
v-if="props.tableInfo.readonly"
label="--"
value=""
/>
<el-option
v-for="opt in editForm[item.field].codeRule.Date.options"
:key="opt.value"
:label="opt.label"
:value="opt.value"
/>
<el-select v-else-if="scope.row['ruleType'] == 'Date'" v-model="scope.row.format" clearable>
<el-option v-if="props.tableInfo.readonly" label="--" value="" />
<el-option v-for="opt in editForm[item.field].codeRule.Date.options" :key="opt.value" :label="opt.label"
:value="opt.value" />
</el-select>
<el-select
v-else-if="scope.row['ruleType'] == 'Guid'"
v-model="scope.row.mode"
clearable
>
<el-option
v-if="props.tableInfo.readonly"
label="--"
value=""
/>
<el-option
v-for="opt in editForm[item.field].codeRule.Guid.options"
:key="opt.value"
:label="opt.label"
:value="opt.value"
/>
<el-select v-else-if="scope.row['ruleType'] == 'Guid'" v-model="scope.row.mode" clearable>
<el-option v-if="props.tableInfo.readonly" label="--" value="" />
<el-option v-for="opt in editForm[item.field].codeRule.Guid.options" :key="opt.value" :label="opt.label"
:value="opt.value" />
</el-select>
<span v-else>{{ scope.row[item.field] ?? "--" }}</span>
</template>
......@@ -570,7 +439,7 @@ onMounted(() => {
<el-icon class="svg-title-icon" :class="item.getSvg(scope)">
<svg-icon :name="item.getSvg(scope)" />
</el-icon>
<span :style="{'margin-left': '5px'}">{{
<span :style="{ 'margin-left': '5px' }">{{
item.getName
? item.getName(scope)
: scope.row[item.field] !== 0 && !scope.row[item.field]
......@@ -588,21 +457,12 @@ onMounted(() => {
}}</span>
</template>
</el-table-column>
<el-table-column
:width="actionInfo.width"
:class-name="actionInfo.columClass"
fixed="right"
v-if="actionInfo.show ?? true"
>
<el-table-column :width="actionInfo.width" :class-name="actionInfo.columClass" fixed="right"
v-if="actionInfo.show ?? true">
<template #header>
<div class="header_title">
<span>{{ actionInfo.label ?? "操作" }}</span>
<el-tooltip
placement="top"
effect="light"
popper-class="table_tooltip"
v-if="actionInfo.tooltip"
>
<el-tooltip placement="top" effect="light" popper-class="table_tooltip" v-if="actionInfo.tooltip">
<template #content>
<div style="width: 236px; text-align: justify">
帮助:初始化为系统底层操作,为会员创建数据库及系统表操作,一旦初始化将不可以删除会员。
......@@ -618,63 +478,35 @@ onMounted(() => {
<!-- 某些操作按钮需要根据当前行信息设置显示隐藏,actionInfo.btns使用回调函数返回。 -->
<template v-if="actionInfo.isMore">
<template v-if="Array.isArray(actionInfo.btns)
? actionInfo.btns.length>4
: actionInfo.btns(scope).length>4">
<template
v-for="(btn, b) in Array.isArray(actionInfo.btns)
? actionInfo.btns.slice(0,4)
: actionInfo.btns(scope).slice(0,4)"
>
<span
class="operate_btn"
:class="{ active: btn.visible ?? true }"
v-if="btn.visible ?? true"
>
<BtnPopover
v-if="btn.value == 'authority'"
:popover-info="{ scope, btn, ...popverData }"
@showPopver="handleClick"
@popverBtnClick="handleClick"
/>
<span
class="text_btn"
:class="{ 'is-disabled': !!btn.disabled }"
v-else
@click="(btn.click && !btn.disabled && !scope.row.disabled) ? btn.click(scope, btn):handleClick(scope, btn)"
v-preReClick
>{{ btn.label }}</span>
? actionInfo.btns.length > 4
: actionInfo.btns(scope).length > 4">
<template v-for="(btn, b) in Array.isArray(actionInfo.btns)
? actionInfo.btns.slice(0, 4)
: actionInfo.btns(scope).slice(0, 4)">
<span class="operate_btn" :class="{ active: btn.visible ?? true }" v-if="btn.visible ?? true">
<BtnPopover v-if="btn.value == 'authority'" :popover-info="{ scope, btn, ...popverData }"
@showPopver="handleClick" @popverBtnClick="handleClick" />
<span class="text_btn" :class="{ 'is-disabled': !!btn.disabled }" v-else
@click="(btn.click && !btn.disabled && !scope.row.disabled) ? btn.click(scope, btn) : handleClick(scope, btn)"
v-preReClick>{{ btn.label }}</span>
</span>
</template>
<span class="operate_btn active">
<el-dropdown trigger="hover" :show-timeout="50" >
<el-dropdown trigger="hover" :show-timeout="50">
<span class="text_btn">...</span>
<template #dropdown>
<el-dropdown-menu >
<el-dropdown-menu>
<el-dropdown-item v-for="(btn, b) in Array.isArray(actionInfo.btns)
? actionInfo.btns.slice(4)
: actionInfo.btns(scope).slice(4)">
<span
class="operate_btn"
style="width: 100%; display: inline-block;"
:class="{ active: btn.visible ?? true }"
v-if="btn.visible ?? true"
>
<BtnPopover
v-if="btn.value == 'authority'"
:popover-info="{ scope, btn, ...popverData }"
@showPopver="handleClick"
@popverBtnClick="handleClick"
/>
<span
class="text_btn"
style="width: 100%;display: block;"
:class="{ 'is-disabled': !!btn.disabled }"
v-else
<span class="operate_btn" style="width: 100%; display: inline-block;"
:class="{ active: btn.visible ?? true }" v-if="btn.visible ?? true">
<BtnPopover v-if="btn.value == 'authority'" :popover-info="{ scope, btn, ...popverData }"
@showPopver="handleClick" @popverBtnClick="handleClick" />
<span class="text_btn" style="width: 100%;display: block;"
:class="{ 'is-disabled': !!btn.disabled }" v-else
@click="(btn.click && !btn.disabled && !scope.row.disabled) ? btn.click(scope, btn) : handleClick(scope, btn)"
v-preReClick
>{{ btn.label }}</span
>
v-preReClick>{{ btn.label }}</span>
</span>
</el-dropdown-item>
</el-dropdown-menu>
......@@ -683,104 +515,58 @@ onMounted(() => {
</span>
</template>
<template v-else>
<template
v-for="(btn, b) in Array.isArray(actionInfo.btns)
<template v-for="(btn, b) in Array.isArray(actionInfo.btns)
? actionInfo.btns
: actionInfo.btns(scope)"
>
<span
class="operate_btn"
:class="{ active: btn.visible ?? true }"
v-if="btn.visible ?? true"
>
<BtnPopover
v-if="btn.value == 'authority'"
:popover-info="{ scope, btn, ...popverData }"
@showPopver="handleClick"
@popverBtnClick="handleClick"
/>
<span
class="text_btn"
:class="{ 'is-disabled': !!btn.disabled }"
v-else
: actionInfo.btns(scope)">
<span class="operate_btn" :class="{ active: btn.visible ?? true }" v-if="btn.visible ?? true">
<BtnPopover v-if="btn.value == 'authority'" :popover-info="{ scope, btn, ...popverData }"
@showPopver="handleClick" @popverBtnClick="handleClick" />
<span class="text_btn" :class="{ 'is-disabled': !!btn.disabled }" v-else
@click="(btn.click && !btn.disabled && !scope.row.disabled) ? btn.click(scope, btn) : handleClick(scope, btn)"
v-preReClick
>{{ btn.label }}</span>
v-preReClick>{{ btn.label }}</span>
</span>
</template>
</template>
</template>
<template v-else>
<template
v-for="(btn, b) in Array.isArray(actionInfo.btns)
<template v-for="(btn, b) in Array.isArray(actionInfo.btns)
? actionInfo.btns
: actionInfo.btns(scope)"
>
<span
class="operate_btn"
:class="{ active: btn.visible ?? true, 'sort-icon': btn.value == 'sort' }"
v-if="btn.visible ?? true"
>
: actionInfo.btns(scope)">
<span class="operate_btn" :class="{ active: btn.visible ?? true, 'sort-icon': btn.value == 'sort' }"
v-if="btn.visible ?? true">
<el-icon v-if="btn.value == 'sort'" style="width: 24px;height: 15px;vertical-align: text-top;">
<svg-icon style="width: 24px;height: 15px;" name="sort-drag" />
</el-icon>
<BtnPopover
v-if="btn.value == 'authority'"
:popover-info="{ scope, btn, ...popverData }"
@showPopver="handleClick"
@popverBtnClick="handleClick"
/>
<span
class="text_btn"
:class="{ 'is-disabled': !!btn.disabled }"
v-else
@click="(btn.click && !btn.disabled && !scope.row.disabled) ? btn.click(scope, btn):handleClick(scope, btn)"
v-preReClick
>{{ btn.label }}</span>
<BtnPopover v-if="btn.value == 'authority'" :popover-info="{ scope, btn, ...popverData }"
@showPopver="handleClick" @popverBtnClick="handleClick" />
<span class="text_btn" :class="{ 'is-disabled': !!btn.disabled }" v-else
@click="(btn.click && !btn.disabled && !scope.row.disabled) ? btn.click(scope, btn) : handleClick(scope, btn)"
v-preReClick>{{ btn.label }}</span>
</span>
</template>
</template>
<template
v-if="
<template v-if="
props.tableInfo.id.indexOf('maintenance') > -1 &&
scope.row.isInit == 'N'
"
>
<span
class="text_btn"
@click="handleClick(scope, { label: '初始化', value: 'init' })"
v-preReClick
>初始化</span
>
">
<span class="text_btn" @click="handleClick(scope, { label: '初始化', value: 'init' })" v-preReClick>初始化</span>
</template>
<template
v-else-if="
<template v-else-if="
props.tableInfo.id.indexOf('product-menu') > -1 &&
scope.row.menuType != 'F'
"
>
<span
class="text_btn"
@click="
">
<span class="text_btn" @click="
handleClick(scope, { label: '添加子菜单', value: 'menu' })
"
v-preReClick
>添加子菜单</span
>
" v-preReClick>添加子菜单</span>
</template>
</template>
</el-table-column>
<template #append>
<td :class="props.tableInfo.footerClass" v-if="props.tableInfo.footerHtml" :colspan="5" v-html="props.tableInfo.footerHtml"></td>
<td :class="props.tableInfo.footerClass" v-if="props.tableInfo.footerHtml" :colspan="5"
v-html="props.tableInfo.footerHtml"></td>
</template>
</el-table>
<PageNav
v-if="showPage"
:class="[pageInfo.type, pageInfo.col]"
:pageInfo="pageInfo"
@pageChange="pageChange"
/>
<PageNav v-if="showPage" :class="[pageInfo.type, pageInfo.col]" :pageInfo="pageInfo" @pageChange="pageChange" />
</div>
</template>
......@@ -810,17 +596,18 @@ onMounted(() => {
}
}
}
.input_comb {
> span:not(:last-child) {
>span:not(:last-child) {
margin-right: 12px;
> span {
>span {
margin-right: 4px;
}
}
> span:last-child {
> span {
>span:last-child {
>span {
margin-right: 4px;
}
}
......@@ -834,7 +621,7 @@ onMounted(() => {
padding-right: 4px;
position: relative;
& ~ .active {
&~.active {
padding-left: 4px;
margin-left: 1px;
......@@ -855,12 +642,13 @@ onMounted(() => {
}
}
}
.primary {
.el-table__cell {
background: none;
}
}
}
}
.svg-title-icon {
......@@ -875,6 +663,7 @@ onMounted(() => {
&.icon-audit {
color: #b2b2b2
}
svg {
width: 100%;
height: 100%;
......@@ -892,5 +681,4 @@ onMounted(() => {
justify-content: space-between;
padding: 0px 8px;
}
</style>
......
......@@ -50,7 +50,7 @@ router.beforeEach(async (to, from, next) => {
})
}
// 如果未开启主页,但进入的是主页,则会进入侧边栏导航第一个模块
else if (!settingsStore.settings.home.enable && to.name === 'home') {
else if (!settingsStore.settings.home.enable && (to.name === 'home' || to.name === undefined)) {
if (menuStore.sidebarMenus.length > 0) {
next({
path: menuStore.sidebarMenusFirstDeepestPath,
......
......@@ -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'),
......
......@@ -4,7 +4,7 @@ import router from '@/router'
import { ElMessage } from 'element-plus'
import apiUser from '@/api/modules/user'
import { getCurrentTime } from '@/utils/common'
import { getUserInfo, getTokenByCode, loginOut, refreshToken, editPasswordInterface } from '@/api/modules/queryService'
import { getSystemMenu, getUserInfo, getTokenByCode, loginOut, refreshToken, editPasswordInterface } from '@/api/modules/queryService'
const useUserStore = defineStore(
// 唯一ID
......@@ -17,6 +17,7 @@ const useUserStore = defineStore(
const userId = ref(localStorage.userId ?? '')
const userName = ref(localStorage.userName ?? '')
const userData = ref(localStorage.userData ?? '{}')
const currentTenantGuid = ref(localStorage.currentTenantGuid ?? '');
const userInfoData = ref(JSON.parse(localStorage.userInfoData ?? "[]"))
const token = ref(localStorage.token ?? '')
const tabbarMap: any = ref({})
......@@ -30,10 +31,14 @@ const useUserStore = defineStore(
const timer: any = ref(null);
//获取token.
function getToken(data, state) {
data.platformGuid = "6646dcad76c411eea911fa163e419da9";
data.platformGuid = "7f16f697aec111ef8656fa163e60becd";
data.userType = 2;
isLogin.value = true;
data.validateUri = location.origin + '/';
debugger
debugger
return getTokenPromise.value = getTokenByCode(data).then((res: any) => {
debugger
debugger
getTokenPromise.value = null;
console.log(res);
if (res.code == '00000') {
......@@ -41,25 +46,24 @@ const useUserStore = defineStore(
isLogin.value = true;
localStorage.setItem('code', `${data.code}`);
localStorage.setItem('state', state);
localStorage.setItem('token', res.data.access_token || "");
localStorage.setItem('token', res.data.token || "");
token.value = res.data.access_token;
localStorage.setItem('refresh_token', res.data.refresh_token || "");
localStorage.setItem('refresh_token', res.data.refreshToken || "");
const expiresIn = (Date.now() + 1700000) + "";
localStorage.setItem('expiresIn', expiresIn);
refreshUserToken();
//获取用户信息
localStorage.setItem('account', res.data.logonUser)
localStorage.setItem('userId', res.data.userId)
localStorage.setItem('userName', res.data.userName)
localStorage.setItem('userData', JSON.stringify(res.data.data))
account.value = res.data.logonUser
userId.value = res.data.userId
userName.value = res.data.userName
userData.value = JSON.stringify(res.data.data)
return getUserInfo().then((info: any) => {
// userData.value = JSON.stringify(res.data.data);
currentTenantGuid.value = res.data.tenantInfoList && res.data.tenantInfoList.length ? res.data.tenantInfoList[0].guid : '';
let currentTenant = res.data.tenantInfoList?.[0];
return getSystemMenu({ tenantGuid: currentTenantGuid.value }).then((info: any) => {
if (info.code == '00000') {
localStorage.setItem('userInfoData', JSON.stringify(info.data))
userInfoData.value = info.data
localStorage.setItem('userName', currentTenant?.name)
localStorage.setItem('userInfoData', JSON.stringify(info.data));
userInfoData.value = info.data;
} else {
ElMessage.error(info.msg)
}
......
......@@ -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,24 +349,26 @@ 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: "isPublicData", width: 120, getName: (scope) => {
// return scope.row.isPublicData == 'Y' ? '是' : '否';
// }
// },
{ label: "任务名称", field: "taskName", width: 96 },
{
label: "执行状态", field: "approveState", width: TableColumnWidth.STATE, align: 'center', type: "tag", getName: (scope) => {
return filterVal(scope.row.approveState, 'approveState');
label: "目录名称", field: "cgDirName", width: 120, type: "text_btn", columClass: 'text_btn', click: (scope) => {
router.push({
name: "templateConfig",
query: { guid: scope.row.damGuid },
});
}
},
{ label: "任务修改人", field: "damName", width: 120 },
{ label: "分类分级模板", field: "cgTemplateName", width: 200 },
{ label: "元数据", field: "metaNames", width: 200 },
{
label: "执行状态", field: "status", width: TableColumnWidth.STATE, align: 'center', type: "tag", getName: (scope) => {
return filterVal(scope.row.status, 'status');
}
},
{ 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 +377,7 @@ const tableInfo = ref({
},
],
loading: false,
data: [],
data: datas || [],
page: {
type: "normal",
rows: 0,
......@@ -71,22 +386,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 +436,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 +451,7 @@ const toPath = (type) => {
type
},
});
} else {
} else if(type == 'edit'){
router.push({
name: "taskEdit",
query: {
......@@ -139,6 +460,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, 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";
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 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 data2 = [
{}
]
const treeIndex: any = ref({})
const treeInfo = ref({
id: "data-pickup-tree",
filter: true,
queryValue: "",
queryPlaceholder: "输入组织名称搜索",
props: {
label: "organisationName",
value: "guid",
},
nodeKey: 'guid',
expandedKey: [],
expandOnNodeClick: false,
data: data1 || [],
});
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 tabsInfo = ref({
activeName: 'field',
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: 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: "damTypeName", width: 120 },
{ label: "字段数", field: "damTypeName", width: 96, align: 'right' },
{ label: "已分类字段数", field: "damTypeName", width: 120, align: 'right' },
{ label: "已分级字段数", field: "damTypeName", width: 120, align: 'right' },
],
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: "approveState", width: 140, align: 'center', type: "tag", getName: (scope) => {
return filterVal(scope.row.approveState, 'approveState');
}
},
{ 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 },
],
loading: false,
data: data2 || [],
showPage: true,
page: {
type: "normal",
rows: 0,
...page.value,
},
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;
},
},
})
const tabChange = (val) => {
tabsInfo.value.activeName = val;
}
const nodeClick = (data) => {
treeIndex.value = data
}
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">
<div class="title_wrap">
<span class="title_text">{{ templateInfo.title }}</span>
<el-tag type="warning">{{ templateInfo.mark }}</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>
</div>
<div class="desc_item">
<span class="desc_label">执行时间:</span>
<span class="desc_value">2021-12-12 09:12:13</span>
</div>
</div>
<div class="desc_group">
<div class="desc_item">
<span class="desc_label">分类:</span>
<span class="desc_value text_btn">医疗数据</span>
</div>
<div class="desc_item">
<span class="desc_label">元数据名称:</span>
<span class="desc_value">名称1、名称2、名称3</span>
</div>
</div>
</div>
<p class="panel_desc">
<el-icon>
<Warning />
</el-icon>
<span>本次分类分级任务共涉及: </span>
<span class="text_btn">40</span>
<span>张表,共</span>
<span class="text_btn">4023</span>
<span>个字段,已分类</span>
<span class="text_btn">2099</span>
<span>个字段,已分级</span>
<span class="text_btn">1987</span>
<span>个字段</span>
</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 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" />
<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" border :height="'100%'"
style="width: 100%; display: inline-block" :style="{ 'min-height': '100%' }">
<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)">{{
item.getName ? item.getName(scope) : tagMethod(scope.row, item.field)
}}</el-tag>
</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-column label="操作" :width="fieldTableInfo.actionInfo.width"
:class-name="fieldTableInfo.actionInfo.columClass" 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>
</template>
</el-table-column>
</el-table>
<PageNav :class="[fieldTableInfo.page.type, fieldTableInfo.page.col]" :pageInfo="fieldTableInfo.page"
@pageChange="tablePageChange" />
</div>
</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);
padding: 0 !important;
overflow: hidden auto;
flex: 1;
&.panel {
padding: 0 16px;
}
.template_panel {
padding: 0 16px;
.panel_title {
display: flex;
justify-content: space-between;
align-items: center;
margin: 8px 0;
flex: 1;
.title_wrap {
display: flex;
align-items: center;
.title_text {
font-size: 16px;
color: #212121;
line-height: 24px;
font-weight: 600;
margin-right: 12px;
}
}
}
.title_desc {
.desc_group {
display: flex;
margin: 8px 0;
.desc_item+.desc_item {
margin-left: 40px;
}
}
}
.panel_tags {
.el-tag {
margin-right: 8px;
}
}
.panel_desc {
height: 40px;
margin: 16px 0 8px;
padding: 0 12px;
font-size: 14px;
color: #666;
display: flex;
align-items: center;
background: #EFFBFC;
border: 1px solid rgba(195, 219, 219, 1);
.el-icon {
width: 14px;
height: 14px;
color: #4FA1A4;
}
>span {
margin-left: 8px;
}
}
}
.panel_content {
height: 100%;
.panel {
height: calc(100% - 47px);
padding: 0 16px;
&.flex {
height: calc(100% - 36px);
display: flex;
justify-content: space-between;
flex: 1;
.box_left {
width: 240px;
height: 100%;
border-right: 1px solid #d9d9d9;
margin-left: -16px;
.aside_title {
padding: 0 8px;
height: 40px;
line-height: 40px;
font-size: 14px;
color: #212121;
font-weight: 600;
margin-top: 8px;
}
.tree_panel {
padding: 0;
}
}
.box_right {
width: calc(100% - 240px);
}
}
}
:deep(.panel_tabs) {
.el-tabs__header {
margin-bottom: 0;
}
.el-tabs__nav-scroll {
padding: 0 16px;
}
}
:deep(.table_tool_wrap) {
.table-tools {
.tools_search {
padding-top: 12px;
}
}
}
.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% - 135px);
.table_panel {
width: 100%;
height: 100%;
}
}
}
}
}
.tool_btns {
height: 44px;
margin: 0 -8px;
display: flex;
justify-content: center;
align-items: center;
border-top: 1px solid #d9d9d9;
}
}
}
</style>
......@@ -20,68 +20,7 @@ const userStore = useUserStore();
const userData = JSON.parse(userStore.userData);
const assetStore = useDataAssetStore();
const step = ref(0);
const selectIndex = ref(0);
const asideSearchInput = ref("");
const permissionList: any = ref([])
const listLoading = ref(false)
const listPage = ref({
limit: 50,
curr: 1,
totalPages: 0
})
const currpermissionList: any = ref([
{
"guid": "62d01ad586774db2bb3955dfb2d18366",
"productGuid": null,
"productName": null,
"dataPermissionName": "当前用户",
"bizState": "Y",
"createUserName": "数往知来管理员",
"createTime": "2024-01-24 14:08:43",
"sqlScript": null,
"dataSourceGuid": null
},
{
"guid": "d68a27c1998540a2b8e8f22a2d5eebef",
"productGuid": null,
"productName": null,
"dataPermissionName": "组织权限",
"bizState": "Y",
"createUserName": "数往知来管理员",
"createTime": "2024-01-24 11:47:02",
"sqlScript": null,
"dataSourceGuid": 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 treeIndex: any = ref({})
const treeInfo = ref({
id: "data-pickup-tree",
filter: true,
queryValue: "",
queryPlaceholder: "输入组织名称搜索",
props: {
label: "organisationName",
value: "guid",
},
nodeKey: 'guid',
expandedKey: [],
expandOnNodeClick: false,
data: [
const data1 = [
{
"children": [
{
......@@ -363,7 +302,70 @@ const treeInfo = ref({
"levelCode": "8",
"displayCreateTime": "2024-01-16 11:38:24"
}
]
const step = ref(0);
const selectIndex = ref(0);
const asideSearchInput = ref("");
const permissionList: any = ref([])
const listLoading = ref(false)
const listPage = ref({
limit: 50,
curr: 1,
totalPages: 0
})
const currpermissionList: any = ref([
{
"guid": "62d01ad586774db2bb3955dfb2d18366",
"productGuid": null,
"productName": null,
"dataPermissionName": "当前用户",
"bizState": "Y",
"createUserName": "数往知来管理员",
"createTime": "2024-01-24 14:08:43",
"sqlScript": null,
"dataSourceGuid": null
},
{
"guid": "d68a27c1998540a2b8e8f22a2d5eebef",
"productGuid": null,
"productName": null,
"dataPermissionName": "组织权限",
"bizState": "Y",
"createUserName": "数往知来管理员",
"createTime": "2024-01-24 11:47:02",
"sqlScript": null,
"dataSourceGuid": 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 treeIndex: any = ref({})
const treeInfo = ref({
id: "data-pickup-tree",
filter: true,
queryValue: "",
queryPlaceholder: "输入组织名称搜索",
props: {
label: "organisationName",
value: "guid",
},
nodeKey: 'guid',
expandedKey: [],
expandOnNodeClick: false,
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 },
......@@ -607,7 +611,7 @@ onBeforeMount(() => {
<template>
<div class="container_wrap full flex">
<div class="aside_wrap" v-show="step == 0">
<div class="aside_title">选择分类分级模板</div>
<div class="aside_title">选择分类</div>
<div class="aside_search">
<el-input v-model.trim="asideSearchInput" placeholder="请输入关键字" :prefix-icon="Search" clearable
@change="querySearch" />
......@@ -773,9 +777,11 @@ onBeforeMount(() => {
}
.panel_desc {
margin: 8px 0;
margin: 8px 0 16px;
font-size: 14px;
color: #666;
line-height: 1.5;
text-align: justify;
}
}
......
<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: "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: 100,
btns: (scope) => {
let row = scope.row, btnArr: any = [
{ label: "查看结果", value: "path" },
];
// 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 == "path") {
toPath(type);
} else if (type === "delete") {
open("此操作将永久删除,是否继续?", "warning");
}
};
const toPath = (type) => {
router.push({
name: "taskDetail",
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!