八项作业
parent
3afca1fdf1
commit
04415183d4
|
@ -119,10 +119,9 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { getTaskInfo } from "@/api";
|
|
||||||
import OtherSelect from '@/components/other-select/index.vue';
|
import OtherSelect from '@/components/other-select/index.vue';
|
||||||
import Sign from '@/components/sign/sign.vue'
|
import Sign from '@/components/sign/sign.vue'
|
||||||
import { setSubmitForm } from "@/utils/submitHomeworkProcess";
|
import {getData, setSubmitForm} from "@/utils/submitHomeworkProcess";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
|
@ -248,52 +247,22 @@ export default {
|
||||||
otherAssignmentsShow: false,
|
otherAssignmentsShow: false,
|
||||||
otherIdentificationShow: false,
|
otherIdentificationShow: false,
|
||||||
signVisible: false,
|
signVisible: false,
|
||||||
/** 存储作业类别选中态 */
|
|
||||||
jobTypeNameArr: [],
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad(options) {
|
async onLoad(options) {
|
||||||
this.form.CORP_ID = options.CORPINFO_ID
|
this.form.CORP_ID = options.CORPINFO_ID
|
||||||
this.form.CORP_NAME = options.CORP_NAME
|
this.form.CORP_NAME = options.CORP_NAME
|
||||||
this.type = options.type
|
this.type = options.type
|
||||||
this.fnAddBoardList()
|
this.fnAddBoardList()
|
||||||
if (options.taskId) {
|
if (options.taskId) {
|
||||||
this.fnGetData(options.taskId)
|
this.form = await getData(options.taskId)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
async fnGetData(taskId) {
|
|
||||||
let resData = await getTaskInfo({ EW_RU_TASK_ID: taskId })
|
|
||||||
if (resData.list.form && resData.list.form.length > 0) {
|
|
||||||
let newFormData = { ...this.form };
|
|
||||||
|
|
||||||
resData.list.form.forEach((sos, index) => {
|
|
||||||
newFormData[sos.ITEM_NAME] = sos.ITEM_VALUE;
|
|
||||||
if (sos.FK_NAME) {
|
|
||||||
newFormData[sos.FK_NAME] = sos.FK_VALUE;
|
|
||||||
if (sos.FK_NAME === "WORK_TYPE") {
|
|
||||||
this.jobTypeNameArr = [Number(sos.FK_VALUE)];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// 回显盲板稠度位置图的图片
|
|
||||||
if (sos.ITEM_NAME === "BOARD_PATH") {
|
|
||||||
newFormData.BOARD_PATH = [{ url: `${this.$filePath}${sos.ITEM_VALUE}` }]
|
|
||||||
}
|
|
||||||
// 回显申请单位负责人签字的图片
|
|
||||||
if (sos.ITEM_NAME === "SIGN") {
|
|
||||||
newFormData.SIGN = `${this.$filePath}${sos.ITEM_VALUE}`
|
|
||||||
}
|
|
||||||
});
|
|
||||||
this.form = newFormData;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
fnSingleChoiceClick(event) {
|
fnSingleChoiceClick(event) {
|
||||||
this.picker.type = event
|
this.picker.type = event
|
||||||
if (event === 'WORK_TYPE_NAME') {
|
if (event === 'WORK_TYPE_NAME') {
|
||||||
this.picker.columns = [[{ NAME: "堵盲板", ID: '0' }, { NAME: "抽盲板", ID: '1' }]]
|
this.picker.columns = [[{ NAME: "堵盲板", ID: '0' }, { NAME: "抽盲板", ID: '1' }]]
|
||||||
if (this.jobTypeNameArr.length > 0) {
|
|
||||||
this.picker.defaultIndex = this.jobTypeNameArr;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
this.picker.show = true
|
this.picker.show = true
|
||||||
},
|
},
|
||||||
|
|
|
@ -91,10 +91,9 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { getTaskInfo } from "@/api";
|
|
||||||
import OtherSelect from '@/components/other-select/index.vue';
|
import OtherSelect from '@/components/other-select/index.vue';
|
||||||
import Sign from '@/components/sign/sign.vue'
|
import Sign from '@/components/sign/sign.vue'
|
||||||
import {setSubmitForm} from "@/utils/submitHomeworkProcess";
|
import {getData, setSubmitForm} from "@/utils/submitHomeworkProcess";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
|
@ -187,37 +186,15 @@ export default {
|
||||||
signVisible: false,
|
signVisible: false,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad(options) {
|
async onLoad(options) {
|
||||||
this.form.CORP_ID = options.CORPINFO_ID
|
this.form.CORP_ID = options.CORPINFO_ID
|
||||||
this.form.CORP_NAME = options.CORP_NAME
|
this.form.CORP_NAME = options.CORP_NAME
|
||||||
this.type = options.type
|
this.type = options.type
|
||||||
if (options.taskId) {
|
if (options.taskId) {
|
||||||
this.fnGetData(options.taskId)
|
this.form = await getData(options.taskId)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
async fnGetData(taskId) {
|
|
||||||
let resData = await getTaskInfo({ EW_RU_TASK_ID: taskId })
|
|
||||||
if (resData.list.form && resData.list.form.length > 0) {
|
|
||||||
let newFormData = { ...this.form };
|
|
||||||
|
|
||||||
resData.list.form.forEach((sos, index) => {
|
|
||||||
newFormData[sos.ITEM_NAME] = sos.ITEM_VALUE;
|
|
||||||
if (sos.FK_NAME) {
|
|
||||||
newFormData[sos.FK_NAME] = sos.FK_VALUE;
|
|
||||||
}
|
|
||||||
// 回显作业内容、范围、方式简图的图片
|
|
||||||
if (sos.ITEM_NAME === "CONTENT_IMG_PATH") {
|
|
||||||
newFormData.CONTENT_IMG_PATH = [{ url: `${this.$filePath}${sos.ITEM_VALUE}` }]
|
|
||||||
}
|
|
||||||
// 回显申请人签字的图片
|
|
||||||
if (sos.ITEM_NAME === "SIGN") {
|
|
||||||
newFormData.SIGN = `${this.$filePath}${sos.ITEM_VALUE}`
|
|
||||||
}
|
|
||||||
});
|
|
||||||
this.form = newFormData;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
fnDateTimePickerClick(event) {
|
fnDateTimePickerClick(event) {
|
||||||
this.dateTimePicker.type = event
|
this.dateTimePicker.type = event
|
||||||
this.dateTimePicker.value = Number(new Date(this.form[event])) || Number(new Date())
|
this.dateTimePicker.value = Number(new Date(this.form[event])) || Number(new Date())
|
||||||
|
|
|
@ -80,8 +80,7 @@
|
||||||
<script>
|
<script>
|
||||||
import {getConfinedSpaceSelectList} from '@/api'
|
import {getConfinedSpaceSelectList} from '@/api'
|
||||||
import OtherSelect from '@/components/other-select/index.vue';
|
import OtherSelect from '@/components/other-select/index.vue';
|
||||||
import {setSubmitForm} from "@/utils/submitHomeworkProcess";
|
import {getData, setSubmitForm} from "@/utils/submitHomeworkProcess";
|
||||||
import { getTaskInfo } from '@/api';
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
|
@ -174,29 +173,15 @@ export default {
|
||||||
otherIdentificationShow: false,
|
otherIdentificationShow: false,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad(options) {
|
async onLoad(options) {
|
||||||
this.form.CORP_ID = options.CORPINFO_ID
|
this.form.CORP_ID = options.CORPINFO_ID
|
||||||
this.form.CORP_NAME = options.CORP_NAME
|
this.form.CORP_NAME = options.CORP_NAME
|
||||||
this.type = options.type
|
this.type = options.type
|
||||||
if (options.taskId) {
|
if (options.taskId) {
|
||||||
this.fnGetData(options.taskId)
|
this.form = await getData(options.taskId)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
async fnGetData(taskId) {
|
|
||||||
let resData = await getTaskInfo({ EW_RU_TASK_ID: taskId })
|
|
||||||
if (resData.list.form && resData.list.form.length > 0) {
|
|
||||||
let newFormData = { ...this.form };
|
|
||||||
|
|
||||||
resData.list.form.forEach((sos, index) => {
|
|
||||||
newFormData[sos.ITEM_NAME] = sos.ITEM_VALUE;
|
|
||||||
if (sos.FK_NAME) {
|
|
||||||
newFormData[sos.FK_NAME] = sos.FK_VALUE;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
this.form = newFormData;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
async fnGetConfinedSpaceSelectList() {
|
async fnGetConfinedSpaceSelectList() {
|
||||||
const resData = await getConfinedSpaceSelectList({TYPE: 2, CORP_ID: this.form.CORP_ID})
|
const resData = await getConfinedSpaceSelectList({TYPE: 2, CORP_ID: this.form.CORP_ID})
|
||||||
this.picker.columns = [resData.varList]
|
this.picker.columns = [resData.varList]
|
||||||
|
|
|
@ -91,10 +91,9 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { getTaskInfo } from "@/api";
|
|
||||||
import OtherSelect from '@/components/other-select/index.vue';
|
import OtherSelect from '@/components/other-select/index.vue';
|
||||||
import Sign from '@/components/sign/sign.vue'
|
import Sign from '@/components/sign/sign.vue'
|
||||||
import {setSubmitForm} from "@/utils/submitHomeworkProcess";
|
import {getData, setSubmitForm} from "@/utils/submitHomeworkProcess";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
|
@ -187,40 +186,15 @@ export default {
|
||||||
signVisible: false,
|
signVisible: false,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad(options) {
|
async onLoad(options) {
|
||||||
this.form.CORP_ID = options.CORPINFO_ID
|
this.form.CORP_ID = options.CORPINFO_ID
|
||||||
this.form.CORP_NAME = options.CORP_NAME
|
this.form.CORP_NAME = options.CORP_NAME
|
||||||
this.type = options.type
|
this.type = options.type
|
||||||
if (options.taskId) {
|
if (options.taskId) {
|
||||||
this.fnGetData(options.taskId)
|
this.form = await getData(options.taskId)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
async fnGetData(taskId) {
|
|
||||||
let resData = await getTaskInfo({ EW_RU_TASK_ID: taskId })
|
|
||||||
if (resData.list.form && resData.list.form.length > 0) {
|
|
||||||
let newFormData = { ...this.form };
|
|
||||||
|
|
||||||
resData.list.form.forEach((sos, index) => {
|
|
||||||
newFormData[sos.ITEM_NAME] = sos.ITEM_VALUE;
|
|
||||||
if (sos.FK_NAME) {
|
|
||||||
newFormData[sos.FK_NAME] = sos.FK_VALUE;
|
|
||||||
if (sos.FK_NAME === "WORK_TYPE") {
|
|
||||||
this.jobTypeNameArr = [Number(sos.FK_VALUE)];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// 回显断路地段示意图的图片
|
|
||||||
if (sos.ITEM_NAME === "CONTENT_IMG_PATH") {
|
|
||||||
newFormData.CONTENT_IMG_PATH = [{ url: `${this.$filePath}${sos.ITEM_VALUE}` }]
|
|
||||||
}
|
|
||||||
// 回显申请人签字的图片
|
|
||||||
if (sos.ITEM_NAME === "SIGN") {
|
|
||||||
newFormData.SIGN = `${this.$filePath}${sos.ITEM_VALUE}`
|
|
||||||
}
|
|
||||||
});
|
|
||||||
this.form = newFormData;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
fnDateTimePickerClick(event) {
|
fnDateTimePickerClick(event) {
|
||||||
this.dateTimePicker.type = event
|
this.dateTimePicker.type = event
|
||||||
this.dateTimePicker.value = Number(new Date(this.form[event])) || Number(new Date())
|
this.dateTimePicker.value = Number(new Date(this.form[event])) || Number(new Date())
|
||||||
|
|
|
@ -59,7 +59,7 @@
|
||||||
<u-input v-model="form.LEADER_CARD_NO" border="none"/>
|
<u-input v-model="form.LEADER_CARD_NO" border="none"/>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
<u-form-item label="是否进行气体分析" prop="ISANALYZE" borderBottom required>
|
<u-form-item label="是否进行气体分析" prop="ISANALYZE" borderBottom required>
|
||||||
<u-radio-group v-model="form.ISANALYZE" :customStyle="{'justify-content': 'flex-end'}">
|
<u-radio-group v-model="form.ISANALYZE" :customStyle="{'justify-content': 'flex-end'}" @change="fnIsAnalyzeChange">
|
||||||
<u-radio label="是" name="1"/>
|
<u-radio label="是" name="1"/>
|
||||||
<u-radio :customStyle="{marginLeft: '8px'}" label="否" name="0"/>
|
<u-radio :customStyle="{marginLeft: '8px'}" label="否" name="0"/>
|
||||||
</u-radio-group>
|
</u-radio-group>
|
||||||
|
@ -92,9 +92,8 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { getTaskInfo } from "@/api";
|
|
||||||
import OtherSelect from '@/components/other-select/index.vue';
|
import OtherSelect from '@/components/other-select/index.vue';
|
||||||
import {setSubmitForm} from "@/utils/submitHomeworkProcess";
|
import {getData, setSubmitForm} from "@/utils/submitHomeworkProcess";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
|
@ -120,7 +119,7 @@ export default {
|
||||||
{name: '工作电压', key_name: 'WORK_VOLTAGE', type: 0},
|
{name: '工作电压', key_name: 'WORK_VOLTAGE', type: 0},
|
||||||
{name: '用电人', key_name: 'ELECTRICITY_USER', type: 0},
|
{name: '用电人', key_name: 'ELECTRICITY_USER', type: 0},
|
||||||
{name: '负责人电工号', key_name: 'LEADER_CARD_NO', type: 0},
|
{name: '负责人电工号', key_name: 'LEADER_CARD_NO', type: 0},
|
||||||
{name: '是否进行气体分析', key_name: 'ISANALYZE', type: 0},
|
{name: '是否进行气体分析', key_name: 'ISANALYZE_NAME',key_id: 'ISANALYZE', type: 0},
|
||||||
{name: '关联的其他特殊作业及安全作业票编号', key_name: 'SPECIAL_WORK', type: 0},
|
{name: '关联的其他特殊作业及安全作业票编号', key_name: 'SPECIAL_WORK', type: 0},
|
||||||
{name: '风险辨识结果', key_name: 'RISK_IDENTIFICATION', type: 0},
|
{name: '风险辨识结果', key_name: 'RISK_IDENTIFICATION', type: 0},
|
||||||
],
|
],
|
||||||
|
@ -145,6 +144,7 @@ export default {
|
||||||
ELECTRICITY_USER: '',
|
ELECTRICITY_USER: '',
|
||||||
LEADER_CARD_NO: '',
|
LEADER_CARD_NO: '',
|
||||||
ISANALYZE: '',
|
ISANALYZE: '',
|
||||||
|
ISANALYZE_NAME: '',
|
||||||
SPECIAL_WORK: '',
|
SPECIAL_WORK: '',
|
||||||
RISK_IDENTIFICATION: '',
|
RISK_IDENTIFICATION: '',
|
||||||
},
|
},
|
||||||
|
@ -210,29 +210,15 @@ export default {
|
||||||
otherIdentificationShow: false,
|
otherIdentificationShow: false,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad(options) {
|
async onLoad(options) {
|
||||||
this.form.CORP_ID = options.CORPINFO_ID
|
this.form.CORP_ID = options.CORPINFO_ID
|
||||||
this.form.CORP_NAME = options.CORP_NAME
|
this.form.CORP_NAME = options.CORP_NAME
|
||||||
this.type = options.type
|
this.type = options.type
|
||||||
if (options.taskId) {
|
if (options.taskId) {
|
||||||
this.fnGetData(options.taskId)
|
this.form = await getData(options.taskId)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
async fnGetData(taskId) {
|
|
||||||
let resData = await getTaskInfo({ EW_RU_TASK_ID: taskId })
|
|
||||||
if (resData.list.form && resData.list.form.length > 0) {
|
|
||||||
let newFormData = { ...this.form };
|
|
||||||
|
|
||||||
resData.list.form.forEach((sos, index) => {
|
|
||||||
newFormData[sos.ITEM_NAME] = sos.ITEM_VALUE;
|
|
||||||
if (sos.FK_NAME) {
|
|
||||||
newFormData[sos.FK_NAME] = sos.FK_VALUE;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
this.form = newFormData;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
fnDateTimePickerClick(event) {
|
fnDateTimePickerClick(event) {
|
||||||
this.dateTimePicker.type = event
|
this.dateTimePicker.type = event
|
||||||
this.dateTimePicker.value = Number(new Date(this.form[event])) || Number(new Date())
|
this.dateTimePicker.value = Number(new Date(this.form[event])) || Number(new Date())
|
||||||
|
@ -256,6 +242,13 @@ export default {
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
fnIsAnalyzeChange(event){
|
||||||
|
if(event === '1'){
|
||||||
|
this.form.ISANALYZE_NAME = '是'
|
||||||
|
} else{
|
||||||
|
this.form.ISANALYZE_NAME = '否'
|
||||||
|
}
|
||||||
|
},
|
||||||
async fnSubmit() {
|
async fnSubmit() {
|
||||||
try {
|
try {
|
||||||
await this.$refs.formRef.validate()
|
await this.$refs.formRef.validate()
|
||||||
|
|
|
@ -78,10 +78,9 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { getTaskInfo } from "@/api";
|
|
||||||
import OtherSelect from '@/components/other-select/index.vue';
|
import OtherSelect from '@/components/other-select/index.vue';
|
||||||
import Sign from '@/components/sign/sign.vue'
|
import Sign from '@/components/sign/sign.vue'
|
||||||
import { setSubmitForm } from "@/utils/submitHomeworkProcess";
|
import {getData, setSubmitForm} from "@/utils/submitHomeworkProcess";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
|
@ -169,36 +168,17 @@ export default {
|
||||||
},
|
},
|
||||||
otherAssignmentsShow: false,
|
otherAssignmentsShow: false,
|
||||||
otherIdentificationShow: false,
|
otherIdentificationShow: false,
|
||||||
/** 存储高处作业类别选中态 */
|
|
||||||
jobTypeNameArr: [],
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad(options) {
|
async onLoad(options) {
|
||||||
this.form.CORP_ID = options.CORPINFO_ID
|
this.form.CORP_ID = options.CORPINFO_ID
|
||||||
this.form.CORP_NAME = options.CORP_NAME
|
this.form.CORP_NAME = options.CORP_NAME
|
||||||
this.type = options.type
|
this.type = options.type
|
||||||
if (options.taskId) {
|
if (options.taskId) {
|
||||||
this.fnGetData(options.taskId)
|
this.form = await getData(options.taskId)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
async fnGetData(taskId) {
|
|
||||||
let resData = await getTaskInfo({ EW_RU_TASK_ID: taskId })
|
|
||||||
if (resData.list.form && resData.list.form.length > 0) {
|
|
||||||
let newFormData = { ...this.form };
|
|
||||||
|
|
||||||
resData.list.form.forEach((sos, index) => {
|
|
||||||
newFormData[sos.ITEM_NAME] = sos.ITEM_VALUE;
|
|
||||||
if (sos.FK_NAME) {
|
|
||||||
newFormData[sos.FK_NAME] = sos.FK_VALUE;
|
|
||||||
if (sos.FK_NAME === "WORK_LEVEL") {
|
|
||||||
this.jobTypeNameArr = [Number(sos.FK_VALUE)];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
this.form = newFormData;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
fnSingleChoiceClick(event) {
|
fnSingleChoiceClick(event) {
|
||||||
this.picker.type = event
|
this.picker.type = event
|
||||||
if (event === 'WORK_LEVEL_NAME') {
|
if (event === 'WORK_LEVEL_NAME') {
|
||||||
|
@ -208,9 +188,6 @@ export default {
|
||||||
{ NAME: 'III级高处作业', ID: '2' },
|
{ NAME: 'III级高处作业', ID: '2' },
|
||||||
{ NAME: 'IV级高处作业', ID: '3' },
|
{ NAME: 'IV级高处作业', ID: '3' },
|
||||||
]];
|
]];
|
||||||
if (this.jobTypeNameArr.length > 0) {
|
|
||||||
this.picker.defaultIndex = this.jobTypeNameArr;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
this.picker.show = true
|
this.picker.show = true
|
||||||
},
|
},
|
||||||
|
|
|
@ -89,8 +89,7 @@
|
||||||
<script>
|
<script>
|
||||||
import OtherSelect from '@/components/other-select/index.vue';
|
import OtherSelect from '@/components/other-select/index.vue';
|
||||||
import Sign from '@/components/sign/sign.vue'
|
import Sign from '@/components/sign/sign.vue'
|
||||||
import { setSubmitForm } from "@/utils/submitHomeworkProcess";
|
import {getData, setSubmitForm} from "@/utils/submitHomeworkProcess";
|
||||||
import { getTaskInfo } from '@/api';
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
|
@ -187,37 +186,17 @@ export default {
|
||||||
},
|
},
|
||||||
otherAssignmentsShow: false,
|
otherAssignmentsShow: false,
|
||||||
otherIdentificationShow: false,
|
otherIdentificationShow: false,
|
||||||
/** 存储作业级别选中态 */
|
|
||||||
workLevelNameArr: [],
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad(options) {
|
async onLoad(options) {
|
||||||
this.form.CORP_ID = options.CORPINFO_ID
|
this.form.CORP_ID = options.CORPINFO_ID
|
||||||
this.form.CORP_NAME = options.CORP_NAME
|
this.form.CORP_NAME = options.CORP_NAME
|
||||||
this.type = options.type
|
this.type = options.type
|
||||||
if (options.taskId) {
|
if (options.taskId) {
|
||||||
this.fnGetData(options.taskId)
|
this.form = await getData(options.taskId)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
async fnGetData(taskId) {
|
|
||||||
let resData = await getTaskInfo({ EW_RU_TASK_ID: taskId });
|
|
||||||
if (resData.list.form && resData.list.form.length > 0) {
|
|
||||||
resData.list.form.forEach((sos, index) => {
|
|
||||||
this.form[sos.ITEM_NAME] = sos.ITEM_VALUE;
|
|
||||||
if (sos.FK_NAME) {
|
|
||||||
this.form[sos.FK_NAME] = sos.FK_VALUE;
|
|
||||||
// 这里去单独判断 FK_NAME 字段是否为 [作业级别], 若为 [作业级别] 的话, 则设置 u-picker 组件的 defaultIndex属性,
|
|
||||||
// 实现点击修改后, 再次点击作业级别的选择器后,选择去会默认选中指定下拉项
|
|
||||||
// 具体的 u-picker 组件的 defaultIndex 属性的使用可见以下链接查看:
|
|
||||||
// https://uviewui.com/components/picker.html#%E9%BB%98%E8%AE%A4%E5%80%BC
|
|
||||||
if (sos.FK_NAME === 'WORK_LEVEL_ID') {
|
|
||||||
this.workLevelNameArr = [Number(sos.FK_VALUE)];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
},
|
|
||||||
fnSingleChoiceClick(event) {
|
fnSingleChoiceClick(event) {
|
||||||
this.picker.type = event
|
this.picker.type = event
|
||||||
if (event === 'WORK_LEVEL_NAME') {
|
if (event === 'WORK_LEVEL_NAME') {
|
||||||
|
@ -227,7 +206,6 @@ export default {
|
||||||
{ NAME: 'III级高处作业', ID: '2' },
|
{ NAME: 'III级高处作业', ID: '2' },
|
||||||
{ NAME: 'IV级高处作业', ID: '3' },
|
{ NAME: 'IV级高处作业', ID: '3' },
|
||||||
]];
|
]];
|
||||||
if (this.workLevelNameArr.length > 0) this.picker.defaultIndex = this.workLevelNameArr;
|
|
||||||
}
|
}
|
||||||
this.picker.show = true
|
this.picker.show = true
|
||||||
},
|
},
|
||||||
|
|
|
@ -85,9 +85,8 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { getTaskInfo } from "@/api";
|
|
||||||
import OtherSelect from '@/components/other-select/index.vue';
|
import OtherSelect from '@/components/other-select/index.vue';
|
||||||
import { setSubmitForm } from "@/utils/submitHomeworkProcess";
|
import {getData, setSubmitForm} from "@/utils/submitHomeworkProcess";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: { OtherSelect },
|
components: { OtherSelect },
|
||||||
|
@ -181,40 +180,19 @@ export default {
|
||||||
otherWorkMethodShow: false,
|
otherWorkMethodShow: false,
|
||||||
/** 其他动火操作人选择器是否展示 */
|
/** 其他动火操作人选择器是否展示 */
|
||||||
otherUserNameSelectShow: false,
|
otherUserNameSelectShow: false,
|
||||||
/** 存储作业类型选中态 */
|
|
||||||
jobTypeNameArr: [],
|
|
||||||
/** 存储动火等级选中态 */
|
|
||||||
hotWorkLevelNameArr: [],
|
|
||||||
taskId: null
|
taskId: null
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad(options) {
|
async onLoad(options) {
|
||||||
this.form.CORP_ID = options.CORPINFO_ID
|
this.form.CORP_ID = options.CORPINFO_ID
|
||||||
this.form.CORP_NAME = options.CORP_NAME
|
this.form.CORP_NAME = options.CORP_NAME
|
||||||
this.type = options.type
|
this.type = options.type
|
||||||
if (options.taskId) {
|
if (options.taskId) {
|
||||||
this.taskId = options.taskId
|
this.taskId = options.taskId
|
||||||
this.fnGetData(options.taskId)
|
this.form = await getData(options.taskId)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
async fnGetData(taskId) {
|
|
||||||
let resData = await getTaskInfo({ EW_RU_TASK_ID: taskId })
|
|
||||||
if (resData.list.form && resData.list.form.length > 0) {
|
|
||||||
resData.list.form.forEach((sos, index) => {
|
|
||||||
this.form[sos.ITEM_NAME] = sos.ITEM_VALUE;
|
|
||||||
if (sos.FK_NAME) {
|
|
||||||
this.form[sos.FK_NAME] = sos.FK_VALUE;
|
|
||||||
if (sos.FK_NAME === "JOB_TYPE_ID") {
|
|
||||||
this.jobTypeNameArr = [Number(sos.FK_VALUE)];
|
|
||||||
}
|
|
||||||
if (sos.FK_NAME === "HOT_WORK_LEVEL_ID") {
|
|
||||||
this.hotWorkLevelNameArr = [Number(sos.FK_VALUE)];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
},
|
|
||||||
fnDateTimePickerClick(event) {
|
fnDateTimePickerClick(event) {
|
||||||
this.dateTimePicker.type = event
|
this.dateTimePicker.type = event
|
||||||
this.dateTimePicker.value = Number(new Date(this.form[event])) || Number(new Date())
|
this.dateTimePicker.value = Number(new Date(this.form[event])) || Number(new Date())
|
||||||
|
@ -224,11 +202,9 @@ export default {
|
||||||
this.picker.type = event;
|
this.picker.type = event;
|
||||||
if (event === 'JOB_TYPE_NAME') {
|
if (event === 'JOB_TYPE_NAME') {
|
||||||
this.picker.columns = [[{ ID: '0', NAME: '内部作业' }, { ID: '1', NAME: '相关方作业' }]]
|
this.picker.columns = [[{ ID: '0', NAME: '内部作业' }, { ID: '1', NAME: '相关方作业' }]]
|
||||||
if (this.jobTypeNameArr.length > 0) this.picker.defaultIndex = this.jobTypeNameArr;
|
|
||||||
};
|
};
|
||||||
if (event === 'HOT_WORK_LEVEL_INDEX') {
|
if (event === 'HOT_WORK_LEVEL_INDEX') {
|
||||||
this.picker.columns = [[{ ID: '0', NAME: '特级' }, { ID: '1', NAME: '一级' }, { ID: '2', NAME: '二级' }, { ID: '3', NAME: '三级' }]]
|
this.picker.columns = [[{ ID: '0', NAME: '特级' }, { ID: '1', NAME: '一级' }, { ID: '2', NAME: '二级' }, { ID: '3', NAME: '三级' }]]
|
||||||
if (this.hotWorkLevelNameArr.length > 0) this.picker.defaultIndex = this.hotWorkLevelNameArr;
|
|
||||||
}
|
}
|
||||||
this.picker.show = true;
|
this.picker.show = true;
|
||||||
},
|
},
|
||||||
|
|
|
@ -2,9 +2,49 @@
|
||||||
<view class="content">
|
<view class="content">
|
||||||
<view class="card">
|
<view class="card">
|
||||||
<u-cell-group>
|
<u-cell-group>
|
||||||
<block v-for="(item, index) in form" :key="index">
|
<view v-for="(item, index) in form" :key="index">
|
||||||
<u-cell v-if="item.TYPE === 0" :key="index" :title="item.ITEM" :value="item.ITEM_VALUE"></u-cell>
|
<u-cell v-if="item.TYPE === 0" :title="item.ITEM" :value="item.ITEM_VALUE"></u-cell>
|
||||||
</block>
|
<view v-if="item.TYPE === 1">
|
||||||
|
<u-cell :title="item.ITEM">
|
||||||
|
<template #label>
|
||||||
|
<view class="mt-5">
|
||||||
|
<view v-for="(item1, index1) in item.list" :key="index1">
|
||||||
|
<u-image
|
||||||
|
width="400rpx"
|
||||||
|
height="200rpx"
|
||||||
|
:src="$filePath + item1.ITEM_VALUE"
|
||||||
|
mode="widthFix"
|
||||||
|
/>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
</u-cell>
|
||||||
|
</view>
|
||||||
|
<view v-if="item.TYPE === 3">
|
||||||
|
<u-divider text-position="left" :text="item.ITEM" />
|
||||||
|
</view>
|
||||||
|
<view v-if="item.TYPE === 4">
|
||||||
|
<view v-for="(item1, index1) in item.list" :key="index1">
|
||||||
|
<view v-for="(item2, index2) in item1.list" :key="index2">
|
||||||
|
<u-cell :title="item2.ITEM" :value="item2.ITEM_VALUE" />
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view v-if="item.TYPE === 5">
|
||||||
|
<u-cell :title="item.ITEM">
|
||||||
|
<template #label>
|
||||||
|
<view class="mt-5">
|
||||||
|
<u-image
|
||||||
|
width="400rpx"
|
||||||
|
height="200rpx"
|
||||||
|
:src="$filePath + item.ITEM_VALUE"
|
||||||
|
mode="widthFix"
|
||||||
|
/>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
</u-cell>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
</u-cell-group>
|
</u-cell-group>
|
||||||
<u-divider text="安全措施" textPosition="left" textColor="#3c9cff" lineColor="#3c9cff"/>
|
<u-divider text="安全措施" textPosition="left" textColor="#3c9cff" lineColor="#3c9cff"/>
|
||||||
<u-cell-group>
|
<u-cell-group>
|
||||||
|
@ -74,7 +114,7 @@ export default {
|
||||||
methods: {
|
methods: {
|
||||||
async fnGetData(taskId) {
|
async fnGetData(taskId) {
|
||||||
let resData = await getTaskInfo({EW_RU_TASK_ID: taskId})
|
let resData = await getTaskInfo({EW_RU_TASK_ID: taskId})
|
||||||
this.form = resData.list.form
|
this.form = resData.list.fromTrans
|
||||||
this.jobs = resData.list.jobs
|
this.jobs = resData.list.jobs
|
||||||
this.questionnaires = resData.list.simpleQues[0]
|
this.questionnaires = resData.list.simpleQues[0]
|
||||||
},
|
},
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import {
|
import {
|
||||||
getCurrentNextOperation,
|
getCurrentNextOperation, getTaskInfo,
|
||||||
setOtherSecurityMeasuresSave,
|
setOtherSecurityMeasuresSave,
|
||||||
setSecurityMeasuresSave,
|
setSecurityMeasuresSave,
|
||||||
setTaskFile,
|
setTaskFile,
|
||||||
|
@ -253,3 +253,35 @@ export const resolveNextOperation = async ({EW_RU_TASK_ID = '', CORP_ID = '', TY
|
||||||
)
|
)
|
||||||
}, 1500)
|
}, 1500)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export const getData = async (taskId) => {
|
||||||
|
const resData = await getTaskInfo({ EW_RU_TASK_ID: taskId });
|
||||||
|
if (resData.list.fromTrans && resData.list.fromTrans.length > 0) {
|
||||||
|
const form = {};
|
||||||
|
resData.list.fromTrans.forEach((item) => {
|
||||||
|
form[item.ITEM_NAME] = item.ITEM_VALUE;
|
||||||
|
if (item.FK_NAME) {
|
||||||
|
form[item.FK_NAME] = item.FK_VALUE;
|
||||||
|
}
|
||||||
|
if (item.TYPE === 1) {
|
||||||
|
form[item.ITEM_NAME] = item.list.map((item) => ({
|
||||||
|
url: this.$filePath + item.ITEM_VALUE,
|
||||||
|
}));
|
||||||
|
}
|
||||||
|
if (item.TYPE === 4) {
|
||||||
|
form[item.ITEM_NAME] = [];
|
||||||
|
for (let i = 0; i < item.list.length; i++) {
|
||||||
|
form[item.ITEM_NAME].push({});
|
||||||
|
for (let j = 0; j < item.list[i].list.length; j++) {
|
||||||
|
form[item.ITEM_NAME][i][item.list[i].list[j].ITEM_NAME] =
|
||||||
|
item.list[i].list[j].ITEM_VALUE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (item.TYPE === 5) {
|
||||||
|
form[item.ITEM_NAME] = this.$filePath + item.ITEM_VALUE;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
return form;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
Loading…
Reference in New Issue