diff --git a/src/main.js b/src/main.js index 90906f1..8a1775c 100644 --- a/src/main.js +++ b/src/main.js @@ -25,7 +25,7 @@ import preview from './utils/preview' import server from './utils/server' import formatter from './utils/formatter' import numToChinese from './utils/numberToChinese' -import controller from './controller' +import service from './service' import permission from './directive/permission' import adaptive from './directive/el-table' import vueqr from 'vue-qr' @@ -68,8 +68,8 @@ Object.keys(validate).forEach(key => { Vue.prototype[key] = validate[key] }) -Object.keys(controller).forEach(key => { - Vue.prototype[key] = controller[key] +Object.keys(service).forEach(key => { + Vue.prototype[key] = service[key] }) new Vue({ diff --git a/src/controller/bjdController.js b/src/service/bjdService.js similarity index 100% rename from src/controller/bjdController.js rename to src/service/bjdService.js diff --git a/src/controller/index.js b/src/service/index.js similarity index 80% rename from src/controller/index.js rename to src/service/index.js index e4cbb01..7ddc8d3 100644 --- a/src/controller/index.js +++ b/src/service/index.js @@ -2,7 +2,7 @@ const modulesFiles = require.context('.', true, /\.js$/) // you do not need `import app from './modules/app'` // it will auto require all vuex module from modules file -const controller = modulesFiles.keys().reduce((modules, modulePath) => { +const service = modulesFiles.keys().reduce((modules, modulePath) => { // set './app.js' => 'app' const moduleName = modulePath.replace(/^\.\/(.*)\.\w+$/, '$1') const value = modulesFiles(modulePath) @@ -12,4 +12,4 @@ const controller = modulesFiles.keys().reduce((modules, modulePath) => { return modules }, {}) -export default controller +export default service diff --git a/src/controller/jyxmController.js b/src/service/jyxmService.js similarity index 100% rename from src/controller/jyxmController.js rename to src/service/jyxmService.js diff --git a/src/controller/renwuController.js b/src/service/renwuService.js similarity index 100% rename from src/controller/renwuController.js rename to src/service/renwuService.js diff --git a/src/controller/templateController.js b/src/service/templateService.js similarity index 100% rename from src/controller/templateController.js rename to src/service/templateService.js diff --git a/src/controller/ysjlController.js b/src/service/ysjlService.js similarity index 100% rename from src/controller/ysjlController.js rename to src/service/ysjlService.js diff --git a/src/views/bggl/banjie_list.vue b/src/views/bggl/banjie_list.vue index e06cce5..603c461 100644 --- a/src/views/bggl/banjie_list.vue +++ b/src/views/bggl/banjie_list.vue @@ -867,7 +867,7 @@ export default { }, resetRecord(ysjlId) { this.$message.success('弹窗并获取主报告以及所有的无损分项以供用户选择编辑,展示字段为:检验项目、检验人员。' + ysjlId) - this.ysjlController.getResetRecordsList(ysjlId).then(data => { + this.ysjlService.getResetRecordsList(ysjlId).then(data => { this.resetRecordList = data }) this.dialogResetRecords = true diff --git a/src/views/bggl/components/original_db_list.vue b/src/views/bggl/components/original_db_list.vue index d77e086..8b9a191 100644 --- a/src/views/bggl/components/original_db_list.vue +++ b/src/views/bggl/components/original_db_list.vue @@ -1429,7 +1429,7 @@ export default { this.dialogEnclosureVisible = true }, showSfInfo(row) { - this.ysjlController.getParam(row.id, '1000').then(data => { + this.ysjlService.getParam(row.id, '1000').then(data => { this.sfInfo = { zaojia: data.zaojia, bili: data.bili, diff --git a/src/views/bjd/dj_input.vue b/src/views/bjd/dj_input.vue index 887928d..bde7c53 100644 --- a/src/views/bjd/dj_input.vue +++ b/src/views/bjd/dj_input.vue @@ -2444,7 +2444,7 @@ export default { ] ] } - this.bjdController.beforeUpload( + this.bjdService.beforeUpload( this, file, importField, diff --git a/src/views/bjd/jj_input.vue b/src/views/bjd/jj_input.vue index 324a373..db8977d 100644 --- a/src/views/bjd/jj_input.vue +++ b/src/views/bjd/jj_input.vue @@ -1458,7 +1458,7 @@ export default { { label: '车辆牌号/车辆底盘号', value: 's29' }] ] } - this.bjdController.beforeUpload(this, file, importField, this.sbzldm, this.bjd.bjType) + this.bjdService.beforeUpload(this, file, importField, this.sbzldm, this.bjd.bjType) return false }, beforeHejia() { diff --git a/src/views/bjd/zj_input.vue b/src/views/bjd/zj_input.vue index 4027fe0..f92d81e 100644 --- a/src/views/bjd/zj_input.vue +++ b/src/views/bjd/zj_input.vue @@ -502,7 +502,7 @@ export default { { label: '比例(%)', value: 'ss2' }] ] } - this.bjdController.beforeUpload(this, item.file, importField, this.sbzldm, 'ZJ') + this.bjdService.beforeUpload(this, item.file, importField, this.sbzldm, 'ZJ') }, /** * 获得下载上传所需数据模板的设备类别 diff --git a/src/views/ysjl/2000/2100/fenxiang/ydjc.vue b/src/views/ysjl/2000/2100/fenxiang/ydjc.vue index 93b6498..96966d6 100644 --- a/src/views/ysjl/2000/2100/fenxiang/ydjc.vue +++ b/src/views/ysjl/2000/2100/fenxiang/ydjc.vue @@ -212,7 +212,7 @@ export default { }) }, getJyxm() { - this.jyxmController.getJyxm(this.ysjl.templateId, this.ysjl.id, 1, this.state).then(data => { + this.jyxmService.getJyxm(this.ysjl.templateId, this.ysjl.id, 1, this.state).then(data => { this.tableData = data || [] this.$refs.btn.getParentInfo(this.ysjl, this.param, null, this.tableData, this.state, this.$route.query.jyxm, true, false) }) diff --git a/src/views/ysjl/3000/common/index.vue b/src/views/ysjl/3000/common/index.vue index 5a7d67c..71c6a01 100644 --- a/src/views/ysjl/3000/common/index.vue +++ b/src/views/ysjl/3000/common/index.vue @@ -548,21 +548,21 @@
检验信息 - + - {{ ysjl.jianyanyiju }} + - + 号检验专用工具箱 - + @@ -785,7 +785,7 @@ export default { }, methods: { initYsjl() { - this.ysjlController.init(this.$route.query).then((data) => { + this.ysjlService.init(this.$route.query).then((data) => { this.ysjl = data.ysjl this.param = data.param ? data.param : {} this.ysjl.jianyanjieshuriqi = this.formatter.dateFormat('YYYY-MM-dd') @@ -810,7 +810,7 @@ export default { }) }, getJyxmInfoByYsjl() { - this.ysjlController.getJyxmInfoByYsjl(this.ysjlId).then((data) => { + this.ysjlService.getJyxmInfoByYsjl(this.ysjlId).then((data) => { if (!data.fbjyxm) { return } @@ -833,7 +833,7 @@ export default { }) }, getYsjl() { - this.ysjlController.getYsjl(this.ysjlId).then((data) => { + this.ysjlService.getYsjl(this.ysjlId).then((data) => { this.ysjl = data this.ysjl.imagePath = '' if ( @@ -844,7 +844,7 @@ export default { this.ysjl.jianyanrenyuan ) } - this.ysjlController + this.ysjlService .judgeRepeat(this.ysjl.jilubianhao, this.ysjl.id) .then((data) => { this.isRepeat = data @@ -853,7 +853,7 @@ export default { }, getParam() { const id = this.ysjlId || this.$route.query.templateId - this.ysjlController + this.ysjlService .getParam(id, this.$route.query.sbzldm) .then((data) => { this.param = data @@ -877,19 +877,19 @@ export default { }, getJyxm(sort) { if (this.$route.query.state === 'update') { - this.jyxmController.getJdCyJyxm(this.ysjlId, this.$route.query.templateId, sort).then((data) => { + this.jyxmService.getJdCyJyxm(this.ysjlId, this.$route.query.templateId, sort).then((data) => { this.bgfyData = data this.tableJs.getData(this.cols, this.rows, this.bgfyData) }) } else { - this.jyxmController.getCyJyxm(this.$route.query.templateId, sort).then((data) => { + this.jyxmService.getCyJyxm(this.$route.query.templateId, sort).then((data) => { this.bgfyData = data this.tableJs.getData(this.cols, this.rows, this.bgfyData) }) } }, getDicJyxm(sort) { - this.jyxmController + this.jyxmService .getCyJyxm(this.$route.query.templateId, sort) .then((data) => { this.dicGzjz = data.map((row) => { @@ -911,7 +911,7 @@ export default { } }).then((data) => { this.jlbh3 = data - this.ysjlController + this.ysjlService .judgeRepeat(this.ysjl.jilubianhao, this.ysjl.id) .then((data) => { this.isRepeat = data diff --git a/src/views/ysjl/8000/jj/edit2.vue b/src/views/ysjl/8000/jj/edit2.vue index 550fed7..df99d5c 100644 --- a/src/views/ysjl/8000/jj/edit2.vue +++ b/src/views/ysjl/8000/jj/edit2.vue @@ -471,7 +471,7 @@ export default { }, methods: { initYsjl() { - this.ysjlController.init(this.$route.query).then(data => { + this.ysjlService.init(this.$route.query).then(data => { this.ysjl = data.ysjl this.param = data.param ? data.param : {} this.ysjl.jianyanjielun = '符合要求' @@ -488,7 +488,7 @@ export default { }) }, getYsjl() { - this.ysjlController.getYsjl(this.$route.query.id).then(data => { + this.ysjlService.getYsjl(this.$route.query.id).then(data => { this.ysjl = data.ysjl if (this.ysjl.jianyanrenyuan) { this.jianyanrenyuan = this.common.convertCnName(this.ysjl.jianyanrenyuan) @@ -503,7 +503,7 @@ export default { }, getParam() { // 根据原始报告id查询参数 - this.ysjlController.getParam(this.$route.query.id, this.$route.query.sbzldm).then(data => { + this.ysjlService.getParam(this.$route.query.id, this.$route.query.sbzldm).then(data => { this.param = data }) }, @@ -531,7 +531,7 @@ export default { }, // 查询检验项目 getJyxm(sort) { - this.jyxmController.getJyxm(this.$route.query.templateId, this.$route.query.id, sort, this.state, false).then(data => { + this.jyxmService.getJyxm(this.$route.query.templateId, this.$route.query.id, sort, this.state, false).then(data => { switch (sort) { case 1: this.jdjyxmData = data @@ -745,7 +745,7 @@ export default { this.similarVisible = false }, judgeRepeat(bianhao, id) { - this.ysjlController.judgeRepeat(id, bianhao).then(data => { + this.ysjlService.judgeRepeat(id, bianhao).then(data => { this.isRepeat = data }) },