Browse Source

fit:督察问题完善(查否功能\排序) & 人员抽检(排序、单选框支持取消、抽检对象名单支持修改、是否值班人员)

main
pengwei 6 months ago
parent
commit
61221017a5
  1. 5
      src/views/mobileSupervise/Sampling.vue
  2. 40
      src/views/mobileSupervise/TaskProblem.vue

5
src/views/mobileSupervise/Sampling.vue

@ -106,6 +106,9 @@ const editFun = ()=>{
// //
const getDataDetail =(row)=>{ const getDataDetail =(row)=>{
editData.value=row editData.value=row
editData.value.samplingNum =(row.samplingNum?row.samplingNum+ 0: 0);
console.log('samplingNum',editData.value.samplingNum)
editData.value.samplingObjectList.forEach(async (x) => { editData.value.samplingObjectList.forEach(async (x) => {
x.departName = await getDepartShortNameFun(x.deptId) x.departName = await getDepartShortNameFun(x.deptId)
}) })
@ -173,7 +176,7 @@ const computedData = (data)=>{
watch(()=>editData.value.samplingObjectList,()=>{ watch(()=>editData.value.samplingObjectList,()=>{
editData.value.samplingNum = editData.value.samplingObjectList.reduce((accumulator, currentValue) => { editData.value.samplingNum = editData.value.samplingObjectList.reduce((accumulator, currentValue) => {
return accumulator + ( currentValue.value?currentValue.value:0); return accumulator + ( currentValue.value?Number(currentValue.value):0);
},0) },0)
},{deep:true,immediate:true}) },{deep:true,immediate:true})

40
src/views/mobileSupervise/TaskProblem.vue

@ -65,7 +65,7 @@
> >
<el-tab-pane label="全部" name="0"></el-tab-pane> <el-tab-pane label="全部" name="0"></el-tab-pane>
<el-tab-pane label="待下发" name="1"></el-tab-pane> <el-tab-pane label="待下发" name="1"></el-tab-pane>
<el-tab-pane label="待确认" name="2"></el-tab-pane> <el-tab-pane label="回收站" name="2"></el-tab-pane>
</el-tabs> </el-tabs>
<div class="table-container"> <div class="table-container">
<el-table :data="list" v-loading="loading"> <el-table :data="list" v-loading="loading">
@ -116,7 +116,7 @@
link link
@click="upProblemStateFun(row)" @click="upProblemStateFun(row)"
> >
{{row.problemState == '1'?'移至待确认':'移至问题项'}} 删除
</el-button> </el-button>
<el-button <el-button
v-if="row.distributionState === '0'" v-if="row.distributionState === '0'"
@ -125,12 +125,12 @@
@click="issueMatterFun(row)" @click="issueMatterFun(row)"
>问题下发</el-button >问题下发</el-button
> >
<el-button <!-- <el-button-->
type="danger" <!-- type="danger"-->
link <!-- link-->
@click="delProblemsFun(row)" <!-- @click="delProblemsFun(row)"-->
>删除</el-button <!-- >删除</el-button-->
> <!-- >-->
</template> </template>
</el-table-column> </el-table-column>
@ -192,7 +192,7 @@
</div> </div>
</el-dialog> </el-dialog>
<el-dialog title="任务分发" v-model="distributeShow" width="50vw" top="2vh" style="margin-bottom: 0"> <el-dialog @close="addClose" title="任务分发" v-model="distributeShow" width="50vw" top="2vh" style="margin-bottom: 0">
<el-form :label-width="120" ref="formRefs" :model="issueForm" v-loading="issueLoading"> <el-form :label-width="120" ref="formRefs" :model="issueForm" v-loading="issueLoading">
<el-form-item <el-form-item
label="任务名称" label="任务名称"
@ -378,17 +378,18 @@
const issueLoading = ref(false) const issueLoading = ref(false)
const formRefs =ref(); const formRefs =ref();
// //
const issueMatterFun =(row)=>{ const issueMatterFun = async (row)=>{
const data = await getTaskProblem(row.id)
switch (row.taskType){ switch (row.taskType){
case "selfexamination": case "selfexamination":
issueForm.value.problemVo = row issueForm.value.problemVo = data
break; break;
case "inspection": case "inspection":
issueForm.value.problemVo = row issueForm.value.problemVo = data
break; break;
case "testing_alcohol": case "testing_alcohol":
issueForm.value.taskId = row.taskId; issueForm.value.taskId = data.taskId;
issueForm.value.empNo =row.empNo; issueForm.value.empNo =data.empNo;
break; break;
case "risk_personal": case "risk_personal":
issueForm.value.supRecordId =row.id issueForm.value.supRecordId =row.id
@ -398,9 +399,14 @@
break break
} }
issueForm.value.tableKey=row.taskType; issueForm.value.tableKey=row.taskType;
distributeShow.value=true; distributeShow.value=true;
} }
const addClose =()=>{
issueForm.value={
}
}
// //
const handleSubmitTask =async ()=>{ const handleSubmitTask =async ()=>{
await formRefs.value.validate(); await formRefs.value.validate();
@ -431,11 +437,11 @@
} }
async function upProblemStateFun(row){ async function upProblemStateFun(row){
await feedback.confirm(`确定要变更为${row.problemState == '1'?'待确认':'问题项'}状态`); await feedback.confirm(`确定要${row.problemState == '1'?'删除':'恢复'}该问题项(可在回收站中查看已删除的问题项)`);
upProblemState(row.id).then(res=>{ upProblemState(row.id).then(res=>{
getList() getList()
}) })
feedback.msgSuccess("变更成功"); feedback.msgSuccess("操作成功");
} }
const query = ref({ const query = ref({
actionType:"0" actionType:"0"

Loading…
Cancel
Save