diff --git a/src/views/ysjl/1000/dj/wb/gywb.vue b/src/views/ysjl/1000/dj/wb/gywb.vue index 82ba80d..cba5080 100644 --- a/src/views/ysjl/1000/dj/wb/gywb.vue +++ b/src/views/ysjl/1000/dj/wb/gywb.vue @@ -145,7 +145,7 @@ 性能参数 - + diff --git a/src/views/ysjl/2000/2400/common/ycjl.vue b/src/views/ysjl/2000/2400/common/ycjl.vue index 55fcd85..cf2775f 100644 --- a/src/views/ysjl/2000/2400/common/ycjl.vue +++ b/src/views/ysjl/2000/2400/common/ycjl.vue @@ -502,9 +502,9 @@ - + @@ -547,11 +547,10 @@ import Sticky from '@/components/Sticky' import jyfa from '@/views/ysjl/addJyfa' import SignName from '@/views/common/SignName' import Utils from '@/utils/contact.js' -import SliceUpload from '@/components/SliceUpload' import Symbols from '@/views/common/Symbols' export default { name: 'Ycjl', - components: { SignName, Sticky, jyfa, SliceUpload, Symbols }, + components: { SignName, Sticky, jyfa, Symbols }, props: { neibuleibieparam: { type: String, diff --git a/src/views/ysjl/3000/common/index.vue b/src/views/ysjl/3000/common/index.vue index 4b115af..fee7dda 100644 --- a/src/views/ysjl/3000/common/index.vue +++ b/src/views/ysjl/3000/common/index.vue @@ -659,6 +659,19 @@ + + + + + + + @@ -725,6 +738,7 @@ import Inspection from '@/views/ysjl/3000/common/inspection-items' import Table from '@/views/ysjl/3000/dj/common/table' import Phxsb from '@/views/ysjl/3000/dj/common/phxsb' import ZdftFb from '@/views/ysjl/3000/dj/common/zdftFb' +import { getDepartmentTreeList } from '@/api/common.js' export default { name: 'BaseInfo', @@ -813,7 +827,8 @@ export default { pic: '', fubiao1: [], fubiao2: [], - fubiao3: [] + fubiao3: [], + tree: [] } }, created() { @@ -842,12 +857,21 @@ export default { this.getJyxm(1) this.getJyxmInfoByYsjl() } + this.getDepartment() this.getDicJyxm(1) this.userList = this.$store.getters.allUser.filter( (user) => user.departmentId === 74 && user.clientType === 'System' ) }, methods: { + getDepartment() { + getDepartmentTreeList().then(res => { + this.tree = res + }) + }, + handleChange(v) { + this.ysjl.departmentId = v[1] + }, initYsjl() { this.ysjlService.init(this.$route.query).then((data) => { this.ysjl = data.ysjl @@ -856,6 +880,7 @@ export default { this.ysjl.bglx = 1 this.ysjl.cjState = 'ysjl' this.ysjl.xianchangjianyantiaojian = '符合' + this.departmentId = this.ysjl.departmentId this.getJyxm(1) this.getSbList() }) @@ -897,6 +922,7 @@ export default { getYsjl() { this.ysjlService.getYsjl(this.ysjlId).then((data) => { this.ysjl = data + this.departmentId = this.ysjl.departmentId this.ysjl.imagePath = '' if ( this.ysjl.jianyanrenyuan !== null && diff --git a/src/views/ysjl/4000/dj/common/index.vue b/src/views/ysjl/4000/dj/common/index.vue index 90ccb9e..d466cf5 100644 --- a/src/views/ysjl/4000/dj/common/index.vue +++ b/src/views/ysjl/4000/dj/common/index.vue @@ -1,88 +1,173 @@ - + - + 保存 - + 更新 - + 生成报告 - + 预览 - + 基本信息 - + - - - - + + - + - + - - 编号重复 + + 编号重复 - + - + - + - + - - + + - - + + - + @@ -95,7 +180,11 @@ - + @@ -127,78 +216,90 @@ - + - + - + - + - - 吊钩 + + 吊钩 - - 抓斗 + + 抓斗 - - 吸盘 + + 吸盘 - - 集装箱吊具 + + 集装箱吊具 - - 其他 + + 其他 - + - - 吊钩 + + 吊钩 - - 抓斗 + + 抓斗 - - 吸盘 + + 吸盘 - - 集装箱吊具 + + 集装箱吊具 - - 其他 + + 其他 - + - - 首次检验 + + 首次检验 - - 定期检验 + + 定期检验 @@ -207,28 +308,25 @@ - + - - 露天 + + 露天 - - 非露天 + + 非露天 - - 高温 + + 高温 - - 粉尘 + + 粉尘 - - 有毒 + + 有毒 - - 其他 + + 其他 @@ -242,18 +340,18 @@ prop="jianyanhuanjingtiaojian" > - - 符合 + + 符合 - - 不符合 + + 不符合 - + 技术参数 @@ -304,7 +402,7 @@ - + 技术参数 @@ -372,31 +470,31 @@ - + - - 吊钩 + + 吊钩 - - 抓斗 + + 抓斗 - - 吸盘 + + 吸盘 - - 集装箱吊具 + + 集装箱吊具 - - 其他 + + 其他 - + 技术参数 @@ -447,7 +545,7 @@ - + 技术参数 @@ -458,7 +556,10 @@ - + m @@ -499,39 +600,57 @@ - + - + - + - + 技术参数 - + t - - + + m @@ -571,8 +690,14 @@ - - + + @@ -586,7 +711,7 @@ 检验信息 - + @@ -607,17 +732,17 @@ - - 合格 + + 合格 - - 不合格 + + 不合格 - - 复检合格 + + 复检合格 - - 复检不合格 + + 复检不合格 @@ -632,7 +757,7 @@ :autosize="{ minRows: 2, maxRows: 5 }" :disabled="edit" /> - (需备注扶墙架道数) + (需备注扶墙架道数) @@ -658,6 +783,19 @@ + + + + + + + @@ -694,14 +832,30 @@ - + - + @@ -720,6 +874,8 @@ import Sticky from '@/components/Sticky' import SignName from '@/views/common/SignName' import Utils from '@/utils/contact' import merge from 'webpack-merge' +import { getDepartmentTreeList } from '@/api/common.js' + export default { name: 'GlGynbYsjl', components: { SignName, Sticky }, @@ -746,6 +902,7 @@ export default { edit: false, sybjSData: [], tableData: [], + tree: [], checkedTab: 'first', ysjlId: this.$route.query.id, // 表格合并相关 @@ -753,7 +910,8 @@ export default { cols: [ { name: 'jianyanxiang', // 参与计算的列名,必须和el-table-column prop=''值一致 - getValue(row) { // 该列用于比较的值的获取方法 + getValue(row) { + // 该列用于比较的值的获取方法 return row.jianyanxiang } } @@ -774,9 +932,7 @@ export default { ] } }, - computed: { - - }, + computed: {}, watch: { // jlbh3: function(val) { // this.ysjl.jilubianhao = this.jlbh1 + this.jlbh2 + '-' + val @@ -800,11 +956,21 @@ export default { this.getYsjl(this.$route.query.id) this.getJyxm(1) } + this.getDepartment() }, beforeDestroy() { window.removeEventListener('beforeunload', this.beforeunloadHandler, false) }, methods: { + getDepartment() { + getDepartmentTreeList().then((res) => { + console.log(res, 555) + this.tree = res + }) + }, + handleChange(v) { + this.ysjl.departmentId = v[1] + }, /** * 签名方法 * @param data @@ -846,7 +1012,7 @@ export default { aheadPart: aheadPart + '-', hinderPart: '' } - }).then(data => { + }).then((data) => { this.jlbh3 = data }) }, @@ -863,9 +1029,11 @@ export default { sbpzdm: this.$route.query.sbpzdm, sbpzmc: this.$route.query.sbpzmc } - }).then(data => { + }).then((data) => { this.ysjl = data.ysjl - this.param = (data.param !== null && data.param !== undefined) ? data.param : {} + this.departmentId = this.ysjl.departmentId + this.param = + data.param !== null && data.param !== undefined ? data.param : {} this.ysjl.jianyanjieshuriqi = this.formatter.dateFormat('YYYY-MM-dd') this.getXcjyrq() this.ysjl.jilubianhao = this.jilubianhao @@ -876,7 +1044,9 @@ export default { this.$set(this.param, 'qita', '/') // // 制造日期、投用日期、上次检验日期设置成正确的日期格式 // this.ysjl.zhizaoriqi = this.common.checkDateFormat(this.ysjl.zhizaoriqi) - this.ysjl.touyongriqi = this.common.checkDateFormat(this.ysjl.touyongriqi) + this.ysjl.touyongriqi = this.common.checkDateFormat( + this.ysjl.touyongriqi + ) // this.param.shangcijianyanriqi = this.common.checkDateFormat(this.param.shangcijianyanriqi) }) }, @@ -887,13 +1057,23 @@ export default { params: { ysjlId: id } - }).then(data => { + }).then((data) => { this.ysjl = data - if (this.ysjl.jianyanrenyuan !== null && this.ysjl.jianyanrenyuan.length > 0) { - this.jianyanrenyuan = this.common.convertCnName(this.ysjl.jianyanrenyuan) + this.departmentId = this.ysjl.departmentId + if ( + this.ysjl.jianyanrenyuan !== null && + this.ysjl.jianyanrenyuan.length > 0 + ) { + this.jianyanrenyuan = this.common.convertCnName( + this.ysjl.jianyanrenyuan + ) } // 查询最大记录编号 - if (this.ysjl.jilubianhao === null || this.ysjl.jilubianhao === undefined || this.ysjl.jilubianhao === '') { + if ( + this.ysjl.jilubianhao === null || + this.ysjl.jilubianhao === undefined || + this.ysjl.jilubianhao === '' + ) { this.getMaxBh() } this.getParam(this.ysjl.id, this.ysjl.shebeizhongleidaima) @@ -908,7 +1088,7 @@ export default { ysjlId: ysjlId, sbzldm: sbzldm } - }).then(data => { + }).then((data) => { this.param = data }) }, @@ -936,7 +1116,10 @@ export default { saveYsjl: function(operation) { if (operation === 'add') { if (this.jlbh3.trim() === '') { - this.$message({ message: '请先确认记录编号是否完整!', type: 'warning' }) + this.$message({ + message: '请先确认记录编号是否完整!', + type: 'warning' + }) return false } } @@ -968,7 +1151,10 @@ export default { this.ysjl.jilubianhao = this.jlbh1 + this.jlbh2 + '-' + this.jlbh3 method = 'post' } else if (operation === 'build') { - if (this.ysjl.jianyanrenyuan === null || this.ysjl.jianyanrenyuan === '') { + if ( + this.ysjl.jianyanrenyuan === null || + this.ysjl.jianyanrenyuan === '' + ) { this.$message({ type: 'error', message: '请先签名再生成报告!' @@ -987,10 +1173,13 @@ export default { method = 'put' } if (this.isRepeat) { - this.$message({ message: '记录编号重复,请先修改记录编号再保存', type: 'error' }) + this.$message({ + message: '记录编号重复,请先修改记录编号再保存', + type: 'error' + }) return false } else { - this.$refs['ysjl'].validate(valid => { + this.$refs['ysjl'].validate((valid) => { if (valid) { const jyxm = tableData this.api({ @@ -1002,11 +1191,14 @@ export default { cyJyxm: {}, jdJyxm: jyxm } - }).then(data => { + }).then((data) => { Utils.$emit('task-list') Utils.$emit('ysjl-list') if (operation === 'add' && data !== '') { - this.$message({ message: '保存成功, 请前往待办记录中查看。', type: 'success' }) + this.$message({ + message: '保存成功, 请前往待办记录中查看。', + type: 'success' + }) this.ysjl.id = data this.param.ysjlId = data // 刷新路由网址 @@ -1018,7 +1210,9 @@ export default { this.$message({ message: '更新成功', type: 'success' }) // 替换路由中的参数 this.$router.push({ - query: merge(this.$route.query, { 'jianyanrenyuan': this.ysjl.jianyanrenyuan }) + query: merge(this.$route.query, { + jianyanrenyuan: this.ysjl.jianyanrenyuan + }) }) // this.$refs.bill.updateChargeBill() } else { @@ -1045,7 +1239,7 @@ export default { ysjlId: id, bianhao: bianhao } - }).then(data => { + }).then((data) => { if (data > 0) { this.isRepeat = true } else { @@ -1055,8 +1249,15 @@ export default { }, getXcjyrq() { const xcjyrq = new Date(this.ysjl.jianyanjieshuriqi) - xcjyrq.setFullYear(xcjyrq.getFullYear() + 2, xcjyrq.getMonth(), xcjyrq.getDate() - 1) - this.ysjl.xiacijianyanriqi = this.formatter.dateFormat('YYYY-MM-dd', xcjyrq) + xcjyrq.setFullYear( + xcjyrq.getFullYear() + 2, + xcjyrq.getMonth(), + xcjyrq.getDate() - 1 + ) + this.ysjl.xiacijianyanriqi = this.formatter.dateFormat( + 'YYYY-MM-dd', + xcjyrq + ) }, setYsjlData(data) { this.ysjl.sfdId = data diff --git a/src/views/ysjl/4000/jj/common/index.vue b/src/views/ysjl/4000/jj/common/index.vue index 36ca7dd..88343bb 100644 --- a/src/views/ysjl/4000/jj/common/index.vue +++ b/src/views/ysjl/4000/jj/common/index.vue @@ -1,74 +1,147 @@ - + - + 保存 - + 更新 - + 生成报告 - + 预览 - + 基本信息 - + - - - - + + - + - + - - 编号重复 + + 编号重复 - + - + - - + + - - + + - - + + @@ -88,32 +161,54 @@ - - + + - + - - + + - + - + @@ -126,7 +221,11 @@ - + @@ -165,12 +264,21 @@ - + - + @@ -179,11 +287,11 @@ - - 是 + + 是 - - 否 + + 否 @@ -198,56 +306,62 @@ - - 安装 + + 安装 - - 改造 + + 改造 - - 改造 + + 改造 - + - + - + - - 吊钩 + + 吊钩 - - 抓斗 + + 抓斗 - - 吸盘 + + 吸盘 - - 其他 + + 其他 - + - - 中心滑环式 + + 中心滑环式 - - 电缆 + + 电缆 - - 其它 + + 其它 @@ -255,28 +369,25 @@ - + - - 露天 + + 露天 - - 非露天 + + 非露天 - - 高温 + + 高温 - - 粉尘 + + 粉尘 - - 有毒 + + 有毒 - - 其他 + + 其他 @@ -290,18 +401,18 @@ prop="jianyananquanhuanjing" > - - 符合 + + 符合 - - 不符合 + + 不符合 - + 技术参数 @@ -352,10 +463,10 @@ - + 技术参数 - + t @@ -378,7 +489,7 @@ - + m/min @@ -391,7 +502,7 @@ t·m - + @@ -425,7 +536,7 @@ - + @@ -435,7 +546,7 @@ - + 技术参数 @@ -486,7 +597,7 @@ - + 技术参数 @@ -497,7 +608,10 @@ - + m @@ -545,39 +659,61 @@ - + - + - - + + - + 技术参数 - + t - - + + mm @@ -617,8 +753,14 @@ - - + + s @@ -627,7 +769,7 @@ 检验信息 - + @@ -648,17 +790,17 @@ - - 合格 + + 合格 - - 不合格 + + 不合格 - - 复检合格 + + 复检合格 - - 复检不合格 + + 复检不合格 @@ -673,7 +815,7 @@ :autosize="{ minRows: 2, maxRows: 5 }" :disabled="edit" /> - (需备注扶墙架道数) + (需备注扶墙架道数) @@ -699,6 +841,19 @@ + + + + + + + @@ -735,7 +890,14 @@ - + @@ -743,7 +905,16 @@ - + @@ -762,6 +933,8 @@ import Sticky from '@/components/Sticky' import SignName from '@/views/common/SignName' import Utils from '@/utils/contact' import merge from 'webpack-merge' +import { getDepartmentTreeList } from '@/api/common.js' + export default { name: 'GlGynbYsjl', components: { SignName, Sticky }, @@ -784,6 +957,7 @@ export default { state: this.$route.query.state, jianyanrenyuan: '', departmentId: this.$store.getters.departmentId, + tree: [], isRepeat: false, edit: false, sybjSData: [], @@ -795,13 +969,15 @@ export default { cols: [ { name: 'jianyanxiang', // 参与计算的列名,必须和el-table-column prop=''值一致 - getValue(row) { // 该列用于比较的值的获取方法 + getValue(row) { + // 该列用于比较的值的获取方法 return row.jianyanxiang } }, { name: 'jianyanmu', // 参与计算的列名,必须和el-table-column prop=''值一致 - getValue(row) { // 该列用于比较的值的获取方法 + getValue(row) { + // 该列用于比较的值的获取方法 return row.jianyanmu } } @@ -822,9 +998,7 @@ export default { ] } }, - computed: { - - }, + computed: {}, watch: { // jlbh3: function(val) { // this.ysjl.jilubianhao = this.jlbh1 + this.jlbh2 + '-' + val @@ -848,11 +1022,21 @@ export default { this.getYsjl(this.$route.query.id) this.getJyxm(1) } + this.getDepartment() }, beforeDestroy() { window.removeEventListener('beforeunload', this.beforeunloadHandler, false) }, methods: { + getDepartment() { + getDepartmentTreeList().then((res) => { + console.log(res, 555) + this.tree = res + }) + }, + handleChange(v) { + this.ysjl.departmentId = v[1] + }, /** * 签名方法 * @param data @@ -894,7 +1078,7 @@ export default { aheadPart: aheadPart + '-', hinderPart: '' } - }).then(data => { + }).then((data) => { this.jlbh3 = data }) }, @@ -911,9 +1095,11 @@ export default { sbpzdm: this.$route.query.sbpzdm, sbpzmc: this.$route.query.sbpzmc } - }).then(data => { + }).then((data) => { this.ysjl = data.ysjl - this.param = (data.param !== null && data.param !== undefined) ? data.param : {} + this.departmentId = this.ysjl.departmentId + this.param = + data.param !== null && data.param !== undefined ? data.param : {} this.ysjl.jianyanjieshuriqi = this.formatter.dateFormat('YYYY-MM-dd') this.getXcjyrq() this.ysjl.jilubianhao = this.jilubianhao @@ -926,9 +1112,15 @@ export default { this.ysjl.anzhuangdidian = this.ysjl.shiyongdanweiDizhi this.$set(this.param, 'qita', '/') // 制造日期、投用日期、上次检验日期设置成正确的日期格式 - this.ysjl.zhizaoriqi = this.common.checkDateFormat(this.ysjl.zhizaoriqi) - this.ysjl.touyongriqi = this.common.checkDateFormat(this.ysjl.touyongriqi) - this.param.shangcijianyanriqi = this.common.checkDateFormat(this.param.shangcijianyanriqi) + this.ysjl.zhizaoriqi = this.common.checkDateFormat( + this.ysjl.zhizaoriqi + ) + this.ysjl.touyongriqi = this.common.checkDateFormat( + this.ysjl.touyongriqi + ) + this.param.shangcijianyanriqi = this.common.checkDateFormat( + this.param.shangcijianyanriqi + ) }) }, getYsjl(id) { @@ -938,13 +1130,23 @@ export default { params: { ysjlId: id } - }).then(data => { + }).then((data) => { this.ysjl = data - if (this.ysjl.jianyanrenyuan !== null && this.ysjl.jianyanrenyuan.length > 0) { - this.jianyanrenyuan = this.common.convertCnName(this.ysjl.jianyanrenyuan) + this.departmentId = this.ysjl.departmentId + if ( + this.ysjl.jianyanrenyuan !== null && + this.ysjl.jianyanrenyuan.length > 0 + ) { + this.jianyanrenyuan = this.common.convertCnName( + this.ysjl.jianyanrenyuan + ) } // 查询最大记录编号 - if (this.ysjl.jilubianhao === null || this.ysjl.jilubianhao === undefined || this.ysjl.jilubianhao === '') { + if ( + this.ysjl.jilubianhao === null || + this.ysjl.jilubianhao === undefined || + this.ysjl.jilubianhao === '' + ) { this.getMaxBh() } this.getParam(this.ysjl.id, this.ysjl.shebeizhongleidaima) @@ -959,7 +1161,7 @@ export default { ysjlId: ysjlId, sbzldm: sbzldm } - }).then(data => { + }).then((data) => { this.param = data }) }, @@ -988,7 +1190,10 @@ export default { saveYsjl: function(operation) { if (operation === 'add') { if (this.jlbh3.trim() === '') { - this.$message({ message: '请先确认记录编号是否完整!', type: 'warning' }) + this.$message({ + message: '请先确认记录编号是否完整!', + type: 'warning' + }) return false } } @@ -1020,7 +1225,10 @@ export default { this.ysjl.jilubianhao = this.jlbh1 + this.jlbh2 + '-' + this.jlbh3 method = 'post' } else if (operation === 'build') { - if (this.ysjl.jianyanrenyuan === null || this.ysjl.jianyanrenyuan === '') { + if ( + this.ysjl.jianyanrenyuan === null || + this.ysjl.jianyanrenyuan === '' + ) { this.$message({ type: 'error', message: '请先签名再生成报告!' @@ -1039,10 +1247,13 @@ export default { method = 'put' } if (this.isRepeat) { - this.$message({ message: '记录编号重复,请先修改记录编号再保存', type: 'error' }) + this.$message({ + message: '记录编号重复,请先修改记录编号再保存', + type: 'error' + }) return false } else { - this.$refs['ysjl'].validate(valid => { + this.$refs['ysjl'].validate((valid) => { if (valid) { const jyxm = tableData this.api({ @@ -1054,11 +1265,14 @@ export default { cyJyxm: {}, jdJyxm: jyxm } - }).then(data => { + }).then((data) => { Utils.$emit('task-list') Utils.$emit('ysjl-list') if (operation === 'add' && data !== '') { - this.$message({ message: '保存成功, 请前往待办记录中查看。', type: 'success' }) + this.$message({ + message: '保存成功, 请前往待办记录中查看。', + type: 'success' + }) this.ysjl.id = data this.param.ysjlId = data // 刷新路由网址 @@ -1070,7 +1284,9 @@ export default { this.$message({ message: '更新成功', type: 'success' }) // 替换路由中的参数 this.$router.push({ - query: merge(this.$route.query, { 'jianyanrenyuan': this.ysjl.jianyanrenyuan }) + query: merge(this.$route.query, { + jianyanrenyuan: this.ysjl.jianyanrenyuan + }) }) // this.$refs.bill.updateChargeBill() } else { @@ -1097,7 +1313,7 @@ export default { ysjlId: id, bianhao: bianhao } - }).then(data => { + }).then((data) => { if (data > 0) { this.isRepeat = true } else { @@ -1107,8 +1323,15 @@ export default { }, getXcjyrq() { const xcjyrq = new Date(this.ysjl.jianyanjieshuriqi) - xcjyrq.setFullYear(xcjyrq.getFullYear() + 2, xcjyrq.getMonth(), xcjyrq.getDate() - 1) - this.ysjl.xiacijianyanriqi = this.formatter.dateFormat('YYYY-MM-dd', xcjyrq) + xcjyrq.setFullYear( + xcjyrq.getFullYear() + 2, + xcjyrq.getMonth(), + xcjyrq.getDate() - 1 + ) + this.ysjl.xiacijianyanriqi = this.formatter.dateFormat( + 'YYYY-MM-dd', + xcjyrq + ) }, setYsjlData(data) { this.ysjl.sfdId = data diff --git a/src/views/ysjl/5000/dj/jdgy-cl/index.vue b/src/views/ysjl/5000/dj/jdgy-cl/index.vue index 76652d1..f462dae 100644 --- a/src/views/ysjl/5000/dj/jdgy-cl/index.vue +++ b/src/views/ysjl/5000/dj/jdgy-cl/index.vue @@ -52,7 +52,7 @@ - + @@ -311,6 +311,19 @@ + + + + + + + @@ -374,6 +387,7 @@ import Sticky from '@/components/Sticky' import SignName from '@/views/common/SignName' import Utils from '@/utils/contact' import merge from 'webpack-merge' +import { getDepartmentTreeList } from '@/api/common.js' export default { name: 'GlGynbYsjl', components: { SignName, Sticky }, @@ -393,6 +407,7 @@ export default { isRepeat: false, edit: false, sybjSData: [], + tree: [], tableData: [], checkedTab: 'first', ysjlId: this.$route.query.id, @@ -454,11 +469,18 @@ export default { this.getYsjl(this.$route.query.id) this.getJyxm(1) } + this.getDepartment() }, beforeDestroy() { window.removeEventListener('beforeunload', this.beforeunloadHandler, false) }, methods: { + getDepartment() { + getDepartmentTreeList().then(res => { + console.log(res, 555) + this.tree = res + }) + }, /** * 签名方法 * @param data @@ -531,12 +553,16 @@ export default { this.ysjl.xiacijianyanriqishuoming = '/' this.ysjl.anzhuangdidian = this.ysjl.shiyongdanweiDizhi this.$set(this.param, 'qita', '/') + this.departmentId = this.ysjl.departmentId // 制造日期、投用日期、上次检验日期设置成正确的日期格式 this.ysjl.zhizaoriqi = this.common.checkDateFormat(this.ysjl.zhizaoriqi) this.ysjl.touyongriqi = this.common.checkDateFormat(this.ysjl.touyongriqi) this.param.shangcijianyanriqi = this.common.checkDateFormat(this.param.shangcijianyanriqi) }) }, + handleChange(v) { + this.ysjl.departmentId = v[1] + }, getYsjl(id) { this.api({ url: '/ysjl', @@ -546,6 +572,7 @@ export default { } }).then(data => { this.ysjl = data + this.departmentId = this.ysjl.departmentId if (this.ysjl.jianyanrenyuan !== null && this.ysjl.jianyanrenyuan.length > 0) { this.jianyanrenyuan = this.common.convertCnName(this.ysjl.jianyanrenyuan) } diff --git a/src/views/ysjl/5000/dj/lygg-cl/index.vue b/src/views/ysjl/5000/dj/lygg-cl/index.vue index 8221fdd..7485e96 100644 --- a/src/views/ysjl/5000/dj/lygg-cl/index.vue +++ b/src/views/ysjl/5000/dj/lygg-cl/index.vue @@ -304,6 +304,19 @@ + + + + + + + @@ -367,6 +380,8 @@ import Sticky from '@/components/Sticky' import SignName from '@/views/common/SignName' import Utils from '@/utils/contact' import merge from 'webpack-merge' +import { getDepartmentTreeList } from '@/api/common.js' + export default { name: 'GlGynbYsjl', components: { SignName, Sticky }, @@ -388,6 +403,8 @@ export default { tableData: [], checkedTab: 'first', ysjlId: this.$route.query.id, + departmentId: '', + tree: [], // 表格合并相关 // 参与列合并的字段,在这里增加即可 cols: [ @@ -446,11 +463,18 @@ export default { this.getYsjl(this.$route.query.id) this.getJyxm(1) } + this.getDepartment() }, beforeDestroy() { window.removeEventListener('beforeunload', this.beforeunloadHandler, false) }, methods: { + getDepartment() { + getDepartmentTreeList().then(res => { + console.log(res, 555) + this.tree = res + }) + }, /** * 签名方法 * @param data @@ -518,6 +542,7 @@ export default { this.ysjl.baogaobianhao = null // 避免从设备中取值导致信息错误 this.ysjl.jigouhezhunzhenghao = process.env.VUE_APP_HZZBH this.ysjl.beizhu = '/' + this.departmentId = this.ysjl.departmentId this.ysjl.anzhuangdidian = this.ysjl.shiyongdanweiDizhi this.$set(this.param, 'qita', '/') // 制造日期、投用日期、上次检验日期设置成正确的日期格式 @@ -534,6 +559,7 @@ export default { } }).then(data => { this.ysjl = data + this.departmentId = this.ysjl.departmentId if (this.ysjl.jianyanrenyuan !== null && this.ysjl.jianyanrenyuan.length > 0) { this.jianyanrenyuan = this.common.convertCnName(this.ysjl.jianyanrenyuan) } @@ -544,6 +570,9 @@ export default { this.getParam(this.ysjl.id, this.ysjl.shebeizhongleidaima) }) }, + handleChange(v) { + this.ysjl.departmentId = v[1] + }, getParam() { const id = this.ysjlId || this.$route.query.templateId this.ysjlService.getParam(id, this.$route.query.sbzldm).then((data) => {