From 29e342a78c296cc70b99123aa21d23dd971c6706 Mon Sep 17 00:00:00 2001 From: xiaobai <857694115@qq.com> Date: Thu, 26 Aug 2021 18:27:33 +0800 Subject: [PATCH 1/3] . --- src/views/ysjl/5000/dj/lygg-cl/index.vue | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/views/ysjl/5000/dj/lygg-cl/index.vue b/src/views/ysjl/5000/dj/lygg-cl/index.vue index ca24aad..a5b5f17 100644 --- a/src/views/ysjl/5000/dj/lygg-cl/index.vue +++ b/src/views/ysjl/5000/dj/lygg-cl/index.vue @@ -461,8 +461,7 @@ export default { // 查询最大记录编号 this.getMaxBh() } else { - this.getYsjl(this.$route.query.id) - + this.getYsjl(this.$route.query.id) } this.getDepartment() }, @@ -536,7 +535,7 @@ export default { } }).then(data => { this.ysjl = data.ysjl - this.getJyxm(1) + this.getJyxm(1) this.param = (data.param !== null && data.param !== undefined) ? data.param : {} this.ysjl.jianyanjieshuriqi = this.formatter.dateFormat('YYYY-MM-dd') this.getXcjyrq() @@ -561,7 +560,7 @@ export default { } }).then(data => { this.ysjl = data - this.getJyxm(1) + this.getJyxm(1) this.departmentId = this.ysjl.departmentId if (this.ysjl.jianyanrenyuan !== null && this.ysjl.jianyanrenyuan.length > 0) { this.jianyanrenyuan = this.common.convertCnName(this.ysjl.jianyanrenyuan) From 59e79288692eb2b973f5daa2c73acd953b32bda6 Mon Sep 17 00:00:00 2001 From: xiaobai <857694115@qq.com> Date: Fri, 27 Aug 2021 09:25:41 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E5=85=B6=E4=BB=96?= =?UTF-8?q?=E5=8E=9F=E5=A7=8B=E8=AE=B0=E5=BD=95=E6=A3=80=E9=AA=8C=E7=BB=93?= =?UTF-8?q?=E6=9E=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/ysjl/3000/common/index.vue | 2 +- src/views/ysjl/4000/dj/common/index.vue | 28 ++++++++++++++++------- src/views/ysjl/4000/jj/common/index.vue | 30 +++++++++++++++++-------- 3 files changed, 42 insertions(+), 18 deletions(-) diff --git a/src/views/ysjl/3000/common/index.vue b/src/views/ysjl/3000/common/index.vue index d83d727..484faed 100644 --- a/src/views/ysjl/3000/common/index.vue +++ b/src/views/ysjl/3000/common/index.vue @@ -1221,7 +1221,7 @@ export default { }) }) if (operation === 'add') { - this.ysjl.jilubianhao = this.jlbh1 + this.jlbh4 + this.jlbh2 + '-' + this.jlbh3 + this.ysjl.jilubianhao = this.jlbh1 + this.jlbh4 + this.jlbh2 + '-' + this.jlbh3 this.save(operation, 'post', tableData, fubiao) } else if (operation === 'build') { this.ysjl.baogaobianhao = this.ysjl.jilubianhao diff --git a/src/views/ysjl/4000/dj/common/index.vue b/src/views/ysjl/4000/dj/common/index.vue index a3f3208..8335847 100644 --- a/src/views/ysjl/4000/dj/common/index.vue +++ b/src/views/ysjl/4000/dj/common/index.vue @@ -926,12 +926,10 @@ export default { created() { if (this.state === 'create') { this.initYsjl() - this.getJyxm(1) // 查询最大记录编号 this.getMaxBh() } else { this.getYsjl(this.$route.query.id) - this.getJyxm(1) } this.getDepartment() }, @@ -1008,6 +1006,7 @@ export default { } }).then((data) => { this.ysjl = data.ysjl + this.getJyxm(1) this.departmentId = this.ysjl.departmentId this.param = data.param !== null && data.param !== undefined ? data.param : {} @@ -1036,6 +1035,7 @@ export default { } }).then((data) => { this.ysjl = data + this.getJyxm(1) this.departmentId = this.ysjl.departmentId if ( this.ysjl.jianyanrenyuan !== null && @@ -1072,10 +1072,15 @@ export default { getJyxm(sort) { if (this.$route.query.state === 'update') { this.jyxmService - .getJdCyJyxm(this.ysjlId, this.$route.query.templateId, sort) + .getJdCyJyxm(this.ysjlId, this.$route.query.templateId, sort, 0) .then((data) => { - this.sybjSData = data - this.tableJs.getData(this.cols, undefined, this.sybjSData) + this.bgfyData = data + this.tableJs.getData(this.cols, this.rows, this.bgfyData) + }) + this.jyxmService + .getJdCyJyxm(this.ysjlId, this.ysjl.jybgTemplateId, sort, 1) + .then((data) => { + this.jybgData = data }) } else { this.jyxmService @@ -1084,9 +1089,16 @@ export default { data.forEach((row) => { row.dicJyxmId = row.id }) - - this.sybjSData = data - this.tableJs.getData(this.cols, undefined, this.sybjSData) + this.bgfyData = data + this.tableJs.getData(this.cols, this.rows, this.bgfyData) + }) + this.jyxmService + .getCyJyxm(this.ysjl.jybgTemplateId, sort) + .then((data) => { + data.forEach((row) => { + row.dicJyxmId = row.id + }) + this.jybgData = data }) } }, diff --git a/src/views/ysjl/4000/jj/common/index.vue b/src/views/ysjl/4000/jj/common/index.vue index ecdb890..868280f 100644 --- a/src/views/ysjl/4000/jj/common/index.vue +++ b/src/views/ysjl/4000/jj/common/index.vue @@ -1011,12 +1011,10 @@ export default { created() { if (this.state === 'create') { this.initYsjl() - this.getJyxm(1) // 查询最大记录编号 this.getMaxBh() } else { this.getYsjl(this.$route.query.id) - this.getJyxm(1) } this.getDepartment() }, @@ -1094,6 +1092,7 @@ export default { }).then((data) => { this.ysjl = data.ysjl this.departmentId = this.ysjl.departmentId + this.getJyxm(1) this.param = data.param !== null && data.param !== undefined ? data.param : {} this.ysjl.jianyanjieshuriqi = this.formatter.dateFormat('YYYY-MM-dd') @@ -1116,7 +1115,7 @@ export default { ) this.param.shangcijianyanriqi = this.common.checkDateFormat( this.param.shangcijianyanriqi - ) + ) }) }, getYsjl(id) { @@ -1129,6 +1128,7 @@ export default { }).then((data) => { this.ysjl = data this.departmentId = this.ysjl.departmentId + this.getJyxm(1) if ( this.ysjl.jianyanrenyuan !== null && this.ysjl.jianyanrenyuan.length > 0 @@ -1165,10 +1165,15 @@ export default { getJyxm(sort) { if (this.$route.query.state === 'update') { this.jyxmService - .getJdCyJyxm(this.ysjlId, this.$route.query.templateId, sort) + .getJdCyJyxm(this.ysjlId, this.$route.query.templateId, sort, 0) + .then((data) => { + this.bgfyData = data + this.tableJs.getData(this.cols, this.rows, this.bgfyData) + }) + this.jyxmService + .getJdCyJyxm(this.ysjlId, this.ysjl.jybgTemplateId, sort, 1) .then((data) => { - this.sybjSData = data - this.tableJs.getData(this.cols, undefined, this.sybjSData) + this.jybgData = data }) } else { this.jyxmService @@ -1177,9 +1182,16 @@ export default { data.forEach((row) => { row.dicJyxmId = row.id }) - - this.sybjSData = data - this.tableJs.getData(this.cols, undefined, this.sybjSData) + this.bgfyData = data + this.tableJs.getData(this.cols, this.rows, this.bgfyData) + }) + this.jyxmService + .getCyJyxm(this.ysjl.jybgTemplateId, sort) + .then((data) => { + data.forEach((row) => { + row.dicJyxmId = row.id + }) + this.jybgData = data }) } }, From dd15a86b4e5e60935e4e2d6a0bbacecc55b21b2e Mon Sep 17 00:00:00 2001 From: xiaobai <857694115@qq.com> Date: Fri, 27 Aug 2021 17:49:12 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BD=93=E7=B3=BB?= =?UTF-8?q?=E6=96=87=E4=BB=B6=E9=A2=84=E8=A7=88=E8=B7=9F=E4=B8=8B=E8=BD=BD?= =?UTF-8?q?=E6=96=87=E4=BB=B6=E5=90=8D=E7=A7=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/utils/common.js | 192 +++++++++++++++--------------- src/views/dic/category.vue | 40 +++---- src/views/document/index.vue | 210 +++++++++++++++++++-------------- src/views/preview/document.vue | 11 ++ 4 files changed, 250 insertions(+), 203 deletions(-) create mode 100644 src/views/preview/document.vue diff --git a/src/utils/common.js b/src/utils/common.js index f01b0a2..7106a25 100644 --- a/src/utils/common.js +++ b/src/utils/common.js @@ -30,10 +30,10 @@ export default { }) }, /** - * 预览原始资料 - * 如果给的是路径就直接预览,如果给的是任务ID,就先查询路径再预览 - * @param id 任务ID - */ + * 预览原始资料 + * 如果给的是路径就直接预览,如果给的是任务ID,就先查询路径再预览 + * @param id 任务ID + */ viewRawRecords(id) { preview({ url: '/download/pullRawRecordsPath', @@ -53,9 +53,9 @@ export default { }) }, /** - * 预览相关鉴证文件 - * @param id 文件主键 - */ + * 预览相关鉴证文件 + * @param id 文件主键 + */ viewProve(id) { preview.defaults.withCredentials = true preview({ @@ -73,10 +73,10 @@ export default { }) }, /** - * 预览驳回附件 - * @param id 驳回记录主键 - * @param fileName 驳回附件名称 - */ + * 预览驳回附件 + * @param id 驳回记录主键 + * @param fileName 驳回附件名称 + */ viewReject(id, fileName) { if (id && fileName && fileName !== '') { const suffixName = fileName.substring(fileName.indexOf('.')) @@ -151,11 +151,12 @@ export default { console.info('重新生成成功') }) }, + /** - * 检验员签名方法 - * @param {*} id : 原始记录/报告主键 - * @param {*} jyry :检验人员 - */ + * 检验员签名方法 + * @param {*} id : 原始记录/报告主键 + * @param {*} jyry :检验人员 + */ signName(id, jyry) { if (!id) { return @@ -189,15 +190,15 @@ export default { return chineseName }, /** - * 删除检验方案 - * @param jyxm 检验项目简写。例如:bhcd - * @param jianyanxiangmu 检验项目。例如:壁厚测定 - * @param bglx 报告类型。例如:[2, 3] - * @param ysjlId 无损或分项的原始记录Id - * @param mainYsjlId 主原始记录Id - * @param sblbdm 设备类别代码。例如:2100 - * @param nblb 内部类别。例如:DQ - */ + * 删除检验方案 + * @param jyxm 检验项目简写。例如:bhcd + * @param jianyanxiangmu 检验项目。例如:壁厚测定 + * @param bglx 报告类型。例如:[2, 3] + * @param ysjlId 无损或分项的原始记录Id + * @param mainYsjlId 主原始记录Id + * @param sblbdm 设备类别代码。例如:2100 + * @param nblb 内部类别。例如:DQ + */ delJyfa(jyxm, jianyanxiangmu, bglx, ysjlId, mainYsjlId, sblbdm, nblb) { api({ url: '/ysjl/delJyfa', @@ -216,13 +217,12 @@ export default { message: '删除成功', type: 'success' }) - }).catch(e => { - }) + }).catch(e => {}) }, /** - * 下载导入模板 - * @param templateName 例如:模板名字.xlsx - */ + * 下载导入模板 + * @param templateName 例如:模板名字.xlsx + */ downloadTemplate(templateName) { if (!templateName) { Vue.prototype.$message({ @@ -242,12 +242,12 @@ export default { }) }, /** - * 上传数据 - * @param file 上传的文件信息 - * @param tableData 上传前的数据 - * @returns {boolean} - * @constructor - */ + * 上传数据 + * @param file 上传的文件信息 + * @param tableData 上传前的数据 + * @returns {boolean} + * @constructor + */ uploadTableData(file, tableData) { const isExcel = file.type === 'application/vnd.ms-excel' || file.type === 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' const isExcel2 = file.name.endsWith('.xls') || file.name.endsWith('.xlsx') @@ -280,10 +280,10 @@ export default { }) }, /** - * 深拷贝 - * @param o - * @returns {Array|*} - */ + * 深拷贝 + * @param o + * @returns {Array|*} + */ deepCopy(o) { if (o instanceof Array) { var n = [] @@ -302,9 +302,9 @@ export default { } }, /** - * 根据报告ID查看驳回原因 - * @param ysjlId - */ + * 根据报告ID查看驳回原因 + * @param ysjlId + */ viewRejection(ysjlId) { api({ url: '/taskinfo/viewRejection', @@ -323,9 +323,9 @@ export default { }) }, /** - * 下载无损分项附件 - * @param renwuId - */ + * 下载无损分项附件 + * @param renwuId + */ downloadWsFxFile(renwuId) { preview({ url: '/download/pullWsFxFilePath', @@ -340,8 +340,8 @@ export default { }) }, /** - * 判断日期格式是否为yyyy-MM-dd - * */ + * 判断日期格式是否为yyyy-MM-dd + * */ checkDateFormat(checkDate) { if (checkDate !== null) { checkDate = checkDate.replace(/\s+/g, '').replace('00:00:00', '').replace('年', '-').replace('月', '-').replace('日', '') @@ -353,8 +353,8 @@ export default { return checkDate }, /** - * 删除当前路由 - */ + * 删除当前路由 + */ delCurrentViews() { store.dispatch('delCurrentViews', { view: router.history.current, @@ -362,11 +362,11 @@ export default { }) }, /** - * 构建编辑原始记录页面路由参数 - * @param ysjl - * @param obj 需要将特殊参数补充到路由的参数里面 - * @returns {{modelId: null, departmentId: *, renwuId: null, sbzldm, sbpzdm, jyxm: null, jylb: *, sblbdm, id: null, state: null, neibuleibie, jianyanrenyuan: null}} - */ + * 构建编辑原始记录页面路由参数 + * @param ysjl + * @param obj 需要将特殊参数补充到路由的参数里面 + * @returns {{modelId: null, departmentId: *, renwuId: null, sbzldm, sbpzdm, jyxm: null, jylb: *, sblbdm, id: null, state: null, neibuleibie, jianyanrenyuan: null}} + */ buildEditYsjlRouterParam(ysjl, obj) { const routerParam = { id: ysjl.id, @@ -390,29 +390,29 @@ export default { return routerParam }, /** - * 重新加载页面到更新报检单页面 - * @param bjd - */ + * 重新加载页面到更新报检单页面 + * @param bjd + */ reloadViewToUpdateBjd(bjd) { this.delCurrentViews() router.push({ path: '/bjd/bjd-' + bjd.jianyanleibie.toLowerCase() + '-input/' + bjd.id + '/' + bjd.shebeizhongleidaima + '/update' }) }, /** - * 重新加载页面到更新原始记录页面 - * @param ysjl - * @param obj 需要将特殊参数补充到路由的参数里面 - */ + * 重新加载页面到更新原始记录页面 + * @param ysjl + * @param obj 需要将特殊参数补充到路由的参数里面 + */ reloadViewToUpdateYsjl(ysjl, obj) { const path = router.history.current.path.replace('/null', '/' + ysjl.id) this.delCurrentViews() router.push({ path: path, query: this.buildEditYsjlRouterParam(ysjl, obj) }) }, /** - * 记录、报告编号判重 - * @param bianhao - * @param id - * @returns {Promise} - */ + * 记录、报告编号判重 + * @param bianhao + * @param id + * @returns {Promise} + */ judgeRepeat(bianhao, id) { return new Promise(resolve => { api({ @@ -443,11 +443,11 @@ export default { }) }, /** - * 根据原始记录id查询参数 - * @param ysjlId - * @param sbzldm - * @returns {AxiosPromise} - */ + * 根据原始记录id查询参数 + * @param ysjlId + * @param sbzldm + * @returns {AxiosPromise} + */ getParam(ysjlId, sbzldm) { return api({ url: '/ysjl/getParamByYsjlId', @@ -459,12 +459,12 @@ export default { }) }, /** - * 获取检验项目 - * @param modelId 模板主键(起草时使用) - * @param ysjlId 原始记录主键(更新时使用) - * @param sort 序号 - * @returns {AxiosPromise} - */ + * 获取检验项目 + * @param modelId 模板主键(起草时使用) + * @param ysjlId 原始记录主键(更新时使用) + * @param sort 序号 + * @returns {AxiosPromise} + */ getJyxm(modelId, ysjlId, sort, state) { let url = '' let data = {} @@ -489,22 +489,22 @@ export default { }) }, /** - * 精确乘法 - * @param arg1 乘数 - * @param arg2 被乘数 - * @param decimalPlaces 保留的小数位数 - * @returns {number} - */ + * 精确乘法 + * @param arg1 乘数 + * @param arg2 被乘数 + * @param decimalPlaces 保留的小数位数 + * @returns {number} + */ accMul(arg1, arg2, decimalPlaces = 2) { const percentage = Math.pow(10, decimalPlaces) return Math.round(arg1 * arg2 * percentage) / percentage }, /** - * 精确加法 - * @param arg1 - * @param arg2 - * @returns {number} - */ + * 精确加法 + * @param arg1 + * @param arg2 + * @returns {number} + */ accAdd(arg1, arg2) { let r1, r2, m, c try { @@ -537,10 +537,10 @@ export default { return (arg1 + arg2) / m }, /** - * 删除数组中指定元素 - * @param arr 数据 - * @param val 元素 - */ + * 删除数组中指定元素 + * @param arr 数据 + * @param val 元素 + */ deleteElement(arr, val) { for (var i = 0; i < arr.length; i++) { if (arr[i] === val) { @@ -551,10 +551,10 @@ export default { return arr }, /** - * 修复由于Vue的$on可能会多次绑定,导致多次调用$on的回调方法 - * @param event - * @param callback - */ + * 修复由于Vue的$on可能会多次绑定,导致多次调用$on的回调方法 + * @param event + * @param callback + */ $on(event, callback) { Utils.$off(event) Utils.$on(event, callback) diff --git a/src/views/dic/category.vue b/src/views/dic/category.vue index e43a332..c2b702b 100644 --- a/src/views/dic/category.vue +++ b/src/views/dic/category.vue @@ -106,15 +106,15 @@
字典详情
- - 删除 - + + 删除 + item.id) + url: '/category/delete', + method: 'delete', + params: { + integers: this.detailSeletArr.map(item => item.id) }, paramsSerializer: function(params) { return qs.stringify(params, { indices: false }) } - }).then(res=>{ - this.$message({ message: '成功删除', type: 'success' }) + }).then(res => { + this.$message({ message: '成功删除', type: 'success' }) }) }, formatSpecies(row, column, cellValue) { diff --git a/src/views/document/index.vue b/src/views/document/index.vue index e661f93..0672e87 100644 --- a/src/views/document/index.vue +++ b/src/views/document/index.vue @@ -34,16 +34,9 @@ :columns="columns" :crud="crud" > - +