Browse Source

EAM ——> 文档类型 更新

master_hella_20240701
gaojs 6 months ago
parent
commit
e86f0c38c7
  1. 10
      src/views/eam/documentType/documentType.data.ts
  2. 6
      src/views/eam/documentType/index.vue
  3. 8
      src/views/eam/documentTypeSelectSet/itemSelectSetForm.vue

10
src/views/eam/documentType/documentType.data.ts

@ -23,7 +23,10 @@ export const DocumentType = useCrudSchemas(reactive<CrudSchema[]>([
label: '设备编码',
field: 'code',
sort: 'custom',
isSearch: true,
isSearch: false,
isTable: false,
isForm: false,
isDetail:false,
},
{
label: '名称',
@ -37,7 +40,10 @@ export const DocumentType = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom',
dictType: DICT_TYPE.DEVICE_TYPE,
dictClass: 'string', // 默认都是字符串类型其他暂不考虑
isSearch: true,
isSearch: false,
isTable: false,
isForm: false,
isDetail:false,
form: {
component: 'Select'
}

6
src/views/eam/documentType/index.vue

@ -27,9 +27,9 @@
v-model:currentPage="tableObject.currentPage"
v-model:sort="tableObject.sort"
>
<template #code="{row}">
<el-button type="primary" link @click="openDetail(row, '代码', row.code)">
<span>{{ row.code }}</span>
<template #name="{row}">
<el-button type="primary" link @click="openDetail(row, '代码', row.name)">
<span>{{ row.name }}</span>
</el-button>
</template>
<template #action="{ row }">

8
src/views/eam/documentTypeSelectSet/itemSelectSetForm.vue

@ -29,8 +29,8 @@
<el-col :span="24">
<el-form-item label="文档类型项" prop="items">
<div class="tag-container flex gap-2">
<el-tag v-for="ent in tags" :key="ent.code" closable :disable-transitions="false" @close="handleClose(ent.id)">
{{ ent.code}}
<el-tag v-for="ent in tags" :key="ent.name" closable :disable-transitions="false" @close="handleClose(ent.id)">
{{ ent.name}}
</el-tag>
<el-input v-if="inputVisible" ref="InputRef" v-model="inputValue" class="w-20" size="small"/>
<el-button v-else class="button-new-tag" size="small" @click="addItem">
@ -156,10 +156,10 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
if (formField === 'wenDangItem') {
console.log(val)
val.forEach(item => {
const isExist = tags.value.some(tag => tag.code === item.code);
const isExist = tags.value.some(tag => tag.name === item.name);
if (!isExist){
const newItem = {};
newItem['code'] = item.code;
newItem['name'] = item.name;
newItem['id'] = item.id;
tags.value.push(newItem);
}

Loading…
Cancel
Save