From d71436544198b7b051115662fc9cf4b12ce0cda3 Mon Sep 17 00:00:00 2001
From: loulijun2021 <1694218219@qq.com>
Date: 星期二, 19 七月 2022 18:32:40 +0800
Subject: [PATCH] 1.修改bug
---
src/views/zlgl/gxjyxm.vue | 98 +++++++++++++++++--------------------------------
1 files changed, 34 insertions(+), 64 deletions(-)
diff --git a/src/views/zlgl/gxjyxm.vue b/src/views/zlgl/gxjyxm.vue
index c7bf002..7d7f1c4 100644
--- a/src/views/zlgl/gxjyxm.vue
+++ b/src/views/zlgl/gxjyxm.vue
@@ -11,12 +11,11 @@
>
<div class="elForm">
<el-form-item label="椤圭洰缂栫爜" style=" display: flex;">
- <el-input v-model="form.defectcode" placeholder="璇疯緭鍏�" style="width: 200px" />
+ <el-input v-model="form.itemcode" placeholder="璇疯緭鍏�" style="width: 200px" />
</el-form-item>
<el-form-item label="椤圭洰鍚嶇О" style=" display: flex;">
<el-input v-model="form.itemname" placeholder="璇疯緭鍏�" style="width: 200px" />
</el-form-item>
-
<el-form-item label="椤圭洰鎻忚堪" style=" display: flex;">
<el-input v-model="form.itemdescr" style="width: 200px" placeholder="璇疯緭鍏�" />
</el-form-item>
@@ -55,31 +54,18 @@
label="搴忓彿"
/>
<el-table-column
- prop="org_code"
- label="缁勭粐缂栫爜"
+ prop="code"
+ label="椤圭洰浠g爜"
sortable="custom"
/>
<el-table-column
- prop="org_name"
- label="缁勭粐鍚嶇О"
+ prop="name"
+ label="椤圭洰鍚嶇О"
sortable="custom"
/>
<el-table-column
- prop="description"
- label="缁勭粐绫诲瀷"
- sortable="custom"
- >
- <template slot-scope="{row}">
- <div v-if="row.description==='F'">宸ュ巶</div>
- <div v-if="row.description==='D'">閮ㄩ棬</div>
- <div v-if="row.description==='W'">杞﹂棿</div>
- <div v-if="row.description==='K'">绉戝</div>
- <div v-if="row.description==='L'">鐢熶骇绾�</div>
- </template>
- </el-table-column>
- <el-table-column
- prop="parentorg_name"
- label="涓婄骇鍗曚綅"
+ prop="descr"
+ label="椤圭洰鎻忚堪"
sortable="custom"
/>
<el-table-column
@@ -126,14 +112,14 @@
@close="handleClose"
>
<el-form ref="dialogForm" inline :rules="dialogFormRules" :model="dialogForm" label-width="80px">
- <el-form-item label="椤圭洰绫诲瀷" prop="OrgCode">
- <el-input v-model="dialogForm.OrgCode" :disabled="operation!=='add'" style="width: 200px" />
+ <el-form-item label="椤圭洰缂栫爜" prop="checkitemcode">
+ <el-input v-model="dialogForm.checkitemcode" :disabled="operation!=='add'" style="width: 200px" />
</el-form-item>
- <el-form-item label="椤圭洰鍚嶇О" prop="OrgName">
- <el-input v-model="dialogForm.OrgName" style="width: 200px" />
+ <el-form-item label="椤圭洰鍚嶇О" prop="checkitemname">
+ <el-input v-model="dialogForm.checkitemname" style="width: 200px" />
</el-form-item>
- <el-form-item label="椤圭洰鎻忚堪" prop="OrgName">
- <el-input v-model="dialogForm.OrgName" type="textarea" style="width: 200px" />
+ <el-form-item label="椤圭洰鎻忚堪" prop="checkitemdescr">
+ <el-input v-model="dialogForm.checkitemdescr" type="textarea" style="width: 200px" />
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
@@ -150,7 +136,7 @@
import Pagination from '@/components/Pagination'
import { AddUpdateOrganization, DeleteOrganization, OrganizationSearch, PrentOrganization } from '@/api/jcsz'
import { getCookie } from '@/utils/auth'
-import { DedectSearch } from '@/api/zlgl'
+import { AddUpdateStepCheckItem, DedectSearch, DeleteStepCheckItem, StepCheckItemSearch } from '@/api/zlgl'
const SER_HZ = /^[\u4e00-\u9fa5]+$/
export default {
@@ -182,37 +168,23 @@
page: 1, // 绗嚑椤�
rows: 20 // 姣忛〉澶氬皯鏉�
},
- OrgTypeArr: [
- { label: '宸ュ巶', value: 'F' },
- { label: '閮ㄩ棬', value: 'D' },
- { label: '杞﹂棿', value: 'W' },
- { label: '绉戝', value: 'K' },
- { label: '鐢熶骇绾�', value: 'L' }
- ],
-
total: 10,
tableData: [],
dialogVisible: false,
dialogForm: {
- OrgType: '',
- OrgCode: '',
- OrgName: '',
- SupUnit: ''// 涓婄骇鍗曚綅
+ checkitemcode: '', // 宸ュ簭妫�楠岄」鐩紪鐮�
+ checkitemname: '', // 宸ュ簭妫�楠岄」鐩悕绉�
+ checkitemdescr: '' // 宸ュ簭妫�楠岄」鐩弿杩�
},
operation: '',
dialogFormRules: {
- OrgType: [
- { required: true, message: '璇疯緭鍏ラ�夋嫨绫诲瀷', trigger: ['blur', 'change'] }
- ],
- OrgCode: [
+ checkitemcode: [
{ required: true, validator: validateName, trigger: ['blur', 'change'] }
],
- OrgName: [
+ checkitemname: [
{ required: true, message: '璇疯緭鍏ュ悕绉�', trigger: ['blur', 'change'] }
]
-
}
-
}
},
created() {
@@ -250,10 +222,9 @@
},
// 閲嶇疆
reset() {
- this.form.OrgCode = ''
- this.form.OrgName = ''
- this.form.OrgType = ''
- this.form.UserName = ''
+ this.form.itemcode = ''
+ this.form.itemname = ''
+ this.form.itemdescr = ''
this.getStepCheckItemSearch()
},
@@ -268,9 +239,9 @@
this.dialogVisible = true
this.$nextTick(() => {
- this.dialogForm.OrgCode = row.org_code
- this.dialogForm.OrgName = row.org_name
- this.dialogForm.SupUnit = row.parent_id
+ this.dialogForm.checkitemcode = row.code
+ this.dialogForm.checkitemname = row.name
+ this.dialogForm.checkitemdescr = row.descr
})
},
// 鍒犻櫎鎸夐挳
@@ -280,7 +251,7 @@
cancelButtonText: '鍙栨秷',
type: 'warning'
}).then(() => {
- DeleteOrganization({ orgid: row.code }).then(res => {
+ DeleteStepCheckItem({ checkitemcode: row.code }).then(res => {
if (res.code === '200') {
this.$message.success('鍒犻櫎鎴愬姛!')
this.getStepCheckItemSearch()
@@ -292,10 +263,9 @@
},
// 瀵硅瘽妗嗗叧闂簨浠�
handleClose() {
- this.dialogForm.OrgType = ''
- this.dialogForm.OrgCode = ''
- this.dialogForm.OrgName = ''
- this.dialogForm.SupUnit = ''
+ this.dialogForm.checkitemcode = ''
+ this.dialogForm.checkitemname = ''
+ this.dialogForm.checkitemdescr = ''
this.$refs.dialogForm.clearValidate()
},
// 瀵硅瘽妗嗗彇娑�
@@ -307,12 +277,12 @@
this.$refs.dialogForm.validate(valid => {
if (valid) {
const data = {
- OrganCode: this.dialogForm.OrgCode,
- OrganName: this.dialogForm.OrgName,
- OperType: this.operation === 'add' ? 'Add' : 'Update',
- Operator: getCookie('admin')
+ checkitemcode: this.dialogForm.checkitemcode,
+ checkitemname: this.dialogForm.checkitemname,
+ checkitemdescr: this.dialogForm.checkitemdescr,
+ OperType: this.operation === 'add' ? 'Add' : 'Update'
}
- AddUpdateOrganization(data).then(res => {
+ AddUpdateStepCheckItem(data).then(res => {
if (res.code === '200') {
this.$message.success(this.operation === 'add' ? '娣诲姞鎴愬姛锛�' : '淇敼鎴愬姛锛�')
this.dialogVisible = false
--
Gitblit v1.9.3