0d56994e by fanguang

fix

1 parent f9fd4f11
...@@ -17,23 +17,6 @@ ...@@ -17,23 +17,6 @@
17 <el-input v-model="form.standardName" placeholder="请输入" maxlength="50"/> 17 <el-input v-model="form.standardName" placeholder="请输入" maxlength="50"/>
18 </el-form-item> 18 </el-form-item>
19 </el-col> 19 </el-col>
20 <el-col :span="12">
21 <el-form-item label="标准编号" prop="standardCode">
22 <el-input v-model="form.standardCode" placeholder="请输入" maxlength="20"/>
23 </el-form-item>
24 </el-col>
25 <el-col :span="12" style="padding-right:10px">
26 <el-form-item label="排序" prop="orderNum">
27 <el-input v-model="form.orderNum" placeholder="请输入" type="number" maxlength="2"/>
28 </el-form-item>
29 </el-col>
30 <el-col :span="12" style="padding-right:10px">
31 <el-form-item label="发布单位" prop="publishingUnitCode">
32 <el-select v-model="form.publishingUnitCode" placeholder="请选择">
33 <el-option v-for="item in publishUnitOptions" :label="item.label" :value="item.value" :key="item.value"></el-option>
34 </el-select>
35 </el-form-item>
36 </el-col>
37 <el-col :span="12" style="padding-right:10px"> 20 <el-col :span="12" style="padding-right:10px">
38 <el-form-item label="上级标准" prop="parentGuid"> 21 <el-form-item label="上级标准" prop="parentGuid">
39 <el-tree-select 22 <el-tree-select
...@@ -60,6 +43,24 @@ ...@@ -60,6 +43,24 @@
60 /> --> 43 /> -->
61 </el-form-item> 44 </el-form-item>
62 </el-col> 45 </el-col>
46 <el-col :span="12" style="padding-right:10px">
47 <el-form-item label="标准编号" prop="standardCode">
48 <el-input v-model="form.standardCode" placeholder="请输入" maxlength="20"/>
49 </el-form-item>
50 </el-col>
51 <el-col :span="12" style="padding-right:10px">
52 <el-form-item label="排序" prop="orderNum">
53 <el-input v-model="form.orderNum" placeholder="请输入" type="number" maxlength="2"/>
54 </el-form-item>
55 </el-col>
56 <el-col :span="12" style="padding-right:10px">
57 <el-form-item label="发布单位" prop="publishingUnitCode">
58 <el-select v-model="form.publishingUnitCode" placeholder="请选择">
59 <el-option v-for="item in publishUnitOptions" :label="item.label" :value="item.value" :key="item.value"></el-option>
60 </el-select>
61 </el-form-item>
62 </el-col>
63
63 <el-col :span="24"> 64 <el-col :span="24">
64 <el-form-item label="描述" prop="description"> 65 <el-form-item label="描述" prop="description">
65 <el-input 66 <el-input
...@@ -253,13 +254,21 @@ function parentGuidChange (val) { ...@@ -253,13 +254,21 @@ function parentGuidChange (val) {
253 } 254 }
254 } 255 }
255 function parentGuidCheck (node, {checkedKeys}) { 256 function parentGuidCheck (node, {checkedKeys}) {
256 // console.log(node, isCheck) 257 let fieldRQVOS = []
257 // if (!node || !isCheck) { 258 if (checkedKeys.length) {
258 // form.value.fieldRQVOS = [] 259 fieldRQVOS = [{...tableFormTpl}]
259 // return 260 }
260 // } 261 form.value.fieldRQVOS = fieldRQVOS
261 // form.value.fieldRQVOS = [{...tableFormTpl}] 262 // 新增状态,上级标准带出标准编号和发布单位
262 form.value.fieldRQVOS = checkedKeys.length ? [{...tableFormTpl}] : [] 263 if (props.type === 'add') {
264 getMetaStandardDetail(node.guid).then((res:any) => {
265 if (res.code === proxy.$passCode) {
266 const data = res.data
267 form.value.standardCode = data.standardCode
268 form.value.publishingUnitCode = data.publishingUnitCode
269 }
270 })
271 }
263 } 272 }
264 273
265 const tableFormTpl = { 274 const tableFormTpl = {
......
...@@ -37,6 +37,8 @@ ...@@ -37,6 +37,8 @@
37 :data="standardCodeTree" 37 :data="standardCodeTree"
38 :props="treeSelectProps" 38 :props="treeSelectProps"
39 placeholder="请选择" 39 placeholder="请选择"
40 filterable
41 clearable
40 /> 42 />
41 </el-form-item> 43 </el-form-item>
42 </el-col> 44 </el-col>
......
...@@ -114,6 +114,7 @@ const tableInfo: any = ref({ ...@@ -114,6 +114,7 @@ const tableInfo: any = ref({
114 fields: [ 114 fields: [
115 { label: "序号", type: "index", width: 56, align: "center" }, 115 { label: "序号", type: "index", width: 56, align: "center" },
116 { label: '代码名称', field: 'codeName', width: 140 }, 116 { label: '代码名称', field: 'codeName', width: 140 },
117 { label: '代码编码', field: 'code', width: 140 },
117 { label: '标准号', field: 'standard', width: 140 }, 118 { label: '标准号', field: 'standard', width: 140 },
118 { label: '标准名称', field: 'standardName', width: 140 }, 119 { label: '标准名称', field: 'standardName', width: 140 },
119 // { label: '启用状态', field: 'bizState', type: 'switch', activeText: '启用', inactiveText: '停用', activeValue: 1, inactiveValue: 0, switchWidth: 56, width: 100, align: 'center' }, 120 // { label: '启用状态', field: 'bizState', type: 'switch', activeText: '启用', inactiveText: '停用', activeValue: 1, inactiveValue: 0, switchWidth: 56, width: 100, align: 'center' },
...@@ -172,6 +173,16 @@ const formItems: any = ref([ ...@@ -172,6 +173,16 @@ const formItems: any = ref([
172 required: true 173 required: true
173 }, 174 },
174 { 175 {
176 label: '代码编码',
177 type: 'input',
178 placeholder: '请输入',
179 field: 'code',
180 default: '',
181 maxlength: 30,
182 clearable: true,
183 required: true
184 },
185 {
175 label: '标准号', 186 label: '标准号',
176 type: 'input', 187 type: 'input',
177 placeholder: '请输入', 188 placeholder: '请输入',
...@@ -225,6 +236,7 @@ const formItems: any = ref([ ...@@ -225,6 +236,7 @@ const formItems: any = ref([
225 placeholder: '请选择', 236 placeholder: '请选择',
226 field: 'typeCode', 237 field: 'typeCode',
227 default: '1', 238 default: '1',
239 block: true,
228 options: [ 240 options: [
229 { label: '列表结构', value: '1' }, 241 { label: '列表结构', value: '1' },
230 { label: '层级结构', value: '2' } 242 { label: '层级结构', value: '2' }
...@@ -271,6 +283,7 @@ const formItems: any = ref([ ...@@ -271,6 +283,7 @@ const formItems: any = ref([
271 const formRules: any = ref({ 283 const formRules: any = ref({
272 standardTypeCode: { required: true, message: '请选择标准类型' }, 284 standardTypeCode: { required: true, message: '请选择标准类型' },
273 codeName: { required: true, message: '请输入代码名称' }, 285 codeName: { required: true, message: '请输入代码名称' },
286 code: { required: true, message: '请输入代码编码' },
274 standard: { required: true, message: '请输入标准号' }, 287 standard: { required: true, message: '请输入标准号' },
275 standardName: { required: true, message: '请输入标准名称' }, 288 standardName: { required: true, message: '请输入标准名称' },
276 publishingUnitCode: { required: true, message: '请选择发布单位' }, 289 publishingUnitCode: { required: true, message: '请选择发布单位' },
......
...@@ -477,7 +477,10 @@ const viewGraph = () => { ...@@ -477,7 +477,10 @@ const viewGraph = () => {
477 <div class="main_wrap"> 477 <div class="main_wrap">
478 <div class="table_tool_wrap"> 478 <div class="table_tool_wrap">
479 <div class="tools_btns"> 479 <div class="tools_btns">
480 <el-button type="primary" @click="() => openStandardFieldsDialog('add')" v-preReClick>新建</el-button> 480 <el-button type="primary"
481 @click="() => openStandardFieldsDialog('add')"
482 :disabled="treeInfo.currentObj.children"
483 v-preReClick>新建</el-button>
481 <el-button @click="importData" v-preReClick>导入</el-button> 484 <el-button @click="importData" v-preReClick>导入</el-button>
482 <el-button @click="exportData" v-preReClick>导出</el-button> 485 <el-button @click="exportData" v-preReClick>导出</el-button>
483 <el-button @click="viewGraph" v-preReClick>查看</el-button> 486 <el-button @click="viewGraph" v-preReClick>查看</el-button>
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!