Browse Source

给锅炉部分原始记录添加科室选择

master
xiaobai 3 years ago
parent
commit
6d4cd4ebf7
  1. 25
      src/views/ysjl/1000/common/sz/gyscl.vue
  2. 6
      src/views/ysjl/1000/dj/nb/gynb.vue
  3. 26
      src/views/ysjl/1000/dj/sy/sysy.vue
  4. 27
      src/views/ysjl/1000/dj/wb/gywb.vue

25
src/views/ysjl/1000/common/sz/gyscl.vue

@ -339,6 +339,17 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row :gutter="10">
<el-form-item label="选择科室" prop="departmentId">
<el-cascader
v-model="ysjl.departmentId"
:options="departmemtArr"
:props="{ value: 'id', label: 'name', checkStrictly: true }"
:show-all-levels="false"
@change="handleChange"
/>
</el-form-item>
</el-row>
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="9"> <el-col :span="9">
<el-form-item label="下次检验日期" prop="xiacijianyanriqi"> <el-form-item label="下次检验日期" prop="xiacijianyanriqi">
@ -434,6 +445,8 @@ import Sticky from '@/components/Sticky'
import SignName from '@/views/common/SignName' import SignName from '@/views/common/SignName'
import Utils from '@/utils/contact' import Utils from '@/utils/contact'
import Bzz from '../../common/gysclJyxmBzz.js' import Bzz from '../../common/gysclJyxmBzz.js'
import { getDepartmentTreeList } from '@/api/common'
export default { export default {
name: 'GlGysclYsjl', name: 'GlGysclYsjl',
components: { SignName, Sticky }, components: { SignName, Sticky },
@ -484,6 +497,7 @@ export default {
} }
], ],
multipleSelection: [], multipleSelection: [],
departmemtArr: [],
ysjlId: this.$route.query.id, ysjlId: this.$route.query.id,
tableData: [] // tableData: [] //
} }
@ -513,8 +527,17 @@ export default {
this.getYsjl(this.ysjlId) this.getYsjl(this.ysjlId)
this.getJyxmInfoByYsjl() this.getJyxmInfoByYsjl()
} }
this.getDepartmentArr()
}, },
methods: { methods: {
getDepartmentArr() {
getDepartmentTreeList().then(res => {
this.departmemtArr = res
})
},
handleChange(v) {
this.ysjl.departmentId = v[1]
},
initYsjl() { initYsjl() {
this.api({ this.api({
url: '/ysjl/initYsjl', url: '/ysjl/initYsjl',
@ -530,6 +553,7 @@ export default {
} }
}).then(data => { }).then(data => {
this.ysjl = data.ysjl this.ysjl = data.ysjl
this.departmentId = this.ysjl.departmentId
this.param = (data.param !== null && data.param !== undefined) ? data.param : {} this.param = (data.param !== null && data.param !== undefined) ? data.param : {}
this.ysjl.jianyanjieshuriqi = this.formatter.dateFormat('YYYY-MM-dd') this.ysjl.jianyanjieshuriqi = this.formatter.dateFormat('YYYY-MM-dd')
this.getXcjyrq() this.getXcjyrq()
@ -558,6 +582,7 @@ export default {
} }
}).then(data => { }).then(data => {
this.ysjl = data this.ysjl = data
this.departmentId = this.ysjl.departmentId
if (this.ysjl.jianyanrenyuan) { if (this.ysjl.jianyanrenyuan) {
this.jianyanrenyuan = this.common.convertCnName(this.ysjl.jianyanrenyuan) this.jianyanrenyuan = this.common.convertCnName(this.ysjl.jianyanrenyuan)
} }

6
src/views/ysjl/1000/dj/nb/gynb.vue

@ -292,6 +292,7 @@
v-model="ysjl.departmentId" v-model="ysjl.departmentId"
:options="departmemtArr" :options="departmemtArr"
:props="{ value: 'id', label: 'name', checkStrictly: true }" :props="{ value: 'id', label: 'name', checkStrictly: true }"
:show-all-levels="false"
@change="handleChange" @change="handleChange"
/> />
</el-form-item> </el-form-item>
@ -423,6 +424,9 @@ export default {
this.departmemtArr = res this.departmemtArr = res
}) })
}, },
handleChange(v) {
this.ysjl.departmentId = v[1]
},
// //
singNameValue(data) { singNameValue(data) {
this.jianyanrenyuan = data.name this.jianyanrenyuan = data.name
@ -461,6 +465,7 @@ export default {
} }
}).then(data => { }).then(data => {
this.ysjl = data.ysjl this.ysjl = data.ysjl
this.departmentId = this.ysjl.departmentId
this.param = (data.param !== null && data.param !== undefined) ? data.param : {} this.param = (data.param !== null && data.param !== undefined) ? data.param : {}
this.ysjl.jianyanjieshuriqi = this.formatter.dateFormat('YYYY-MM-dd') this.ysjl.jianyanjieshuriqi = this.formatter.dateFormat('YYYY-MM-dd')
this.getXcjyrq() this.getXcjyrq()
@ -488,6 +493,7 @@ export default {
} }
}).then(data => { }).then(data => {
this.ysjl = data this.ysjl = data
this.departmentId = this.ysjl.departmentId
if (this.ysjl.jianyanrenyuan !== null && this.ysjl.jianyanrenyuan.length > 0) { if (this.ysjl.jianyanrenyuan !== null && this.ysjl.jianyanrenyuan.length > 0) {
this.jianyanrenyuan = this.common.convertCnName(this.ysjl.jianyanrenyuan) this.jianyanrenyuan = this.common.convertCnName(this.ysjl.jianyanrenyuan)
} }

26
src/views/ysjl/1000/dj/sy/sysy.vue

@ -230,6 +230,19 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row :gutter="10">
<el-col :span="9">
<el-form-item label="选择科室" prop="departmentId">
<el-cascader
v-model="ysjl.departmentId"
:options="departmemtArr"
:props="{ value: 'id', label: 'name', checkStrictly: true }"
:show-all-levels="false"
@change="handleChange"
/>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="10"> <el-row :gutter="10">
<el-col :span="9"> <el-col :span="9">
<el-form-item label="检验人员" prop="jianyanrenyuan"> <el-form-item label="检验人员" prop="jianyanrenyuan">
@ -267,6 +280,7 @@ import Sticky from '@/components/Sticky'
import SignName from '@/views/common/SignName' import SignName from '@/views/common/SignName'
import Utils from '@/utils/contact' import Utils from '@/utils/contact'
import merge from 'webpack-merge' import merge from 'webpack-merge'
import { getDepartmentTreeList } from '@/api/common'
export default { export default {
name: 'GlSysyYsjl', name: 'GlSysyYsjl',
components: { SignName, Sticky }, components: { SignName, Sticky },
@ -286,6 +300,7 @@ export default {
state: this.$route.query.state, state: this.$route.query.state,
jianyanrenyuan: '', jianyanrenyuan: '',
departmentId: this.$store.getters.departmentId, departmentId: this.$store.getters.departmentId,
departmemtArr: [],
isRepeat: false, isRepeat: false,
edit: false, edit: false,
checkedTab: 'first', checkedTab: 'first',
@ -337,11 +352,20 @@ export default {
} }
this.getJyxm(1) this.getJyxm(1)
this.getUserList() this.getUserList()
this.getDepartmentArr()
}, },
beforeDestroy() { beforeDestroy() {
window.removeEventListener('beforeunload', this.beforeunloadHandler, false) window.removeEventListener('beforeunload', this.beforeunloadHandler, false)
}, },
methods: { methods: {
getDepartmentArr() {
getDepartmentTreeList().then(res => {
this.departmemtArr = res
})
},
handleChange(v) {
this.ysjl.departmentId = v[1]
},
// //
singNameValue(data) { singNameValue(data) {
this.jianyanrenyuan = data.name this.jianyanrenyuan = data.name
@ -388,6 +412,7 @@ export default {
} }
}).then(data => { }).then(data => {
this.ysjl = data.ysjl this.ysjl = data.ysjl
this.departmentId = this.ysjl.departmentId
this.param = (data.param !== null && data.param !== undefined) ? data.param : {} this.param = (data.param !== null && data.param !== undefined) ? data.param : {}
this.ysjl.jilubianhao = this.jilubianhao this.ysjl.jilubianhao = this.jilubianhao
this.ysjl.baogaobianhao = null // this.ysjl.baogaobianhao = null //
@ -413,6 +438,7 @@ export default {
} }
}).then(data => { }).then(data => {
this.ysjl = data this.ysjl = data
this.departmentId = this.ysjl.departmentId
if (this.ysjl.jianyanrenyuan !== null && this.ysjl.jianyanrenyuan.length > 0) { if (this.ysjl.jianyanrenyuan !== null && this.ysjl.jianyanrenyuan.length > 0) {
this.jianyanrenyuan = this.common.convertCnName(this.ysjl.jianyanrenyuan) this.jianyanrenyuan = this.common.convertCnName(this.ysjl.jianyanrenyuan)
} }

27
src/views/ysjl/1000/dj/wb/gywb.vue

@ -289,6 +289,19 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row :gutter="20">
<el-col :span="9">
<el-form-item label="选择科室" prop="departmentId">
<el-cascader
v-model="departmentId"
:props="{ value: 'id', label: 'name', checkStrictly: true }"
:options="tree"
:show-all-levels="false"
@change="handleChange"
/>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20" style="height: 110px;"> <el-row :gutter="20" style="height: 110px;">
<el-col :span="18"> <el-col :span="18">
<el-form-item label="其它缺陷情况或说明:" prop="beizhu"> <el-form-item label="其它缺陷情况或说明:" prop="beizhu">
@ -327,6 +340,8 @@ import Sticky from '@/components/Sticky'
import SignName from '@/views/common/SignName' import SignName from '@/views/common/SignName'
import Utils from '@/utils/contact' import Utils from '@/utils/contact'
import merge from 'webpack-merge' import merge from 'webpack-merge'
import { getDepartmentTreeList } from '@/api/common.js'
export default { export default {
name: 'GlGywbYsjl', name: 'GlGywbYsjl',
components: { SignName, Sticky }, components: { SignName, Sticky },
@ -347,6 +362,7 @@ export default {
sybjSData: [], sybjSData: [],
tableData: [], tableData: [],
users: [], users: [],
tree: [],
checkedTab: 'first', checkedTab: 'first',
ysjlId: this.$route.query.id, ysjlId: this.$route.query.id,
// //
@ -415,11 +431,20 @@ export default {
this.getJyxm(1) this.getJyxm(1)
} }
this.getUserList() this.getUserList()
this.getDepartment()
}, },
beforeDestroy() { beforeDestroy() {
window.removeEventListener('beforeunload', this.beforeunloadHandler, false) window.removeEventListener('beforeunload', this.beforeunloadHandler, false)
}, },
methods: { methods: {
getDepartment() {
getDepartmentTreeList().then(res => {
this.tree = res
})
},
handleChange(v) {
this.ysjl.departmentId = v[1]
},
// //
singNameValue(data) { singNameValue(data) {
this.jianyanrenyuan = data.name this.jianyanrenyuan = data.name
@ -444,6 +469,7 @@ export default {
} }
}).then(data => { }).then(data => {
this.ysjl = data.ysjl this.ysjl = data.ysjl
this.departmentId = this.ysjl.departmentId
this.param = (data.param !== null && data.param !== undefined) ? data.param : {} this.param = (data.param !== null && data.param !== undefined) ? data.param : {}
this.getXcjyrq() this.getXcjyrq()
this.ysjl.jilubianhao = this.jilubianhao this.ysjl.jilubianhao = this.jilubianhao
@ -474,6 +500,7 @@ export default {
} }
}).then(data => { }).then(data => {
this.ysjl = data this.ysjl = data
this.departmentId = this.ysjl.departmentId
if (this.ysjl.jianyanrenyuan !== null && this.ysjl.jianyanrenyuan.length > 0) { if (this.ysjl.jianyanrenyuan !== null && this.ysjl.jianyanrenyuan.length > 0) {
this.jianyanrenyuan = this.common.convertCnName(this.ysjl.jianyanrenyuan) this.jianyanrenyuan = this.common.convertCnName(this.ysjl.jianyanrenyuan)
} }

Loading…
Cancel
Save