210b5eb5 by xukangle

updata: 新增了标签管理

1 parent d8c0a524
...@@ -3,7 +3,7 @@ VITE_APP_TITLE = 数据资产管理系统 ...@@ -3,7 +3,7 @@ VITE_APP_TITLE = 数据资产管理系统
3 # 接口域名 3 # 接口域名
4 # VITE_API_BASEURL = https://www.zgsjzc.com/api 4 # VITE_API_BASEURL = https://www.zgsjzc.com/api
5 # VITE_API_BASEURL = https://swzl-test.csbr.cn/api 5 # VITE_API_BASEURL = https://swzl-test.csbr.cn/api
6 # VITE_API_BASEURL = http://10.4.82.30:8052/ 6 # VITE_API_BASEURL = http://localhost:9000
7 VITE_API_BASEURL = http://10.4.82.1:28052/ 7 VITE_API_BASEURL = http://10.4.82.1:28052/
8 # 平台用户 接口请地址 8 # 平台用户 接口请地址
9 VITE_APP_USER_API_BASEURL = gateway-server/user 9 VITE_APP_USER_API_BASEURL = gateway-server/user
...@@ -24,10 +24,10 @@ VITE_APP_PLAN_BASEURL = ms-daop-jgjf-data-plan-service ...@@ -24,10 +24,10 @@ VITE_APP_PLAN_BASEURL = ms-daop-jgjf-data-plan-service
24 #数据质量接口地址 24 #数据质量接口地址
25 VITE_APP_QUALITY_BASEURL = ms-daop-data-quality-service 25 VITE_APP_QUALITY_BASEURL = ms-daop-data-quality-service
26 26
27 #数据盘点接口地址 27 #数据盘点接口地址ms-daop-zcgl-data-inventory
28 # VITE_APP_CHECK_BASEURL = /mock
28 VITE_APP_CHECK_BASEURL = ms-daop-zcgl-data-inventory 29 VITE_APP_CHECK_BASEURL = ms-daop-zcgl-data-inventory
29 30
30
31 #门户接口 31 #门户接口
32 VITE_API_PORTALURL = https://swzl-test.zgsjzc.com/portal 32 VITE_API_PORTALURL = https://swzl-test.zgsjzc.com/portal
33 33
......
...@@ -35,7 +35,6 @@ ...@@ -35,7 +35,6 @@
35 "lodash-es": "^4.17.21", 35 "lodash-es": "^4.17.21",
36 "md5": "^2.3.0", 36 "md5": "^2.3.0",
37 "mitt": "^3.0.0", 37 "mitt": "^3.0.0",
38 "mockjs": "^1.1.0",
39 "moment": "^2.29.4", 38 "moment": "^2.29.4",
40 "nprogress": "^0.2.0", 39 "nprogress": "^0.2.0",
41 "path-browserify": "^1.0.1", 40 "path-browserify": "^1.0.1",
...@@ -67,6 +66,7 @@ ...@@ -67,6 +66,7 @@
67 "fs-extra": "^11.1.1", 66 "fs-extra": "^11.1.1",
68 "http-server": "^14.1.1", 67 "http-server": "^14.1.1",
69 "lint-staged": "^13.2.2", 68 "lint-staged": "^13.2.2",
69 "mockjs": "^1.1.0",
70 "npm-run-all": "^4.1.5", 70 "npm-run-all": "^4.1.5",
71 "plop": "^3.1.2", 71 "plop": "^3.1.2",
72 "postcss-html": "^1.5.0", 72 "postcss-html": "^1.5.0",
......
...@@ -173,3 +173,56 @@ export const deleteClassify = (data) => request({ ...@@ -173,3 +173,56 @@ export const deleteClassify = (data) => request({
173 url: `${import.meta.env.VITE_APP_CHECK_BASEURL}/classify/delete?guid=${data.guid}`, 173 url: `${import.meta.env.VITE_APP_CHECK_BASEURL}/classify/delete?guid=${data.guid}`,
174 method: 'delete', 174 method: 'delete',
175 }) 175 })
176
177
178 /** ---------------分类分级模板------------------------ */
179
180 /**
181 * 分类分级模板新增
182 * @param {Object}
183 * @path /cg-template/save
184 */
185
186 export const saveCgTemplate = (data) => request({
187 url: `${import.meta.env.VITE_APP_CHECK_BASEURL}/cg-template/save`,
188 method: 'post',
189 data
190 })
191
192 /**
193 * 分类分级模板左侧树形列表
194 * @param {Object}
195 * @path /cg-template-classify/tree-list
196 */
197 export const getCgTemplateClassifyTreeList = (data) => request({
198 url: `${import.meta.env.VITE_APP_CHECK_BASEURL}/cg-template-classify/tree-list`,
199 method: 'post',
200 data
201 })
202
203
204 /**-------------------------分类分级目录--------------------------------- */
205
206 /**
207 * 分类分级目录树形列表
208 * @param {Object}
209 * @path /cg-dir/tree-list
210 */
211
212 export const getCgDirTreeList = (data) => request({
213 url: `${import.meta.env.VITE_APP_CHECK_BASEURL}/cg-dir/tree-list`,
214 method: 'post',
215 data
216 })
217
218 /**
219 * 分类分级目录-分页
220 * @param {Object}
221 * @path /cg-dir/field/page-list
222 */
223
224 export const getCgDirFieldPageList = (data) => request({
225 url: `${import.meta.env.VITE_APP_CHECK_BASEURL}/cg-dir/field/page-list`,
226 method: 'post',
227 data
228 })
......
1 import request from "@/utils/request";
2
3 /**
4 * 远程获取标签
5 * @param {Object}
6 * @path /cg-label/label-serach
7 * @method get
8 * @des query查询 label
9 */
10
11 export const getLabelList = (data) => request({
12 url: `${import.meta.env.VITE_APP_CHECK_BASEURL}/cg-label/label-serach?label=${data.label}`,
13 method: 'get',
14 })
15
16
17 /**
18 * 分类分级树形目录
19 * @param {no params}
20 * @path /classify-grade/tree-list
21 * @method post
22 */
23
24 export const getClassifyGradeTreeList = () => request({
25 url: `${import.meta.env.VITE_APP_CHECK_BASEURL}/classify-grade/tree-list`,
26 method: 'post',
27 })
28
29 /**
30 * @des 新增标签规则
31 * @param {Object}
32 * @path /cg-label/save
33 */
34
35 export const saveLabel = (data) => request({
36 url: `${import.meta.env.VITE_APP_CHECK_BASEURL}/cg-label/save`,
37 method: 'post',
38 data
39 })
40
41
42 /**
43 * @des 获取标签页规则列表
44 * @param {Object}
45 * @path /cg-label/page-list
46 */
47
48 export const getLabelPageList = (data) => request({
49 url: `${import.meta.env.VITE_APP_CHECK_BASEURL}/cg-label/page-list`,
50 method: 'post',
51 data
52 })
53
54 /**
55 * @des 删除标签规则
56 * @param {Array}
57 * @path /cg-label/delete
58 */
59
60 export const deleteLabel = (data) => request({
61 url: `${import.meta.env.VITE_APP_CHECK_BASEURL}/cg-label/delete`,
62 method: 'delete',
63 data
64 })
65
66 /**
67 * @des 标签规则修改
68 * @param {Object}
69 * @path /cg-label/update
70 */
71
72 export const updateLabel = (data) => request({
73 url: `${import.meta.env.VITE_APP_CHECK_BASEURL}/cg-label/update`,
74 method: 'post',
75 data
76 })
...@@ -14,6 +14,8 @@ const props = defineProps({ ...@@ -14,6 +14,8 @@ const props = defineProps({
14 }, 14 },
15 }); 15 });
16 16
17 const dialogRef = ref();
18
17 const dialogInfo = computed(() => { 19 const dialogInfo = computed(() => {
18 return { 20 return {
19 visible: props.dialogConfigInfo.visible, 21 visible: props.dialogConfigInfo.visible,
...@@ -49,10 +51,16 @@ const formDialogRadioGroupChange = (val, row, item) => { ...@@ -49,10 +51,16 @@ const formDialogRadioGroupChange = (val, row, item) => {
49 const formDialogSelectChange = (val, item, row) => { 51 const formDialogSelectChange = (val, item, row) => {
50 emits('formDialogSelectChange', val, row, item); 52 emits('formDialogSelectChange', val, row, item);
51 } 53 }
54 defineExpose({
55 dialogRef,
56 });
52 57
53 </script> 58 </script>
54 59
55 <template> 60 <template>
56 <Dialog :dialogInfo="dialogInfo" @btnClick="formDialogBtnClick" @radioGroupChange="formDialogRadioGroupChange" 61 <Dialog ref="dialogRef" :dialogInfo="dialogInfo" @btnClick="formDialogBtnClick"
57 @select-change="formDialogSelectChange" /> 62 @radioGroupChange="formDialogRadioGroupChange" @select-change="formDialogSelectChange">
63 <!-- 默认插槽内容 -->
64 <slot></slot>
65 </Dialog>
58 </template> 66 </template>
......
...@@ -99,7 +99,7 @@ const onClickOutside = (e: any) => { ...@@ -99,7 +99,7 @@ const onClickOutside = (e: any) => {
99 }; 99 };
100 100
101 const getDrawerConRef = (refName) => { 101 const getDrawerConRef = (refName) => {
102 if(refName == 'drawerTableRef'){ 102 if (refName == 'drawerTableRef') {
103 const dtf = drawerTableRef.value[0] || drawerTableRef.value 103 const dtf = drawerTableRef.value[0] || drawerTableRef.value
104 return dtf?.tableRef 104 return dtf?.tableRef
105 } 105 }
...@@ -228,90 +228,45 @@ const drawerClose = () => { ...@@ -228,90 +228,45 @@ const drawerClose = () => {
228 </script> 228 </script>
229 229
230 <template> 230 <template>
231 <el-drawer 231 <el-drawer v-model="drawerVisible" :direction="drawerDirection" :size="drawerSize" :modal="drawerModal"
232 v-model="drawerVisible" 232 :close-on-click-modal="modalClose" :close-on-press-escape="modalClose" :modal-class="drawerModalClass"
233 :direction="drawerDirection" 233 destroy-on-close :z-index="props.drawerInfo.zIndex ?? null" @close="drawerClose">
234 :size="drawerSize"
235 :modal="drawerModal"
236 :close-on-click-modal="modalClose"
237 :close-on-press-escape="modalClose"
238 :modal-class="drawerModalClass"
239 destroy-on-close
240 :z-index="props.drawerInfo.zIndex ?? null"
241 @close="drawerClose"
242 >
243 <template #header> 234 <template #header>
244 <span class="title">{{ drawerTitle }}</span> 235 <span class="title">{{ drawerTitle }}</span>
245 </template> 236 </template>
246 <template #default> 237 <template #default>
247 <div class="drawer-body-loading" v-if="drawerInfo.loading ?? false" v-loading="drawerInfo.loading ?? false"></div> 238 <div class="drawer-body-loading" v-if="drawerInfo.loading ?? false" v-loading="drawerInfo.loading ?? false"></div>
248 <div 239 <div v-else class="drawer_panel" :class="[con.col]" :style="con.style" v-for="con in contents">
249 v-else
250 class="drawer_panel"
251 :class="[con.col]"
252 :style="con.style"
253 v-for="con in contents"
254 >
255 <div class="panel_title" v-if="con.title">{{ con.title }}</div> 240 <div class="panel_title" v-if="con.title">{{ con.title }}</div>
256 <template v-if="con.type && con.type.indexOf('table') > -1"> 241 <template v-if="con.type && con.type.indexOf('table') > -1">
257 <div 242 <div class="table_tool" :class="[con.tableTool.col]" v-if="con.tableTool && (con.tableTool.visible ?? true)">
258 class="table_tool"
259 :class="[con.tableTool.col]"
260 v-if="con.tableTool && (con.tableTool.visible ?? true)"
261 >
262 <template v-for="bar in con.tableTool.btns"> 243 <template v-for="bar in con.tableTool.btns">
263 <el-popover 244 <el-popover v-if="bar.popover" :visible="bar.popover.visible" :title="bar.popover.title"
264 v-if="bar.popover" 245 :popper-class="bar.popover.class ?? ''" placement="bottom-start" :width="bar.popover.width ?? 200"
265 :visible="bar.popover.visible" 246 trigger="click">
266 :title="bar.popover.title"
267 :popper-class="bar.popover.class ?? ''"
268 placement="bottom-start"
269 :width="bar.popover.width ?? 200"
270 trigger="click"
271 >
272 <template #reference> 247 <template #reference>
273 <el-button 248 <el-button :type="bar.type" @click="toolBtnClick(bar, con.type)" v-click-outside="onClickOutside"
274 :type="bar.type" 249 v-preReClick>{{ bar.label }}</el-button>
275 @click="toolBtnClick(bar, con.type)"
276 v-click-outside="onClickOutside"
277 v-preReClick
278 >{{ bar.label }}</el-button
279 >
280 </template> 250 </template>
281 <template #default> 251 <template #default>
282 <span v-html="bar.popover.content"></span> 252 <span v-html="bar.popover.content"></span>
283 </template> 253 </template>
284 </el-popover> 254 </el-popover>
285 <el-button 255 <el-button :type="bar.type" :plain="bar.plain" v-else @click="toolBtnClick(bar, 'table')" v-preReClick>{{
286 :type="bar.type" 256 bar.label
287 :plain="bar.plain" 257 }}</el-button>
288 v-else
289 @click="toolBtnClick(bar, 'table')"
290 v-preReClick
291 >{{ bar.label }}</el-button
292 >
293 </template> 258 </template>
294 </div> 259 </div>
295 <div class="table_panel_wrap" :style="con.tableInfo.style"> 260 <div class="table_panel_wrap" :style="con.tableInfo.style">
296 <Table 261 <Table ref="drawerTableRef" :class="[con.tableInfo.col]" :tableInfo="con.tableInfo"
297 ref="drawerTableRef" 262 @tableSelectChange="tableSelectChange" @tableBtnClick="tableBtnClick"
298 :class="[con.tableInfo.col]" 263 @tableSelectionChange="tableSelectionChange" @tableInputChange="tableInputChange"
299 :tableInfo="con.tableInfo" 264 @tablePageChange="tablePageChange" />
300 @tableSelectChange="tableSelectChange"
301 @tableBtnClick="tableBtnClick"
302 @tableSelectionChange="tableSelectionChange"
303 @tableInputChange="tableInputChange"
304 @tablePageChange="tablePageChange"
305 />
306 </div> 265 </div>
307 </template> 266 </template>
308 <template v-else-if="con.type && con.type.indexOf('tree') > -1"> 267 <template v-else-if="con.type && con.type.indexOf('tree') > -1">
309 <div class="list_tree" v-if="con.type.indexOf('list') > -1"> 268 <div class="list_tree" v-if="con.type.indexOf('list') > -1">
310 <ListPanel 269 <ListPanel ref="formListRef" :listInfo="con.listInfo" @itemClick="listItemClick" />
311 ref="formListRef"
312 :listInfo="con.listInfo"
313 @itemClick="listItemClick"
314 />
315 <Tree ref="formTreeRef" :treeInfo="con.treeInfo" /> 270 <Tree ref="formTreeRef" :treeInfo="con.treeInfo" />
316 </div> 271 </div>
317 <Tree ref="formTreeRef" :treeInfo="con.treeInfo" v-else /> 272 <Tree ref="formTreeRef" :treeInfo="con.treeInfo" v-else />
...@@ -329,23 +284,12 @@ const drawerClose = () => { ...@@ -329,23 +284,12 @@ const drawerClose = () => {
329 </template> 284 </template>
330 <template v-else-if="con.type && con.type.indexOf('upload') > -1"> 285 <template v-else-if="con.type && con.type.indexOf('upload') > -1">
331 <div class="upload_tool"> 286 <div class="upload_tool">
332 <UploadFiles 287 <UploadFiles ref="uploadRef" :upload-info="con.uploadInfo" @onUpload="onUpload" @beforeUPload="beforeUPload"
333 ref="uploadRef" 288 @uploadFile="uploadFile" @uploadBtnClick="uploadBtnClick" />
334 :upload-info="con.uploadInfo"
335 @onUpload="onUpload"
336 @beforeUPload="beforeUPload"
337 @uploadFile="uploadFile"
338 @uploadBtnClick="uploadBtnClick"
339 />
340 <div class="tool_btns" v-if="con.tools && con.tools.visible"> 289 <div class="tool_btns" v-if="con.tools && con.tools.visible">
341 <template v-for="btn in con.tools.btns"> 290 <template v-for="btn in con.tools.btns">
342 <el-button 291 <el-button v-if="btn.visible ?? true" :type="btn.type" :plain="btn.plain"
343 v-if="btn.visible ?? true" 292 @click="toolBtnClick(btn, 'table')" v-preReClick>
344 :type="btn.type"
345 :plain="btn.plain"
346 @click="toolBtnClick(btn, 'table')"
347 v-preReClick
348 >
349 <el-icon v-if="btn.icon && btn.icon == 'Upload'"> 293 <el-icon v-if="btn.icon && btn.icon == 'Upload'">
350 <Upload /> 294 <Upload />
351 </el-icon> 295 </el-icon>
...@@ -357,49 +301,28 @@ const drawerClose = () => { ...@@ -357,49 +301,28 @@ const drawerClose = () => {
357 </template> 301 </template>
358 </div> 302 </div>
359 </div> 303 </div>
360 <div 304 <div class="upload_table_panel_wrap" v-if="con.tableInfo && Object.keys(con.tableInfo).length">
361 class="upload_table_panel_wrap" 305 <Table ref="drawerTableRef" :class="[con.tableInfo.col]" :tableInfo="con.tableInfo"
362 v-if="con.tableInfo && Object.keys(con.tableInfo).length" 306 @tableSelectChange="tableSelectChange" @tableBtnClick="tableBtnClick"
363 > 307 @tableSelectionChange="tableSelectionChange" @tableInputChange="tableInputChange"
364 <Table 308 @tablePageChange="tablePageChange" />
365 ref="drawerTableRef"
366 :class="[con.tableInfo.col]"
367 :tableInfo="con.tableInfo"
368 @tableSelectChange="tableSelectChange"
369 @tableBtnClick="tableBtnClick"
370 @tableSelectionChange="tableSelectionChange"
371 @tableInputChange="tableInputChange"
372 @tablePageChange="tablePageChange"
373 />
374 </div> 309 </div>
375 </template> 310 </template>
376 <template v-else> 311 <template v-else>
377 <Form 312 <Form ref="drawerFormRef" :itemList="con.formInfo.items" :formId="con.formInfo.id" :rules="con.formInfo.rules"
378 ref="drawerFormRef" 313 :col="con.formInfo.col" :readonly="con.formInfo.readonly" @radioGroupChange="radioGroupChange"
379 :itemList="con.formInfo.items" 314 @selectChange="formSelectChange" @btnClick="formBtnClick">
380 :formId="con.formInfo.id" 315 </Form>
381 :rules="con.formInfo.rules" 316 <!-- 插槽内容 -->
382 :col="con.formInfo.col" 317 <slot></slot>
383 :readonly="con.formInfo.readonly"
384 @radioGroupChange="radioGroupChange"
385 @selectChange="formSelectChange"
386 @btnClick="formBtnClick"
387 />
388 </template> 318 </template>
389 </div> 319 </div>
390 </template> 320 </template>
391 <template #footer v-if="footer.visible ?? true"> 321 <template #footer v-if="footer.visible ?? true">
392 <div style="flex: auto"> 322 <div style="flex: auto">
393 <template v-for="btn in footer.btns"> 323 <template v-for="btn in footer.btns">
394 <el-button 324 <el-button v-if="btn.visible ?? true" :type="btn.type" :disabled="btn.disabled ?? false"
395 v-if="btn.visible ?? true" 325 @click="btnClick(btn, null)" v-preReClick :loading="btn.loading ?? false">{{ btn.label }}</el-button>
396 :type="btn.type"
397 :disabled="btn.disabled ?? false"
398 @click="btnClick(btn, null)"
399 v-preReClick
400 :loading="btn.loading ?? false"
401 >{{ btn.label }}</el-button
402 >
403 </template> 326 </template>
404 </div> 327 </div>
405 </template> 328 </template>
......
This diff could not be displayed because it is too large.
1 import type { MockMethod } from 'vite-plugin-mock'
2 import Mock from 'mockjs'
3
4
5 export const confirmDelivery = {
6 url: '/mock/youthBoost/admin/shipment',
7 method: 'post',
8 response: ({body}:{body:any}) => {
9
10 return {
11 code: 200,
12 message: '成功',
13 data: []
14 }
15 }
16 }
17
18
19 export default [confirmDelivery] as MockMethod[]
1 // import { createProdMockServer } from 'vite-plugin-mock/es/createProdMockServer'
2
3 // const mocks: any[] = []
4 // const mockContext = import.meta.glob('./mock/*.ts', { eager: true })
5 // Object.keys(mockContext).forEach((v) => {
6 // mocks.push(...(mockContext[v] as any).default)
7 // })
8
9 // export function setupProdMockServer() {
10 // createProdMockServer(mocks)
11 // }
12
1 import { createProdMockServer } from 'vite-plugin-mock/es/createProdMockServer' 13 import { createProdMockServer } from 'vite-plugin-mock/es/createProdMockServer'
14 import dataInventory from './mock/data_inventory'
2 15
3 const mocks: any[] = []
4 const mockContext = import.meta.glob('./mock/*.ts', { eager: true })
5 Object.keys(mockContext).forEach((v) => {
6 mocks.push(...(mockContext[v] as any).default)
7 })
8 16
9 export function setupProdMockServer() { 17 export function setupProdMockServer() {
10 createProdMockServer(mocks) 18 createProdMockServer([...dataInventory,])
11 } 19 }
......
...@@ -49,7 +49,17 @@ const routes: RouteRecordRaw[] = [ ...@@ -49,7 +49,17 @@ const routes: RouteRecordRaw[] = [
49 name: 'templateConfig', 49 name: 'templateConfig',
50 component: () => import('@/views/data_inventory/templateConfig.vue'), 50 component: () => import('@/views/data_inventory/templateConfig.vue'),
51 meta: { 51 meta: {
52 title: '分类分级模板', 52 title: '分类分级标准',
53 breadcrumb: false,
54 cache: true
55 },
56 },
57 {
58 path: 'data-label',
59 name: 'dataLabel',
60 component: () => import('@/views/data_inventory/dataLabel.vue'),
61 meta: {
62 title: '标签管理',
53 breadcrumb: false, 63 breadcrumb: false,
54 cache: true 64 cache: true
55 }, 65 },
...@@ -69,7 +79,7 @@ const routes: RouteRecordRaw[] = [ ...@@ -69,7 +79,7 @@ const routes: RouteRecordRaw[] = [
69 }, 79 },
70 beforeEnter: (to, from) => { 80 beforeEnter: (to, from) => {
71 if (to.query.classStandardName) { 81 if (to.query.classStandardName) {
72 to.meta.title = `编辑-${to.query.classStandardName}`; 82 to.meta.title = `编辑-${to.query.classStandardName}`;
73 } 83 }
74 } 84 }
75 }, 85 },
...@@ -125,6 +135,47 @@ const routes: RouteRecordRaw[] = [ ...@@ -125,6 +135,47 @@ const routes: RouteRecordRaw[] = [
125 } 135 }
126 } 136 }
127 }, 137 },
138 {
139 path: 'classificationTemplate-edit',
140 name: 'classificationTemplateEdit',
141 component: () => import('@/views/data_inventory/classificationTemplateEdit.vue'),
142 meta: {
143 title: '编辑-',
144 sidebar: false,
145 breadcrumb: false,
146 cache: true,
147 reuse: true,
148 editPage: true,
149 activeMenu: '/data-inventory/classify-grade-manage/template-config'
150 },
151 beforeEnter: (to, from) => {
152 if (to.query.classClassifyGradName) {
153 to.meta.title = `编辑-${to.query.classClassifyGradName}`;
154 }
155 }
156 },
157
158 ],
159 },
160 {
161 path: '/data-inventory/classify-grade-catalogue',
162 component: Layout,
163 meta: {
164 title: '分类分级目录',
165 icon: 'sidebar-videos',
166 },
167 children: [
168 {
169 path: '',
170 name: 'classifyGradeCatalogue',
171 component: () => import('@/views/data_inventory/classifyGradeCatalogue.vue'),
172 meta: {
173 title: '分类分级目录',
174 sidebar: false,
175 breadcrumb: false,
176 cache: true
177 },
178 },
128 ], 179 ],
129 } 180 }
130 ] 181 ]
......
...@@ -31,7 +31,7 @@ service.interceptors.request.use( ...@@ -31,7 +31,7 @@ service.interceptors.request.use(
31 * 为每一次请求生成一个cancleToken 31 * 为每一次请求生成一个cancleToken
32 */ 32 */
33 const source = axios.CancelToken.source(); 33 const source = axios.CancelToken.source();
34 config.headers.tenant = '6646dcad76c411eea911fa163e419da9'; //会员guid先写死 34 config.headers.tenant = '9e5b9d7bfd8c4f4f8079e05de19bf7e0'; //会员guid先写死
35 config.cancelToken = source.token; 35 config.cancelToken = source.token;
36 if (config.method === "postfile") { 36 if (config.method === "postfile") {
37 config.method = "post"; 37 config.method = "post";
......
...@@ -6,20 +6,54 @@ ...@@ -6,20 +6,54 @@
6 import router from "@/router"; 6 import router from "@/router";
7 import { getMetaDataBase } from '@/api/modules/dataMetaService'; 7 import { getMetaDataBase } from '@/api/modules/dataMetaService';
8 import { ref } from "vue"; 8 import { ref } from "vue";
9 9 import { getClassifyGradList, saveCgTemplate } from "@/api/modules/dataInventory";
10 10
11 onMounted(async () => { 11 onMounted(async () => {
12 const params = { 12 const params = {
13 pageIndex: 1, 13 pageIndex: 1,
14 pageSize: -1, 14 pageSize: -1,
15 } 15 }
16 const res = await getMetaDataBase(params) 16 const res = await getMetaDataBase(params);
17 console.log(res); 17 tableInfo.value.data = res.data.records;
18 getGradListData();
19 getClassifyDataList();
20 });
21
22 const { proxy } = getCurrentInstance() as any;
23 const refGradePageParams = ref({
24 pageIndex: 1,
25 pageSize: -1,
26 type: "G"
27 });
28 const refClassifyPageParams = ref({
29 pageIndex: 1,
30 pageSize: -1,
31 type: "C"
18 }); 32 });
19 33
34 const gradListData = ref([]);
35 const classifyDataList = ref([]);
36 // 获取分级列表
37 const getGradListData = async () => {
38 const res: any = await getClassifyGradList(refGradePageParams.value);
39 gradListData.value = res.data.records;
40 newCreateTemplateFormItems.value[2].options = gradListData.value;
41 };
42
43 // 获取分类列表
44 const getClassifyDataList = async () => {
45 const res: any = await getClassifyGradList(refClassifyPageParams.value);
46 classifyDataList.value = res.data.records;
47 newCreateTemplateFormItems.value[1].options = classifyDataList.value;
48 };
49
50
51
20 // 表单引用 52 // 表单引用
21 const formRef = ref(); 53 const formRef = ref();
22 const tableRef = ref(); 54 const tableRef = ref();
55 // 元数据metaGuids
56 const metaGuids = ref<any>([]);
23 const fullscreenLoading = ref(false); 57 const fullscreenLoading = ref(false);
24 const isExpand = ref(true); 58 const isExpand = ref(true);
25 const newCreateTemplateFormItems = ref([{ 59 const newCreateTemplateFormItems = ref([{
...@@ -27,7 +61,7 @@ const newCreateTemplateFormItems = ref([{ ...@@ -27,7 +61,7 @@ const newCreateTemplateFormItems = ref([{
27 type: 'input', 61 type: 'input',
28 maxlength: 50, 62 maxlength: 50,
29 placeholder: '请输入', 63 placeholder: '请输入',
30 field: 'templeteName', 64 field: 'templateName',
31 default: '', 65 default: '',
32 clearable: true, 66 clearable: true,
33 required: true 67 required: true
...@@ -35,9 +69,13 @@ const newCreateTemplateFormItems = ref([{ ...@@ -35,9 +69,13 @@ const newCreateTemplateFormItems = ref([{
35 label: '行业分类', 69 label: '行业分类',
36 type: 'select', 70 type: 'select',
37 placeholder: '请选择', 71 placeholder: '请选择',
38 field: ' industryCategory', 72 field: 'classifyGuid',
39 default: '', 73 default: '',
40 options: [], //TODO 74 options: [], //TODO
75 props: {
76 label: 'name',
77 value: 'guid'
78 },
41 required: true, 79 required: true,
42 filterable: true, 80 filterable: true,
43 clearable: true, 81 clearable: true,
...@@ -46,9 +84,13 @@ const newCreateTemplateFormItems = ref([{ ...@@ -46,9 +84,13 @@ const newCreateTemplateFormItems = ref([{
46 label: '分级标准', 84 label: '分级标准',
47 type: 'select', 85 type: 'select',
48 placeholder: '请选择', 86 placeholder: '请选择',
49 field: ' gradingStandard', 87 field: 'gradeGuid',
50 default: '', 88 default: '',
51 options: [], //TODO 89 options: [], //TODO
90 props: {
91 label: 'name',
92 value: 'guid'
93 },
52 required: true, 94 required: true,
53 filterable: true, 95 filterable: true,
54 clearable: true, 96 clearable: true,
...@@ -82,63 +124,14 @@ const tableInfo = ref({ ...@@ -82,63 +124,14 @@ const tableInfo = ref({
82 actionInfo: { 124 actionInfo: {
83 show: false, 125 show: false,
84 }, 126 },
85 data: [ 127 data: [],
86 {
87 index: 1,
88 databaseNameZh: "数据库名称",
89 databaseName: "数据库名",
90 tableCount: 0,
91 storageCapacities: 0,
92 columns: 0,
93 },
94 {
95 index: 2,
96 databaseNameZh: "数据库名称",
97 databaseName: "数据库名",
98 tableCount: 0,
99 storageCapacities: 0,
100 columns: 0,
101 },
102 {
103 index: 3,
104 databaseNameZh: "数据库名称",
105 databaseName: "数据库名",
106 tableCount: 0,
107 storageCapacities: 0,
108 columns: 0,
109 },
110 {
111 index: 4,
112 databaseNameZh: "数据库名称",
113 databaseName: "数据库名",
114 tableCount: 0,
115 storageCapacities: 0,
116 columns: 0,
117 },
118 {
119 index: 5,
120 databaseNameZh: "数据库名称",
121 databaseName: "数据库名",
122 tableCount: 0,
123 storageCapacities: 0,
124 columns: 0,
125 },
126 {
127 index: 6,
128 databaseNameZh: "数据库名称",
129 databaseName: "数据库名",
130 tableCount: 0,
131 storageCapacities: 0,
132 columns: 0,
133 },
134
135 ],
136 showPage: false, 128 showPage: false,
137 loading: false, 129 loading: false,
138 }); 130 });
139 131
140 const onTableSelectChange = (selection: any[]) => { 132 const onTableSelectChange = (selection: any[]) => {
141 console.log(selection); 133 // 遍历选中的元数据guid,然后存入metaGuids数组中
134 metaGuids.value = selection.map((item: any) => item.guid);
142 }; 135 };
143 136
144 const cancel = () => { 137 const cancel = () => {
...@@ -149,11 +142,24 @@ const cancel = () => { ...@@ -149,11 +142,24 @@ const cancel = () => {
149 const save = async () => { 142 const save = async () => {
150 console.log('save'); 143 console.log('save');
151 // 校验表单 144 // 校验表单
152 const res = formRef.value; 145 const formRes = formRef.value;
153 res.ruleFormRef.validate((valid: any) => { 146 formRes.ruleFormRef.validate(async (valid: any) => {
154 if (valid) { 147 if (valid) {
155 // 表单校验通过 148 // 表单校验通过
156 console.log('表单校验通过'); 149 const formData = formRes.formInline;
150 const params = {
151 ...formData,
152 metaGuids: metaGuids.value,
153 version: 0
154 };
155 const res: any = await saveCgTemplate(params);
156 if (res.code == proxy.$passCode) {
157 // 保存成功
158 proxy.$ElMessage.success(res.msg);
159 } else {
160 // 保存失败
161 proxy.$ElMessage.error(res.msg);
162 }
157 } else { 163 } else {
158 console.log('表单校验不通过'); 164 console.log('表单校验不通过');
159 return false; 165 return false;
......
...@@ -7,10 +7,8 @@ ...@@ -7,10 +7,8 @@
7 import { ref, onMounted } from "vue"; 7 import { ref, onMounted } from "vue";
8 import TableTools from '@/components/Tools/table_tools.vue'; 8 import TableTools from '@/components/Tools/table_tools.vue';
9 import { MoreFilled } from "@element-plus/icons-vue"; 9 import { MoreFilled } from "@element-plus/icons-vue";
10 import { commonPageConfig } from '@/components/PageNav/index';
11 import { useValidator } from '@/hooks/useValidator'; 10 import { useValidator } from '@/hooks/useValidator';
12 import TemplateItem from './templateItem.vue'; 11 import { saveClassifyGrad, getClassifyGradList, deleteClassifyGrad, updateClassifyGrad, } from "@/api/modules/dataInventory";
13 import { getTempleteClassifyData, saveClassifyGrad, getClassifyGradList, deleteClassifyGrad, updateClassifyGrad, getGradeTreeList } from "@/api/modules/dataInventory";
14 12
15 const router = useRouter(); 13 const router = useRouter();
16 const { required } = useValidator(); 14 const { required } = useValidator();
...@@ -73,11 +71,11 @@ onMounted(() => { ...@@ -73,11 +71,11 @@ onMounted(() => {
73 71
74 72
75 const tabsInfo = ref({ 73 const tabsInfo = ref({
76 activeName: 'classStandard', 74 activeName: 'gradeStandard',
77 tabs: [ 75 tabs: [
78 { label: '分类分级模板', name: 'classTemplate' }, 76 // { label: '分类分级模板', name: 'classTemplate' },
77 { label: '分级标准', name: 'gradeStandard' },
79 { label: '分类标准', name: 'classStandard' }, 78 { label: '分类标准', name: 'classStandard' },
80 { label: '分级标准', name: 'gradeStandard' }
81 ] 79 ]
82 }); 80 });
83 81
...@@ -85,35 +83,6 @@ const tabChange = (val) => { ...@@ -85,35 +83,6 @@ const tabChange = (val) => {
85 tabsInfo.value.activeName = val; 83 tabsInfo.value.activeName = val;
86 } 84 }
87 85
88 /** 模板的搜索配置 */
89 const searchItemList = ref([
90 {
91 type: 'input',
92 label: '',
93 field: 'templateName',
94 default: '',
95 maxlength: 50,
96 placeholder: '模板名称',
97 clearable: true,
98 visible: true
99 }
100 ]);
101
102 /** 搜索查询分类分级模板。 */
103 const searchTemplate = (val: any, clear: boolean = false) => {
104 // page.value.curr = 1;
105 // if (clear) {
106 // searchItemList.value.map(item => item.default = '')
107 // page.value.planName = '';
108 // page.value.state = null;
109 // getTableData();
110 // return;
111 // }
112 // page.value.planName = val.planName;
113 // page.value.state = val.state;
114 // getTableData();
115 };
116
117 /** ------------------------------- 分类标准相关 ------------------------------------- */ 86 /** ------------------------------- 分类标准相关 ------------------------------------- */
118 87
119 /** 分类标准的搜索配置 */ 88 /** 分类标准的搜索配置 */
...@@ -462,59 +431,69 @@ const newCreateGrade = () => { ...@@ -462,59 +431,69 @@ const newCreateGrade = () => {
462 431
463 /** ------------------------------- 分类分级模板 ------------------------------------- */ 432 /** ------------------------------- 分类分级模板 ------------------------------------- */
464 433
465 const pageInfo = ref({ 434 // const pageInfo = ref({
466 limit: 50, 435 // limit: 50,
467 curr: 1, 436 // curr: 1,
468 sizes: [ 437 // sizes: [
469 { label: "10", value: 10 }, 438 // { label: "10", value: 10 },
470 { label: "50", value: 50 }, 439 // { label: "50", value: 50 },
471 { label: "100", value: 100 }, 440 // { label: "100", value: 100 },
472 { label: "150", value: 150 }, 441 // { label: "150", value: 150 },
473 { label: "200", value: 200 }, 442 // { label: "200", value: 200 },
474 ], 443 // ],
475 type: "normal", 444 // type: "normal",
476 rows: 0, 445 // rows: 0,
477 }) 446 // })
478 447
479 const newCreateTemplate = () => { 448 // const newCreateTemplate = () => {
480 router.push({ 449 // router.push({
481 name: 'newCreateTemplate', 450 // name: 'newCreateTemplate',
482 query: { 451 // query: {
483 classStandardName: '分类分级模板' 452 // classStandardName: '分类分级模板'
484 } 453 // }
485 }); 454 // });
486 } 455 // }
487 456
488 457 // const tempBtn = () => {
489 const pageChange = (info) => { 458 // router.push({
490 pageInfo.value.curr = Number(info.curr); 459 // name: 'classificationTemplateEdit',
491 pageInfo.value.limit = Number(info.limit); 460 // query: {
492 getClassificationTemplateList(); 461 // classClassifyGradName: '分类分级模板名称'
493 } 462 // }
494 463 // });
495 const getClassificationTemplateList = async () => { 464 // }
496 const params = { 465
497 pageSize: pageInfo.value.limit, 466
498 pageIndex: pageInfo.value.curr, 467 // const pageChange = (info) => {
499 } 468 // pageInfo.value.curr = Number(info.curr);
500 const res = await getTempleteClassifyData(params); 469 // pageInfo.value.limit = Number(info.limit);
501 console.log(res); 470 // getClassificationTemplateList();
502 } 471 // }
503 472
504 onBeforeMount(() => { 473 // const getClassificationTemplateList = async () => {
505 getClassificationTemplateList(); 474 // const params = {
506 }) 475 // pageSize: pageInfo.value.limit,
476 // pageIndex: pageInfo.value.curr,
477 // }
478 // const res = await getTempleteClassifyData(params);
479 // console.log(res);
480 // }
481
482 // onBeforeMount(() => {
483 // getClassificationTemplateList();
484 // })
507 485
508 </script> 486 </script>
509 487
510 <template> 488 <template>
511 <div class="container"> 489 <div class="container">
512 <Tabs :tabs-info="tabsInfo" @tab-change="tabChange" /> 490 <Tabs :tabs-info="tabsInfo" @tab-change="tabChange" />
513 <div class="panel" v-show="tabsInfo.activeName == 'classTemplate'"> 491 <!-- <div class="panel" v-show="tabsInfo.activeName == 'classTemplate'">
514 <div class="table_tool_wrap"> 492 <div class="table_tool_wrap">
515 <TableTools :searchItems="searchItemList" :searchId="'template-manage-search'" @search="searchTemplate" /> 493 <TableTools :searchItems="searchItemList" :searchId="'template-manage-search'" @search="searchTemplate" />
516 <div class="tools_btns"> 494 <div class="tools_btns">
517 <el-button type="primary" @click="newCreateTemplate">新增模板</el-button> 495 <el-button type="primary" @click="newCreateTemplate">新增模板</el-button>
496 <el-button type="primary" @click="tempBtn">测试页面</el-button>
518 </div> 497 </div>
519 </div> 498 </div>
520 <div class="content"> 499 <div class="content">
...@@ -523,7 +502,7 @@ onBeforeMount(() => { ...@@ -523,7 +502,7 @@ onBeforeMount(() => {
523 <div class="botton-page-nav"> 502 <div class="botton-page-nav">
524 <PageNav :class="[pageInfo.type]" :pageInfo="pageInfo" @pageChange="pageChange" /> 503 <PageNav :class="[pageInfo.type]" :pageInfo="pageInfo" @pageChange="pageChange" />
525 </div> 504 </div>
526 </div> 505 </div> -->
527 <div class="panel" v-show="tabsInfo.activeName == 'classStandard'"> 506 <div class="panel" v-show="tabsInfo.activeName == 'classStandard'">
528 <div class="table_tool_wrap"> 507 <div class="table_tool_wrap">
529 <TableTools :searchItems="classSearchItemList" :searchId="'template-manage-search'" @search="searchClass" /> 508 <TableTools :searchItems="classSearchItemList" :searchId="'template-manage-search'" @search="searchClass" />
...@@ -552,10 +531,6 @@ onBeforeMount(() => { ...@@ -552,10 +531,6 @@ onBeforeMount(() => {
552 <svg-icon name="folder" /> 531 <svg-icon name="folder" />
553 </el-icon> 532 </el-icon>
554 <div class="title">{{ item.name }}</div> 533 <div class="title">{{ item.name }}</div>
555 <!-- <div class="desc-row">
556 <div class="desc">{{ '分级标准' }}</div>
557 <div class="desc">{{ item.updateTime }}</div>
558 </div> -->
559 </div> 534 </div>
560 <div v-if="!classListData.length" class="card-noData"> 535 <div v-if="!classListData.length" class="card-noData">
561 <img src="../../assets/images/no-data.png" :style="{ width: '96px', height: '96px' }" /> 536 <img src="../../assets/images/no-data.png" :style="{ width: '96px', height: '96px' }" />
...@@ -589,10 +564,6 @@ onBeforeMount(() => { ...@@ -589,10 +564,6 @@ onBeforeMount(() => {
589 <svg-icon name="folder" /> 564 <svg-icon name="folder" />
590 </el-icon> 565 </el-icon>
591 <div class="title">{{ item.name }}</div> 566 <div class="title">{{ item.name }}</div>
592 <!-- <div class="desc-row">
593 <div class="desc">{{ '分级标准' }}</div>
594 <div class="desc">{{ item.updateTime }}</div>
595 </div> -->
596 </div> 567 </div>
597 <div v-if="!classifyGradListData.length" class="card-noData"> 568 <div v-if="!classifyGradListData.length" class="card-noData">
598 <img src="../../assets/images/no-data.png" :style="{ width: '96px', height: '96px' }" /> 569 <img src="../../assets/images/no-data.png" :style="{ width: '96px', height: '96px' }" />
......
...@@ -21,9 +21,10 @@ ...@@ -21,9 +21,10 @@
21 <span>模板确认时间: {{ item.content.modelConfirmTime }}</span> 21 <span>模板确认时间: {{ item.content.modelConfirmTime }}</span>
22 </div> 22 </div>
23 <div class="botton-btn"> 23 <div class="botton-btn">
24 <el-button type="primary" class="off-line-btn">下线</el-button> 24 <el-button type="primary" plain class="off-line-btn">下线</el-button>
25 <el-button type="primary" class="templete-btn">模板训练</el-button> 25 <el-button>模板训练</el-button>
26 <el-button type="primary" class="delete-btn">删除</el-button> 26 <el-button>模板确认</el-button>
27 <el-button>删除</el-button>
27 </div> 28 </div>
28 </div> 29 </div>
29 </div> 30 </div>
...@@ -146,6 +147,7 @@ const getItemStyle = (status: string) => { ...@@ -146,6 +147,7 @@ const getItemStyle = (status: string) => {
146 borderTop: `4px solid ${borderColor}`, 147 borderTop: `4px solid ${borderColor}`,
147 }; 148 };
148 }; 149 };
150
149 </script> 151 </script>
150 152
151 <style scoped lang="scss"> 153 <style scoped lang="scss">
...@@ -259,22 +261,6 @@ const getItemStyle = (status: string) => { ...@@ -259,22 +261,6 @@ const getItemStyle = (status: string) => {
259 261
260 .botton-btn { 262 .botton-btn {
261 margin-top: 13px; 263 margin-top: 13px;
262
263 .off-line-btn {
264 background-color: #fff;
265 font-size: 14px;
266 color: #4FA1A4;
267
268 }
269
270 .templete-btn,
271 .delete-btn {
272
273 background: #FFFFFF;
274 border: 1px solid rgba(217, 217, 217, 1);
275 font-size: 14px;
276 color: #212121;
277 }
278 } 264 }
279 } 265 }
280 } 266 }
......
...@@ -15,6 +15,7 @@ import createBanner from './banner' ...@@ -15,6 +15,7 @@ import createBanner from './banner'
15 import AutoImport from 'unplugin-auto-import/vite'; 15 import AutoImport from 'unplugin-auto-import/vite';
16 import Components from 'unplugin-vue-components/vite'; 16 import Components from 'unplugin-vue-components/vite';
17 import { VantResolver } from '@vant/auto-import-resolver'; 17 import { VantResolver } from '@vant/auto-import-resolver';
18 import createMock from './mock'
18 19
19 export default function createVitePlugins(viteEnv, isBuild = false) { 20 export default function createVitePlugins(viteEnv, isBuild = false) {
20 const vitePlugins: (PluginOption | PluginOption[])[] = [ 21 const vitePlugins: (PluginOption | PluginOption[])[] = [
...@@ -37,5 +38,6 @@ export default function createVitePlugins(viteEnv, isBuild = false) { ...@@ -37,5 +38,6 @@ export default function createVitePlugins(viteEnv, isBuild = false) {
37 isBuild && vitePlugins.push(...createCompression(viteEnv)) 38 isBuild && vitePlugins.push(...createCompression(viteEnv))
38 vitePlugins.push(...createSpritesmith(isBuild)) 39 vitePlugins.push(...createSpritesmith(isBuild))
39 vitePlugins.push(createBanner()) 40 vitePlugins.push(createBanner())
41 vitePlugins.push(createMock(viteEnv.VITE_APP_CHECK_BASEURL, isBuild))
40 return vitePlugins 42 return vitePlugins
41 } 43 }
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!