From 39a3ded06bad36057f2c76865171f9c05a33c64f Mon Sep 17 00:00:00 2001 From: liujun Date: Mon, 4 Nov 2024 15:25:07 +0800 Subject: [PATCH] =?UTF-8?q?=E5=85=AB=E9=A1=B9=E4=BD=9C=E4=B8=9A=E6=89=93?= =?UTF-8?q?=E5=9B=9E=E5=90=8E=E6=97=A0=E6=B3=95=E7=BC=96=E8=BE=91=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/other-select/index.vue | 12 ++---------- main.js | 6 +++++- pages/eight_assignments/blind_board/apply.vue | 9 ++++++--- pages/eight_assignments/break_ground/apply.vue | 9 ++++++--- pages/eight_assignments/confined_space/apply.vue | 5 ++++- pages/eight_assignments/cut_road/apply.vue | 5 ++++- pages/eight_assignments/electricity/apply.vue | 5 ++++- pages/eight_assignments/high_work/apply.vue | 5 ++++- pages/eight_assignments/hoisting/apply.vue | 5 ++++- utils/submitHomeworkProcess.js | 5 +++-- utils/tools.js | 4 ++++ 11 files changed, 46 insertions(+), 24 deletions(-) diff --git a/components/other-select/index.vue b/components/other-select/index.vue index c71159f..26266c0 100644 --- a/components/other-select/index.vue +++ b/components/other-select/index.vue @@ -4,8 +4,8 @@ + :label="type === 'assignments' ? item.ID : item.NAME" + :name="type === 'assignments' ? item.ID : item.NAME"> @@ -86,14 +86,6 @@ this.$emit('update:visible', false) }, determine() { - // const value = [] - // for (let i = 0; i < this.selectValue.length; i++) { - // if (this.value.indexOf(this.selectValue[i]) === -1) { - // value.push(this.selectValue[i]) - // } - // } - // this.value && value.unshift(this.value) - // const emitValue = value.join(',') const emitValue = this.selectValue.join(',') this.$emit('input', emitValue) this.close() diff --git a/main.js b/main.js index 30bcb2b..50dcacf 100644 --- a/main.js +++ b/main.js @@ -10,6 +10,7 @@ import uniThead from '@/components/uni-table/uni-thead/uni-thead.vue' import uniTr from '@/components/uni-table/uni-tr/uni-tr.vue' import uniTh from '@/components/uni-table/uni-th/uni-th.vue' import uniTd from '@/components/uni-table/uni-td/uni-td.vue' +import {filePath} from '@/utils/tools.js' Vue.component('empty',empty) Vue.component('uni-table',uniTable) @@ -21,7 +22,10 @@ Vue.component('uni-td',uniTd) Vue.use(uView) Vue.config.productionTip = false // Vue.prototype.$filePath = 'https://qgqy.qhdsafety.com/file/' -Vue.prototype.$filePath = 'https://wwag.qhdsafety.com/file/' +// Vue.prototype.$filePath = 'https://wwag.qhdsafety.com/file/' +Vue.prototype.$filePath = filePath + + App.mpType = 'app' const app = new Vue({ diff --git a/pages/eight_assignments/blind_board/apply.vue b/pages/eight_assignments/blind_board/apply.vue index c0f7289..77d7840 100644 --- a/pages/eight_assignments/blind_board/apply.vue +++ b/pages/eight_assignments/blind_board/apply.vue @@ -175,8 +175,8 @@ export default { BOARD_INSTALL_TIME: '', WORK_END_DATE: '', WORK_USER: '', - WORK_LONGITUDE: '', - WORK_LATITUDE: '', + WORK_LONGITUDE: '1', + WORK_LATITUDE: '2', MEDIUM: '', TEMPERATURE: '', PRESSURE: '', @@ -247,6 +247,7 @@ export default { otherAssignmentsShow: false, otherIdentificationShow: false, signVisible: false, + taskId: '' } }, async onLoad(options) { @@ -256,6 +257,7 @@ export default { this.fnAddBoardList() if (options.taskId) { this.form = await getData(options.taskId) + this.taskId = options.taskId } }, methods: { @@ -352,7 +354,8 @@ export default { form: this.form, formItems: this.formItems, TYPE: this.type, - CORP_ID: this.form.CORP_ID + CORP_ID: this.form.CORP_ID, + EW_RU_TASK_ID: this.taskId }) } catch { } diff --git a/pages/eight_assignments/break_ground/apply.vue b/pages/eight_assignments/break_ground/apply.vue index 92605a2..a527134 100644 --- a/pages/eight_assignments/break_ground/apply.vue +++ b/pages/eight_assignments/break_ground/apply.vue @@ -128,8 +128,8 @@ export default { CORP_NAME: '', WORK_START_DATE: '', WORK_END_DATE: '', - WORK_LONGITUDE: '', - WORK_LATITUDE: '', + WORK_LONGITUDE: '1', + WORK_LATITUDE: '2', WORK_PLACE: '', JOB_CONTENT: '', WORK_CONTENT: '', @@ -184,6 +184,7 @@ export default { otherAssignmentsShow: false, otherIdentificationShow: false, signVisible: false, + taskId: '' } }, async onLoad(options) { @@ -192,6 +193,7 @@ export default { this.type = options.type if (options.taskId) { this.form = await getData(options.taskId) + this.taskId = options.taskId } }, methods: { @@ -243,7 +245,8 @@ export default { form: this.form, formItems: this.formItems, TYPE: this.type, - CORP_ID: this.form.CORP_ID + CORP_ID: this.form.CORP_ID, + EW_RU_TASK_ID: this.taskId }) } catch { } diff --git a/pages/eight_assignments/confined_space/apply.vue b/pages/eight_assignments/confined_space/apply.vue index 21ea258..63c981b 100644 --- a/pages/eight_assignments/confined_space/apply.vue +++ b/pages/eight_assignments/confined_space/apply.vue @@ -171,6 +171,7 @@ export default { }, otherAssignmentsShow: false, otherIdentificationShow: false, + taskId: '' } }, async onLoad(options) { @@ -179,6 +180,7 @@ export default { this.type = options.type if (options.taskId) { this.form = await getData(options.taskId) + this.taskId = options.taskId } }, methods: { @@ -232,7 +234,8 @@ export default { form: this.form, formItems: this.formItems, TYPE: this.type, - CORP_ID: this.form.CORP_ID + CORP_ID: this.form.CORP_ID, + EW_RU_TASK_ID: this.taskId }) } catch { } diff --git a/pages/eight_assignments/cut_road/apply.vue b/pages/eight_assignments/cut_road/apply.vue index 1abff0a..eea0c55 100644 --- a/pages/eight_assignments/cut_road/apply.vue +++ b/pages/eight_assignments/cut_road/apply.vue @@ -184,6 +184,7 @@ export default { otherAssignmentsShow: false, otherIdentificationShow: false, signVisible: false, + taskId: '' } }, async onLoad(options) { @@ -192,6 +193,7 @@ export default { this.type = options.type if (options.taskId) { this.form = await getData(options.taskId) + this.taskId = options.taskId } }, methods: { @@ -243,7 +245,8 @@ export default { form: this.form, formItems: this.formItems, TYPE: this.type, - CORP_ID: this.form.CORP_ID + CORP_ID: this.form.CORP_ID, + EW_RU_TASK_ID: this.taskId }) } catch { } diff --git a/pages/eight_assignments/electricity/apply.vue b/pages/eight_assignments/electricity/apply.vue index f049526..81ff5e7 100644 --- a/pages/eight_assignments/electricity/apply.vue +++ b/pages/eight_assignments/electricity/apply.vue @@ -208,6 +208,7 @@ export default { }, otherAssignmentsShow: false, otherIdentificationShow: false, + taskId: '' } }, async onLoad(options) { @@ -216,6 +217,7 @@ export default { this.type = options.type if (options.taskId) { this.form = await getData(options.taskId) + this.taskId = options.taskId } }, methods: { @@ -257,7 +259,8 @@ export default { form: this.form, formItems: this.formItems, TYPE: this.type, - CORP_ID: this.form.CORP_ID + CORP_ID: this.form.CORP_ID, + EW_RU_TASK_ID: this.taskId }) } catch { } diff --git a/pages/eight_assignments/high_work/apply.vue b/pages/eight_assignments/high_work/apply.vue index c1484e5..c8d4040 100644 --- a/pages/eight_assignments/high_work/apply.vue +++ b/pages/eight_assignments/high_work/apply.vue @@ -168,6 +168,7 @@ export default { }, otherAssignmentsShow: false, otherIdentificationShow: false, + taskId: '' } }, async onLoad(options) { @@ -176,6 +177,7 @@ export default { this.type = options.type if (options.taskId) { this.form = await getData(options.taskId) + this.taskId = options.taskId } }, methods: { @@ -232,7 +234,8 @@ export default { form: this.form, formItems: this.formItems, TYPE: this.type, - CORP_ID: this.form.CORP_ID + CORP_ID: this.form.CORP_ID, + EW_RU_TASK_ID: this.taskId }) } catch { } diff --git a/pages/eight_assignments/hoisting/apply.vue b/pages/eight_assignments/hoisting/apply.vue index b0339db..33cbb14 100644 --- a/pages/eight_assignments/hoisting/apply.vue +++ b/pages/eight_assignments/hoisting/apply.vue @@ -186,6 +186,7 @@ export default { }, otherAssignmentsShow: false, otherIdentificationShow: false, + taskId: '' } }, async onLoad(options) { @@ -194,6 +195,7 @@ export default { this.type = options.type if (options.taskId) { this.form = await getData(options.taskId) + this.taskId = options.taskId } }, methods: { @@ -251,7 +253,8 @@ export default { form: this.form, formItems: this.formItems, TYPE: this.type, - CORP_ID: this.form.CORP_ID + CORP_ID: this.form.CORP_ID, + EW_RU_TASK_ID: this.taskId }) } catch { } diff --git a/utils/submitHomeworkProcess.js b/utils/submitHomeworkProcess.js index 619538b..f0d247c 100644 --- a/utils/submitHomeworkProcess.js +++ b/utils/submitHomeworkProcess.js @@ -6,6 +6,7 @@ import { setTaskSave } from "@/api"; import {addFormInfo} from "../api"; +import {filePath} from '@/utils/tools.js' // 处理表单数据 // TYPE 0 纯文本 1 图片 2 视频 3 divider标签 4 动态添加 5 签字 @@ -267,7 +268,7 @@ export const getData = async (taskId) => { } if (item.TYPE === 1) { form[item.ITEM_NAME] = item.list.map((item) => ({ - url: this.$filePath + item.ITEM_VALUE, + url: filePath + item.ITEM_VALUE, })); } if (item.TYPE === 4) { @@ -281,7 +282,7 @@ export const getData = async (taskId) => { } } if (item.TYPE === 5) { - form[item.ITEM_NAME] = this.$filePath + item.ITEM_VALUE; + form[item.ITEM_NAME] = filePath + item.ITEM_VALUE; } }); return form; diff --git a/utils/tools.js b/utils/tools.js index 9a801e8..ca73414 100644 --- a/utils/tools.js +++ b/utils/tools.js @@ -22,6 +22,10 @@ export function formatDate(date, fmt) { } } +export const filePath = 'http://192.168.192.201:8991/file/' +//export const filePath = 'https://qgqy.qhdsafety.com/file/' +//export const filePath = 'https://wwag.qhdsafety.com/file/' + function padLeftZero(str) { return ('00' + str).substr(str.length) }