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 @@