210b5eb5 by xukangle

updata: 新增了标签管理

1 parent d8c0a524
......@@ -3,7 +3,7 @@ VITE_APP_TITLE = 数据资产管理系统
# 接口域名
# VITE_API_BASEURL = https://www.zgsjzc.com/api
# VITE_API_BASEURL = https://swzl-test.csbr.cn/api
# VITE_API_BASEURL = http://10.4.82.30:8052/
# VITE_API_BASEURL = http://localhost:9000
VITE_API_BASEURL = http://10.4.82.1:28052/
# 平台用户 接口请地址
VITE_APP_USER_API_BASEURL = gateway-server/user
......@@ -24,10 +24,10 @@ VITE_APP_PLAN_BASEURL = ms-daop-jgjf-data-plan-service
#数据质量接口地址
VITE_APP_QUALITY_BASEURL = ms-daop-data-quality-service
#数据盘点接口地址
#数据盘点接口地址ms-daop-zcgl-data-inventory
# VITE_APP_CHECK_BASEURL = /mock
VITE_APP_CHECK_BASEURL = ms-daop-zcgl-data-inventory
#门户接口
VITE_API_PORTALURL = https://swzl-test.zgsjzc.com/portal
......
......@@ -35,7 +35,6 @@
"lodash-es": "^4.17.21",
"md5": "^2.3.0",
"mitt": "^3.0.0",
"mockjs": "^1.1.0",
"moment": "^2.29.4",
"nprogress": "^0.2.0",
"path-browserify": "^1.0.1",
......@@ -67,6 +66,7 @@
"fs-extra": "^11.1.1",
"http-server": "^14.1.1",
"lint-staged": "^13.2.2",
"mockjs": "^1.1.0",
"npm-run-all": "^4.1.5",
"plop": "^3.1.2",
"postcss-html": "^1.5.0",
......
......@@ -173,3 +173,56 @@ export const deleteClassify = (data) => request({
url: `${import.meta.env.VITE_APP_CHECK_BASEURL}/classify/delete?guid=${data.guid}`,
method: 'delete',
})
/** ---------------分类分级模板------------------------ */
/**
* 分类分级模板新增
* @param {Object}
* @path /cg-template/save
*/
export const saveCgTemplate = (data) => request({
url: `${import.meta.env.VITE_APP_CHECK_BASEURL}/cg-template/save`,
method: 'post',
data
})
/**
* 分类分级模板左侧树形列表
* @param {Object}
* @path /cg-template-classify/tree-list
*/
export const getCgTemplateClassifyTreeList = (data) => request({
url: `${import.meta.env.VITE_APP_CHECK_BASEURL}/cg-template-classify/tree-list`,
method: 'post',
data
})
/**-------------------------分类分级目录--------------------------------- */
/**
* 分类分级目录树形列表
* @param {Object}
* @path /cg-dir/tree-list
*/
export const getCgDirTreeList = (data) => request({
url: `${import.meta.env.VITE_APP_CHECK_BASEURL}/cg-dir/tree-list`,
method: 'post',
data
})
/**
* 分类分级目录-分页
* @param {Object}
* @path /cg-dir/field/page-list
*/
export const getCgDirFieldPageList = (data) => request({
url: `${import.meta.env.VITE_APP_CHECK_BASEURL}/cg-dir/field/page-list`,
method: 'post',
data
})
......
import request from "@/utils/request";
/**
* 远程获取标签
* @param {Object}
* @path /cg-label/label-serach
* @method get
* @des query查询 label
*/
export const getLabelList = (data) => request({
url: `${import.meta.env.VITE_APP_CHECK_BASEURL}/cg-label/label-serach?label=${data.label}`,
method: 'get',
})
/**
* 分类分级树形目录
* @param {no params}
* @path /classify-grade/tree-list
* @method post
*/
export const getClassifyGradeTreeList = () => request({
url: `${import.meta.env.VITE_APP_CHECK_BASEURL}/classify-grade/tree-list`,
method: 'post',
})
/**
* @des 新增标签规则
* @param {Object}
* @path /cg-label/save
*/
export const saveLabel = (data) => request({
url: `${import.meta.env.VITE_APP_CHECK_BASEURL}/cg-label/save`,
method: 'post',
data
})
/**
* @des 获取标签页规则列表
* @param {Object}
* @path /cg-label/page-list
*/
export const getLabelPageList = (data) => request({
url: `${import.meta.env.VITE_APP_CHECK_BASEURL}/cg-label/page-list`,
method: 'post',
data
})
/**
* @des 删除标签规则
* @param {Array}
* @path /cg-label/delete
*/
export const deleteLabel = (data) => request({
url: `${import.meta.env.VITE_APP_CHECK_BASEURL}/cg-label/delete`,
method: 'delete',
data
})
/**
* @des 标签规则修改
* @param {Object}
* @path /cg-label/update
*/
export const updateLabel = (data) => request({
url: `${import.meta.env.VITE_APP_CHECK_BASEURL}/cg-label/update`,
method: 'post',
data
})
......@@ -14,6 +14,8 @@ const props = defineProps({
},
});
const dialogRef = ref();
const dialogInfo = computed(() => {
return {
visible: props.dialogConfigInfo.visible,
......@@ -49,10 +51,16 @@ const formDialogRadioGroupChange = (val, row, item) => {
const formDialogSelectChange = (val, item, row) => {
emits('formDialogSelectChange', val, row, item);
}
defineExpose({
dialogRef,
});
</script>
<template>
<Dialog :dialogInfo="dialogInfo" @btnClick="formDialogBtnClick" @radioGroupChange="formDialogRadioGroupChange"
@select-change="formDialogSelectChange" />
<Dialog ref="dialogRef" :dialogInfo="dialogInfo" @btnClick="formDialogBtnClick"
@radioGroupChange="formDialogRadioGroupChange" @select-change="formDialogSelectChange">
<!-- 默认插槽内容 -->
<slot></slot>
</Dialog>
</template>
......
......@@ -99,7 +99,7 @@ const onClickOutside = (e: any) => {
};
const getDrawerConRef = (refName) => {
if(refName == 'drawerTableRef'){
if (refName == 'drawerTableRef') {
const dtf = drawerTableRef.value[0] || drawerTableRef.value
return dtf?.tableRef
}
......@@ -228,90 +228,45 @@ const drawerClose = () => {
</script>
<template>
<el-drawer
v-model="drawerVisible"
:direction="drawerDirection"
:size="drawerSize"
:modal="drawerModal"
:close-on-click-modal="modalClose"
:close-on-press-escape="modalClose"
:modal-class="drawerModalClass"
destroy-on-close
:z-index="props.drawerInfo.zIndex ?? null"
@close="drawerClose"
>
<el-drawer v-model="drawerVisible" :direction="drawerDirection" :size="drawerSize" :modal="drawerModal"
:close-on-click-modal="modalClose" :close-on-press-escape="modalClose" :modal-class="drawerModalClass"
destroy-on-close :z-index="props.drawerInfo.zIndex ?? null" @close="drawerClose">
<template #header>
<span class="title">{{ drawerTitle }}</span>
</template>
<template #default>
<div class="drawer-body-loading" v-if="drawerInfo.loading ?? false" v-loading="drawerInfo.loading ?? false"></div>
<div
v-else
class="drawer_panel"
:class="[con.col]"
:style="con.style"
v-for="con in contents"
>
<div v-else class="drawer_panel" :class="[con.col]" :style="con.style" v-for="con in contents">
<div class="panel_title" v-if="con.title">{{ con.title }}</div>
<template v-if="con.type && con.type.indexOf('table') > -1">
<div
class="table_tool"
:class="[con.tableTool.col]"
v-if="con.tableTool && (con.tableTool.visible ?? true)"
>
<div class="table_tool" :class="[con.tableTool.col]" v-if="con.tableTool && (con.tableTool.visible ?? true)">
<template v-for="bar in con.tableTool.btns">
<el-popover
v-if="bar.popover"
:visible="bar.popover.visible"
:title="bar.popover.title"
:popper-class="bar.popover.class ?? ''"
placement="bottom-start"
:width="bar.popover.width ?? 200"
trigger="click"
>
<el-popover v-if="bar.popover" :visible="bar.popover.visible" :title="bar.popover.title"
:popper-class="bar.popover.class ?? ''" placement="bottom-start" :width="bar.popover.width ?? 200"
trigger="click">
<template #reference>
<el-button
:type="bar.type"
@click="toolBtnClick(bar, con.type)"
v-click-outside="onClickOutside"
v-preReClick
>{{ bar.label }}</el-button
>
<el-button :type="bar.type" @click="toolBtnClick(bar, con.type)" v-click-outside="onClickOutside"
v-preReClick>{{ bar.label }}</el-button>
</template>
<template #default>
<span v-html="bar.popover.content"></span>
</template>
</el-popover>
<el-button
:type="bar.type"
:plain="bar.plain"
v-else
@click="toolBtnClick(bar, 'table')"
v-preReClick
>{{ bar.label }}</el-button
>
<el-button :type="bar.type" :plain="bar.plain" v-else @click="toolBtnClick(bar, 'table')" v-preReClick>{{
bar.label
}}</el-button>
</template>
</div>
<div class="table_panel_wrap" :style="con.tableInfo.style">
<Table
ref="drawerTableRef"
:class="[con.tableInfo.col]"
:tableInfo="con.tableInfo"
@tableSelectChange="tableSelectChange"
@tableBtnClick="tableBtnClick"
@tableSelectionChange="tableSelectionChange"
@tableInputChange="tableInputChange"
@tablePageChange="tablePageChange"
/>
<Table ref="drawerTableRef" :class="[con.tableInfo.col]" :tableInfo="con.tableInfo"
@tableSelectChange="tableSelectChange" @tableBtnClick="tableBtnClick"
@tableSelectionChange="tableSelectionChange" @tableInputChange="tableInputChange"
@tablePageChange="tablePageChange" />
</div>
</template>
<template v-else-if="con.type && con.type.indexOf('tree') > -1">
<div class="list_tree" v-if="con.type.indexOf('list') > -1">
<ListPanel
ref="formListRef"
:listInfo="con.listInfo"
@itemClick="listItemClick"
/>
<ListPanel ref="formListRef" :listInfo="con.listInfo" @itemClick="listItemClick" />
<Tree ref="formTreeRef" :treeInfo="con.treeInfo" />
</div>
<Tree ref="formTreeRef" :treeInfo="con.treeInfo" v-else />
......@@ -329,23 +284,12 @@ const drawerClose = () => {
</template>
<template v-else-if="con.type && con.type.indexOf('upload') > -1">
<div class="upload_tool">
<UploadFiles
ref="uploadRef"
:upload-info="con.uploadInfo"
@onUpload="onUpload"
@beforeUPload="beforeUPload"
@uploadFile="uploadFile"
@uploadBtnClick="uploadBtnClick"
/>
<UploadFiles ref="uploadRef" :upload-info="con.uploadInfo" @onUpload="onUpload" @beforeUPload="beforeUPload"
@uploadFile="uploadFile" @uploadBtnClick="uploadBtnClick" />
<div class="tool_btns" v-if="con.tools && con.tools.visible">
<template v-for="btn in con.tools.btns">
<el-button
v-if="btn.visible ?? true"
:type="btn.type"
:plain="btn.plain"
@click="toolBtnClick(btn, 'table')"
v-preReClick
>
<el-button v-if="btn.visible ?? true" :type="btn.type" :plain="btn.plain"
@click="toolBtnClick(btn, 'table')" v-preReClick>
<el-icon v-if="btn.icon && btn.icon == 'Upload'">
<Upload />
</el-icon>
......@@ -357,49 +301,28 @@ const drawerClose = () => {
</template>
</div>
</div>
<div
class="upload_table_panel_wrap"
v-if="con.tableInfo && Object.keys(con.tableInfo).length"
>
<Table
ref="drawerTableRef"
:class="[con.tableInfo.col]"
:tableInfo="con.tableInfo"
@tableSelectChange="tableSelectChange"
@tableBtnClick="tableBtnClick"
@tableSelectionChange="tableSelectionChange"
@tableInputChange="tableInputChange"
@tablePageChange="tablePageChange"
/>
<div class="upload_table_panel_wrap" v-if="con.tableInfo && Object.keys(con.tableInfo).length">
<Table ref="drawerTableRef" :class="[con.tableInfo.col]" :tableInfo="con.tableInfo"
@tableSelectChange="tableSelectChange" @tableBtnClick="tableBtnClick"
@tableSelectionChange="tableSelectionChange" @tableInputChange="tableInputChange"
@tablePageChange="tablePageChange" />
</div>
</template>
<template v-else>
<Form
ref="drawerFormRef"
:itemList="con.formInfo.items"
:formId="con.formInfo.id"
:rules="con.formInfo.rules"
:col="con.formInfo.col"
:readonly="con.formInfo.readonly"
@radioGroupChange="radioGroupChange"
@selectChange="formSelectChange"
@btnClick="formBtnClick"
/>
<Form ref="drawerFormRef" :itemList="con.formInfo.items" :formId="con.formInfo.id" :rules="con.formInfo.rules"
:col="con.formInfo.col" :readonly="con.formInfo.readonly" @radioGroupChange="radioGroupChange"
@selectChange="formSelectChange" @btnClick="formBtnClick">
</Form>
<!-- 插槽内容 -->
<slot></slot>
</template>
</div>
</template>
<template #footer v-if="footer.visible ?? true">
<div style="flex: auto">
<template v-for="btn in footer.btns">
<el-button
v-if="btn.visible ?? true"
:type="btn.type"
:disabled="btn.disabled ?? false"
@click="btnClick(btn, null)"
v-preReClick
:loading="btn.loading ?? false"
>{{ btn.label }}</el-button
>
<el-button v-if="btn.visible ?? true" :type="btn.type" :disabled="btn.disabled ?? false"
@click="btnClick(btn, null)" v-preReClick :loading="btn.loading ?? false">{{ btn.label }}</el-button>
</template>
</div>
</template>
......
This diff could not be displayed because it is too large.
import type { MockMethod } from 'vite-plugin-mock'
import Mock from 'mockjs'
export const confirmDelivery = {
url: '/mock/youthBoost/admin/shipment',
method: 'post',
response: ({body}:{body:any}) => {
return {
code: 200,
message: '成功',
data: []
}
}
}
export default [confirmDelivery] as MockMethod[]
// import { createProdMockServer } from 'vite-plugin-mock/es/createProdMockServer'
// const mocks: any[] = []
// const mockContext = import.meta.glob('./mock/*.ts', { eager: true })
// Object.keys(mockContext).forEach((v) => {
// mocks.push(...(mockContext[v] as any).default)
// })
// export function setupProdMockServer() {
// createProdMockServer(mocks)
// }
import { createProdMockServer } from 'vite-plugin-mock/es/createProdMockServer'
import dataInventory from './mock/data_inventory'
const mocks: any[] = []
const mockContext = import.meta.glob('./mock/*.ts', { eager: true })
Object.keys(mockContext).forEach((v) => {
mocks.push(...(mockContext[v] as any).default)
})
export function setupProdMockServer() {
createProdMockServer(mocks)
createProdMockServer([...dataInventory,])
}
......
......@@ -49,7 +49,17 @@ const routes: RouteRecordRaw[] = [
name: 'templateConfig',
component: () => import('@/views/data_inventory/templateConfig.vue'),
meta: {
title: '分类分级模板',
title: '分类分级标准',
breadcrumb: false,
cache: true
},
},
{
path: 'data-label',
name: 'dataLabel',
component: () => import('@/views/data_inventory/dataLabel.vue'),
meta: {
title: '标签管理',
breadcrumb: false,
cache: true
},
......@@ -69,7 +79,7 @@ const routes: RouteRecordRaw[] = [
},
beforeEnter: (to, from) => {
if (to.query.classStandardName) {
to.meta.title = `编辑-${to.query.classStandardName}`;
to.meta.title = `编辑-${to.query.classStandardName}`;
}
}
},
......@@ -125,6 +135,47 @@ const routes: RouteRecordRaw[] = [
}
}
},
{
path: 'classificationTemplate-edit',
name: 'classificationTemplateEdit',
component: () => import('@/views/data_inventory/classificationTemplateEdit.vue'),
meta: {
title: '编辑-',
sidebar: false,
breadcrumb: false,
cache: true,
reuse: true,
editPage: true,
activeMenu: '/data-inventory/classify-grade-manage/template-config'
},
beforeEnter: (to, from) => {
if (to.query.classClassifyGradName) {
to.meta.title = `编辑-${to.query.classClassifyGradName}`;
}
}
},
],
},
{
path: '/data-inventory/classify-grade-catalogue',
component: Layout,
meta: {
title: '分类分级目录',
icon: 'sidebar-videos',
},
children: [
{
path: '',
name: 'classifyGradeCatalogue',
component: () => import('@/views/data_inventory/classifyGradeCatalogue.vue'),
meta: {
title: '分类分级目录',
sidebar: false,
breadcrumb: false,
cache: true
},
},
],
}
]
......
......@@ -31,7 +31,7 @@ service.interceptors.request.use(
* 为每一次请求生成一个cancleToken
*/
const source = axios.CancelToken.source();
config.headers.tenant = '6646dcad76c411eea911fa163e419da9'; //会员guid先写死
config.headers.tenant = '9e5b9d7bfd8c4f4f8079e05de19bf7e0'; //会员guid先写死
config.cancelToken = source.token;
if (config.method === "postfile") {
config.method = "post";
......
......@@ -6,20 +6,54 @@
import router from "@/router";
import { getMetaDataBase } from '@/api/modules/dataMetaService';
import { ref } from "vue";
import { getClassifyGradList, saveCgTemplate } from "@/api/modules/dataInventory";
onMounted(async () => {
const params = {
pageIndex: 1,
pageSize: -1,
}
const res = await getMetaDataBase(params)
console.log(res);
const res = await getMetaDataBase(params);
tableInfo.value.data = res.data.records;
getGradListData();
getClassifyDataList();
});
const { proxy } = getCurrentInstance() as any;
const refGradePageParams = ref({
pageIndex: 1,
pageSize: -1,
type: "G"
});
const refClassifyPageParams = ref({
pageIndex: 1,
pageSize: -1,
type: "C"
});
const gradListData = ref([]);
const classifyDataList = ref([]);
// 获取分级列表
const getGradListData = async () => {
const res: any = await getClassifyGradList(refGradePageParams.value);
gradListData.value = res.data.records;
newCreateTemplateFormItems.value[2].options = gradListData.value;
};
// 获取分类列表
const getClassifyDataList = async () => {
const res: any = await getClassifyGradList(refClassifyPageParams.value);
classifyDataList.value = res.data.records;
newCreateTemplateFormItems.value[1].options = classifyDataList.value;
};
// 表单引用
const formRef = ref();
const tableRef = ref();
// 元数据metaGuids
const metaGuids = ref<any>([]);
const fullscreenLoading = ref(false);
const isExpand = ref(true);
const newCreateTemplateFormItems = ref([{
......@@ -27,7 +61,7 @@ const newCreateTemplateFormItems = ref([{
type: 'input',
maxlength: 50,
placeholder: '请输入',
field: 'templeteName',
field: 'templateName',
default: '',
clearable: true,
required: true
......@@ -35,9 +69,13 @@ const newCreateTemplateFormItems = ref([{
label: '行业分类',
type: 'select',
placeholder: '请选择',
field: ' industryCategory',
field: 'classifyGuid',
default: '',
options: [], //TODO
props: {
label: 'name',
value: 'guid'
},
required: true,
filterable: true,
clearable: true,
......@@ -46,9 +84,13 @@ const newCreateTemplateFormItems = ref([{
label: '分级标准',
type: 'select',
placeholder: '请选择',
field: ' gradingStandard',
field: 'gradeGuid',
default: '',
options: [], //TODO
props: {
label: 'name',
value: 'guid'
},
required: true,
filterable: true,
clearable: true,
......@@ -82,63 +124,14 @@ const tableInfo = ref({
actionInfo: {
show: false,
},
data: [
{
index: 1,
databaseNameZh: "数据库名称",
databaseName: "数据库名",
tableCount: 0,
storageCapacities: 0,
columns: 0,
},
{
index: 2,
databaseNameZh: "数据库名称",
databaseName: "数据库名",
tableCount: 0,
storageCapacities: 0,
columns: 0,
},
{
index: 3,
databaseNameZh: "数据库名称",
databaseName: "数据库名",
tableCount: 0,
storageCapacities: 0,
columns: 0,
},
{
index: 4,
databaseNameZh: "数据库名称",
databaseName: "数据库名",
tableCount: 0,
storageCapacities: 0,
columns: 0,
},
{
index: 5,
databaseNameZh: "数据库名称",
databaseName: "数据库名",
tableCount: 0,
storageCapacities: 0,
columns: 0,
},
{
index: 6,
databaseNameZh: "数据库名称",
databaseName: "数据库名",
tableCount: 0,
storageCapacities: 0,
columns: 0,
},
],
data: [],
showPage: false,
loading: false,
});
const onTableSelectChange = (selection: any[]) => {
console.log(selection);
// 遍历选中的元数据guid,然后存入metaGuids数组中
metaGuids.value = selection.map((item: any) => item.guid);
};
const cancel = () => {
......@@ -149,11 +142,24 @@ const cancel = () => {
const save = async () => {
console.log('save');
// 校验表单
const res = formRef.value;
res.ruleFormRef.validate((valid: any) => {
const formRes = formRef.value;
formRes.ruleFormRef.validate(async (valid: any) => {
if (valid) {
// 表单校验通过
console.log('表单校验通过');
const formData = formRes.formInline;
const params = {
...formData,
metaGuids: metaGuids.value,
version: 0
};
const res: any = await saveCgTemplate(params);
if (res.code == proxy.$passCode) {
// 保存成功
proxy.$ElMessage.success(res.msg);
} else {
// 保存失败
proxy.$ElMessage.error(res.msg);
}
} else {
console.log('表单校验不通过');
return false;
......
......@@ -7,10 +7,8 @@
import { ref, onMounted } from "vue";
import TableTools from '@/components/Tools/table_tools.vue';
import { MoreFilled } from "@element-plus/icons-vue";
import { commonPageConfig } from '@/components/PageNav/index';
import { useValidator } from '@/hooks/useValidator';
import TemplateItem from './templateItem.vue';
import { getTempleteClassifyData, saveClassifyGrad, getClassifyGradList, deleteClassifyGrad, updateClassifyGrad, getGradeTreeList } from "@/api/modules/dataInventory";
import { saveClassifyGrad, getClassifyGradList, deleteClassifyGrad, updateClassifyGrad, } from "@/api/modules/dataInventory";
const router = useRouter();
const { required } = useValidator();
......@@ -73,11 +71,11 @@ onMounted(() => {
const tabsInfo = ref({
activeName: 'classStandard',
activeName: 'gradeStandard',
tabs: [
{ label: '分类分级模板', name: 'classTemplate' },
// { label: '分类分级模板', name: 'classTemplate' },
{ label: '分级标准', name: 'gradeStandard' },
{ label: '分类标准', name: 'classStandard' },
{ label: '分级标准', name: 'gradeStandard' }
]
});
......@@ -85,35 +83,6 @@ const tabChange = (val) => {
tabsInfo.value.activeName = val;
}
/** 模板的搜索配置 */
const searchItemList = ref([
{
type: 'input',
label: '',
field: 'templateName',
default: '',
maxlength: 50,
placeholder: '模板名称',
clearable: true,
visible: true
}
]);
/** 搜索查询分类分级模板。 */
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();
};
/** ------------------------------- 分类标准相关 ------------------------------------- */
/** 分类标准的搜索配置 */
......@@ -462,59 +431,69 @@ const newCreateGrade = () => {
/** ------------------------------- 分类分级模板 ------------------------------------- */
const pageInfo = 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 },
],
type: "normal",
rows: 0,
})
const newCreateTemplate = () => {
router.push({
name: 'newCreateTemplate',
query: {
classStandardName: '分类分级模板'
}
});
}
const pageChange = (info) => {
pageInfo.value.curr = Number(info.curr);
pageInfo.value.limit = Number(info.limit);
getClassificationTemplateList();
}
const getClassificationTemplateList = async () => {
const params = {
pageSize: pageInfo.value.limit,
pageIndex: pageInfo.value.curr,
}
const res = await getTempleteClassifyData(params);
console.log(res);
}
onBeforeMount(() => {
getClassificationTemplateList();
})
// const pageInfo = 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 },
// ],
// type: "normal",
// rows: 0,
// })
// const newCreateTemplate = () => {
// router.push({
// name: 'newCreateTemplate',
// query: {
// classStandardName: '分类分级模板'
// }
// });
// }
// const tempBtn = () => {
// router.push({
// name: 'classificationTemplateEdit',
// query: {
// classClassifyGradName: '分类分级模板名称'
// }
// });
// }
// const pageChange = (info) => {
// pageInfo.value.curr = Number(info.curr);
// pageInfo.value.limit = Number(info.limit);
// getClassificationTemplateList();
// }
// const getClassificationTemplateList = async () => {
// const params = {
// pageSize: pageInfo.value.limit,
// pageIndex: pageInfo.value.curr,
// }
// const res = await getTempleteClassifyData(params);
// console.log(res);
// }
// onBeforeMount(() => {
// getClassificationTemplateList();
// })
</script>
<template>
<div class="container">
<Tabs :tabs-info="tabsInfo" @tab-change="tabChange" />
<div class="panel" v-show="tabsInfo.activeName == 'classTemplate'">
<!-- <div class="panel" v-show="tabsInfo.activeName == 'classTemplate'">
<div class="table_tool_wrap">
<TableTools :searchItems="searchItemList" :searchId="'template-manage-search'" @search="searchTemplate" />
<div class="tools_btns">
<el-button type="primary" @click="newCreateTemplate">新增模板</el-button>
<el-button type="primary" @click="tempBtn">测试页面</el-button>
</div>
</div>
<div class="content">
......@@ -523,7 +502,7 @@ onBeforeMount(() => {
<div class="botton-page-nav">
<PageNav :class="[pageInfo.type]" :pageInfo="pageInfo" @pageChange="pageChange" />
</div>
</div>
</div> -->
<div class="panel" v-show="tabsInfo.activeName == 'classStandard'">
<div class="table_tool_wrap">
<TableTools :searchItems="classSearchItemList" :searchId="'template-manage-search'" @search="searchClass" />
......@@ -552,10 +531,6 @@ onBeforeMount(() => {
<svg-icon name="folder" />
</el-icon>
<div class="title">{{ item.name }}</div>
<!-- <div class="desc-row">
<div class="desc">{{ '分级标准' }}</div>
<div class="desc">{{ item.updateTime }}</div>
</div> -->
</div>
<div v-if="!classListData.length" class="card-noData">
<img src="../../assets/images/no-data.png" :style="{ width: '96px', height: '96px' }" />
......@@ -589,10 +564,6 @@ onBeforeMount(() => {
<svg-icon name="folder" />
</el-icon>
<div class="title">{{ item.name }}</div>
<!-- <div class="desc-row">
<div class="desc">{{ '分级标准' }}</div>
<div class="desc">{{ item.updateTime }}</div>
</div> -->
</div>
<div v-if="!classifyGradListData.length" class="card-noData">
<img src="../../assets/images/no-data.png" :style="{ width: '96px', height: '96px' }" />
......
......@@ -21,9 +21,10 @@
<span>模板确认时间: {{ item.content.modelConfirmTime }}</span>
</div>
<div class="botton-btn">
<el-button type="primary" class="off-line-btn">下线</el-button>
<el-button type="primary" class="templete-btn">模板训练</el-button>
<el-button type="primary" class="delete-btn">删除</el-button>
<el-button type="primary" plain class="off-line-btn">下线</el-button>
<el-button>模板训练</el-button>
<el-button>模板确认</el-button>
<el-button>删除</el-button>
</div>
</div>
</div>
......@@ -146,6 +147,7 @@ const getItemStyle = (status: string) => {
borderTop: `4px solid ${borderColor}`,
};
};
</script>
<style scoped lang="scss">
......@@ -259,22 +261,6 @@ const getItemStyle = (status: string) => {
.botton-btn {
margin-top: 13px;
.off-line-btn {
background-color: #fff;
font-size: 14px;
color: #4FA1A4;
}
.templete-btn,
.delete-btn {
background: #FFFFFF;
border: 1px solid rgba(217, 217, 217, 1);
font-size: 14px;
color: #212121;
}
}
}
}
......
......@@ -15,6 +15,7 @@ import createBanner from './banner'
import AutoImport from 'unplugin-auto-import/vite';
import Components from 'unplugin-vue-components/vite';
import { VantResolver } from '@vant/auto-import-resolver';
import createMock from './mock'
export default function createVitePlugins(viteEnv, isBuild = false) {
const vitePlugins: (PluginOption | PluginOption[])[] = [
......@@ -37,5 +38,6 @@ export default function createVitePlugins(viteEnv, isBuild = false) {
isBuild && vitePlugins.push(...createCompression(viteEnv))
vitePlugins.push(...createSpritesmith(isBuild))
vitePlugins.push(createBanner())
vitePlugins.push(createMock(viteEnv.VITE_APP_CHECK_BASEURL, isBuild))
return vitePlugins
}
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!