|
@@ -848,195 +848,138 @@
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
|
|
|
<el-form-item label="">
|
|
<el-form-item label="">
|
|
- <el-button
|
|
|
|
- type="text"
|
|
|
|
- style="position: absolute; top: 0; right: 0; z-index: 10"
|
|
|
|
- @click="addnewitem"
|
|
|
|
- >新增</el-button
|
|
|
|
- >
|
|
|
|
<el-tabs v-model="cztblaname" class="demo-tabs">
|
|
<el-tabs v-model="cztblaname" class="demo-tabs">
|
|
<el-tab-pane label="工作量" name="gzl">
|
|
<el-tab-pane label="工作量" name="gzl">
|
|
- <el-table :data="czobj.gzldata">
|
|
|
|
- <el-table-column label="名称">
|
|
|
|
- <template #default="scope">
|
|
|
|
- <el-select
|
|
|
|
- v-model="scope.row.label"
|
|
|
|
- @change="
|
|
|
|
- (val) => {
|
|
|
|
- scope.row.value = task_work.filter(
|
|
|
|
- (ii) => ii.label == val
|
|
|
|
- )[0].remark;
|
|
|
|
- }
|
|
|
|
- "
|
|
|
|
- placeholder="请选择"
|
|
|
|
- >
|
|
|
|
- <el-option
|
|
|
|
- v-for="item in task_work"
|
|
|
|
- :label="item.label"
|
|
|
|
- :value="item.label"
|
|
|
|
- ></el-option>
|
|
|
|
- </el-select>
|
|
|
|
- </template>
|
|
|
|
- </el-table-column>
|
|
|
|
- <el-table-column label="内容" prop="value">
|
|
|
|
- <template #default="scope">
|
|
|
|
- <el-input
|
|
|
|
- v-model="scope.row.value"
|
|
|
|
- placeholder="请输入"
|
|
|
|
- ></el-input>
|
|
|
|
- </template>
|
|
|
|
- </el-table-column>
|
|
|
|
- <el-table-column label="操作">
|
|
|
|
- <template #default="scope">
|
|
|
|
- <el-popconfirm
|
|
|
|
- title="确定删除吗?"
|
|
|
|
- @confirm="
|
|
|
|
- () => {
|
|
|
|
- czobj.gzldata?.splice(
|
|
|
|
- czobj.gzldata.findIndex(
|
|
|
|
- (i) => i.index == scope.row.index
|
|
|
|
- ),
|
|
|
|
- 1
|
|
|
|
- );
|
|
|
|
- }
|
|
|
|
- "
|
|
|
|
- >
|
|
|
|
- <template #reference>
|
|
|
|
- <el-button type="text" size="small"> 删除 </el-button>
|
|
|
|
- </template>
|
|
|
|
- </el-popconfirm>
|
|
|
|
- </template>
|
|
|
|
- </el-table-column>
|
|
|
|
- </el-table>
|
|
|
|
|
|
+ <el-row>
|
|
|
|
+ <el-col :span="12" v-for="item in czobj.gzldata" >
|
|
|
|
+ <div style="margin-bottom:10px">
|
|
|
|
+ <el-row>
|
|
|
|
+ <el-col :span="8"><div style="text-align: right;padding-right:6px">{{ item.name }}:</div></el-col>
|
|
|
|
+ <el-col :span="item.hasOwnProperty('value2') ? 8 : 16">
|
|
|
|
+ <el-input
|
|
|
|
+ v-model="item.value1"
|
|
|
|
+ placeholder="请输入"
|
|
|
|
+ >
|
|
|
|
+ <template #append v-if="item.unit1!==''">{{
|
|
|
|
+ item.unit1
|
|
|
|
+ }}</template></el-input
|
|
|
|
+ >
|
|
|
|
+ </el-col>
|
|
|
|
+ <el-col :span="8" v-if="item.hasOwnProperty('value2')">
|
|
|
|
+ <div style="padding-left:5px">
|
|
|
|
+ <el-input
|
|
|
|
+ v-if="item.hasOwnProperty('value2')"
|
|
|
|
+ v-model="item.value2"
|
|
|
|
+ placeholder="请输入"
|
|
|
|
+ >
|
|
|
|
+ <template #append v-if="item.unit2!==''">{{
|
|
|
|
+ item.unit2
|
|
|
|
+ }}</template></el-input
|
|
|
|
+ >
|
|
|
|
+
|
|
|
|
+ </div>
|
|
|
|
+
|
|
|
|
+ </el-col>
|
|
|
|
+ </el-row>
|
|
|
|
+
|
|
|
|
+ </div>
|
|
|
|
+
|
|
|
|
+ </el-col>
|
|
|
|
+ </el-row>
|
|
</el-tab-pane>
|
|
</el-tab-pane>
|
|
<el-tab-pane label="车辆设备" name="clsb">
|
|
<el-tab-pane label="车辆设备" name="clsb">
|
|
- <el-table :data="czobj.clsbdata">
|
|
|
|
- <el-table-column label="名称" prop="label">
|
|
|
|
- <template #default="scope">
|
|
|
|
- <el-select
|
|
|
|
- v-model="scope.row.label"
|
|
|
|
- @change="
|
|
|
|
- (val) => {
|
|
|
|
- scope.row.value = task_car.filter(
|
|
|
|
- (ii) => ii.label == val
|
|
|
|
- )[0].remark;
|
|
|
|
- }
|
|
|
|
- "
|
|
|
|
- placeholder="请选择"
|
|
|
|
- >
|
|
|
|
- <el-option
|
|
|
|
- v-for="item in task_car"
|
|
|
|
- :label="item.label"
|
|
|
|
- :value="item.label"
|
|
|
|
- ></el-option>
|
|
|
|
- </el-select>
|
|
|
|
- </template>
|
|
|
|
- </el-table-column>
|
|
|
|
- <el-table-column label="内容" prop="value">
|
|
|
|
- <template #default="scope">
|
|
|
|
- <el-input
|
|
|
|
- v-model="scope.row.value"
|
|
|
|
- placeholder="请输入"
|
|
|
|
- ></el-input>
|
|
|
|
- </template>
|
|
|
|
- </el-table-column>
|
|
|
|
- <el-table-column label="操作">
|
|
|
|
- <template #default="scope">
|
|
|
|
- <el-popconfirm
|
|
|
|
- title="确定删除吗?"
|
|
|
|
- @confirm="
|
|
|
|
- () => {
|
|
|
|
- czobj.clsbdata?.splice(
|
|
|
|
- czobj.clsbdata.findIndex(
|
|
|
|
- (i) => i.index == scope.row.index
|
|
|
|
- ),
|
|
|
|
- 1
|
|
|
|
- );
|
|
|
|
- }
|
|
|
|
- "
|
|
|
|
- >
|
|
|
|
- <template #reference>
|
|
|
|
- <el-button type="text" size="small"> 删除 </el-button>
|
|
|
|
- </template>
|
|
|
|
- </el-popconfirm>
|
|
|
|
- </template>
|
|
|
|
- </el-table-column>
|
|
|
|
- </el-table>
|
|
|
|
|
|
+ <el-row>
|
|
|
|
+ <el-col :span="12" v-for="item in czobj.clsbdata" >
|
|
|
|
+ <div style="margin-bottom:10px">
|
|
|
|
+ <el-row>
|
|
|
|
+ <el-col :span="8"><div style="text-align: right;padding-right:6px">{{ item.name }}:</div></el-col>
|
|
|
|
+ <el-col :span="item.hasOwnProperty('value2') ? 8 : 16">
|
|
|
|
+ <el-input
|
|
|
|
+ v-model="item.value1"
|
|
|
|
+ placeholder="请输入"
|
|
|
|
+ >
|
|
|
|
+ <template #append v-if="item.unit1!==''">{{
|
|
|
|
+ item.unit1
|
|
|
|
+ }}</template></el-input
|
|
|
|
+ >
|
|
|
|
+ </el-col>
|
|
|
|
+ <el-col :span="8" v-if="item.hasOwnProperty('value2')">
|
|
|
|
+ <div style="padding-left:5px">
|
|
|
|
+ <el-input
|
|
|
|
+ v-if="item.hasOwnProperty('value2')"
|
|
|
|
+ v-model="item.value2"
|
|
|
|
+ placeholder="请输入"
|
|
|
|
+ >
|
|
|
|
+ <template #append v-if="item.unit2!==''">{{
|
|
|
|
+ item.unit2
|
|
|
|
+ }}</template></el-input
|
|
|
|
+ >
|
|
|
|
+
|
|
|
|
+ </div>
|
|
|
|
+ </el-col>
|
|
|
|
+ </el-row>
|
|
|
|
+
|
|
|
|
+ </div>
|
|
|
|
+
|
|
|
|
+ </el-col>
|
|
|
|
+ </el-row>
|
|
</el-tab-pane>
|
|
</el-tab-pane>
|
|
<el-tab-pane label="耗材" name="hc">
|
|
<el-tab-pane label="耗材" name="hc">
|
|
- <el-table :data="czobj.hcdata">
|
|
|
|
- <el-table-column label="名称" prop="label">
|
|
|
|
- <template #default="scope">
|
|
|
|
- <el-select
|
|
|
|
- v-model="scope.row.label"
|
|
|
|
- @change="
|
|
|
|
- (val) => {
|
|
|
|
- scope.row.value = task_consumables.filter(
|
|
|
|
- (ii) => ii.label == val
|
|
|
|
- )[0].remark;
|
|
|
|
- }
|
|
|
|
- "
|
|
|
|
- placeholder="请选择"
|
|
|
|
- >
|
|
|
|
- <el-option
|
|
|
|
- v-for="item in task_consumables"
|
|
|
|
- :label="item.label"
|
|
|
|
- :value="item.label"
|
|
|
|
- ></el-option>
|
|
|
|
- </el-select>
|
|
|
|
- </template>
|
|
|
|
- </el-table-column>
|
|
|
|
- <el-table-column label="内容" prop="value">
|
|
|
|
- <template #default="scope">
|
|
|
|
- <el-input
|
|
|
|
- v-model="scope.row.value"
|
|
|
|
- placeholder="请输入"
|
|
|
|
- ></el-input>
|
|
|
|
- </template>
|
|
|
|
- </el-table-column>
|
|
|
|
- <el-table-column label="操作">
|
|
|
|
- <template #default="scope">
|
|
|
|
- <el-popconfirm
|
|
|
|
- title="确定删除吗?"
|
|
|
|
- @confirm="
|
|
|
|
- () => {
|
|
|
|
- czobj.hcdata?.splice(
|
|
|
|
- czobj.hcdata.findIndex(
|
|
|
|
- (i) => i.index == scope.row.index
|
|
|
|
- ),
|
|
|
|
- 1
|
|
|
|
- );
|
|
|
|
- }
|
|
|
|
- "
|
|
|
|
- >
|
|
|
|
- <template #reference>
|
|
|
|
- <el-button type="text" size="small"> 删除 </el-button>
|
|
|
|
- </template>
|
|
|
|
- </el-popconfirm>
|
|
|
|
- </template>
|
|
|
|
- </el-table-column>
|
|
|
|
- </el-table></el-tab-pane
|
|
|
|
- >
|
|
|
|
|
|
+ <el-row>
|
|
|
|
+ <el-col :span="12" v-for="item in czobj.hcdata" >
|
|
|
|
+ <div style="margin-bottom:10px">
|
|
|
|
+ <el-row>
|
|
|
|
+ <el-col :span="8"><div style="text-align: right;padding-right:6px">{{ item.name }}:</div></el-col>
|
|
|
|
+ <el-col :span="item.hasOwnProperty('value2') ? 8 : 16">
|
|
|
|
+ <el-input
|
|
|
|
+ v-model="item.value1"
|
|
|
|
+ placeholder="请输入"
|
|
|
|
+ >
|
|
|
|
+ <template #append v-if="item.unit1!==''">{{
|
|
|
|
+ item.unit1
|
|
|
|
+ }}</template></el-input
|
|
|
|
+ >
|
|
|
|
+ </el-col>
|
|
|
|
+ <el-col :span="8" v-if="item.hasOwnProperty('value2')">
|
|
|
|
+ <div style="padding-left:5px">
|
|
|
|
+ <el-input
|
|
|
|
+ v-if="item.hasOwnProperty('value2')"
|
|
|
|
+ v-model="item.value2"
|
|
|
|
+ placeholder="请输入"
|
|
|
|
+ >
|
|
|
|
+ <template #append v-if="item.unit2!==''">{{
|
|
|
|
+ item.unit2
|
|
|
|
+ }}</template></el-input
|
|
|
|
+ >
|
|
|
|
+ </div>
|
|
|
|
+ </el-col>
|
|
|
|
+ </el-row>
|
|
|
|
+ </div>
|
|
|
|
+
|
|
|
|
+ </el-col>
|
|
|
|
+ </el-row>
|
|
|
|
+ </el-tab-pane>
|
|
</el-tabs>
|
|
</el-tabs>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<el-row>
|
|
<el-row>
|
|
- <el-col :span="8"><el-form-item label="现场照片(处置前)">
|
|
|
|
- <ImageUpload v-model="czobj.images[0]" :limit="1"></ImageUpload>
|
|
|
|
- </el-form-item></el-col>
|
|
|
|
- <el-col :span="8">
|
|
|
|
|
|
+ <el-col :span="8"
|
|
|
|
+ ><el-form-item label="现场照片(处置前)">
|
|
|
|
+ <ImageUpload
|
|
|
|
+ v-model="czobj.images[0]"
|
|
|
|
+ :limit="1"
|
|
|
|
+ ></ImageUpload> </el-form-item
|
|
|
|
+ ></el-col>
|
|
|
|
+ <el-col :span="8">
|
|
<el-form-item label="(处置中)">
|
|
<el-form-item label="(处置中)">
|
|
- <ImageUpload v-model="czobj.images[1]" :limit="1"></ImageUpload>
|
|
|
|
- </el-form-item>
|
|
|
|
- </el-col>
|
|
|
|
- <el-col :span="8">
|
|
|
|
- <el-form-item label="(处置后)">
|
|
|
|
- <ImageUpload v-model="czobj.images[2]" :limit="1"></ImageUpload>
|
|
|
|
- </el-form-item>
|
|
|
|
- </el-col>
|
|
|
|
- </el-row>>
|
|
|
|
-
|
|
|
|
-
|
|
|
|
-
|
|
|
|
|
|
+ <ImageUpload v-model="czobj.images[1]" :limit="1"></ImageUpload>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </el-col>
|
|
|
|
+ <el-col :span="8">
|
|
|
|
+ <el-form-item label="(处置后)">
|
|
|
|
+ <ImageUpload v-model="czobj.images[2]" :limit="1"></ImageUpload>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </el-col>
|
|
|
|
+ </el-row>
|
|
</el-form>
|
|
</el-form>
|
|
</div>
|
|
</div>
|
|
<template #footer>
|
|
<template #footer>
|
|
@@ -1049,7 +992,7 @@
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
-<script lang="ts" setup>
|
|
|
|
|
|
+<script setup>
|
|
import { defineComponent, ref, onMounted, watch } from "vue";
|
|
import { defineComponent, ref, onMounted, watch } from "vue";
|
|
import { useDict } from "@/utils/dict";
|
|
import { useDict } from "@/utils/dict";
|
|
// 图片预览组件
|
|
// 图片预览组件
|
|
@@ -1117,7 +1060,7 @@ const pdobj = ref({ fzbz: [], fzr: [] });
|
|
const bhobj = ref({ resonRemark: [], files: "", images: [] });
|
|
const bhobj = ref({ resonRemark: [], files: "", images: [] });
|
|
const czobj = ref({
|
|
const czobj = ref({
|
|
qsdes: "",
|
|
qsdes: "",
|
|
- images: ["","",""],
|
|
|
|
|
|
+ images: ["", "", ""],
|
|
gzldata: [],
|
|
gzldata: [],
|
|
clsbdata: [],
|
|
clsbdata: [],
|
|
hcdata: [],
|
|
hcdata: [],
|
|
@@ -1188,7 +1131,7 @@ const TaskClose = () => {
|
|
}).then((res) => {
|
|
}).then((res) => {
|
|
showbh.value = false;
|
|
showbh.value = false;
|
|
ElMessage.success("成功!");
|
|
ElMessage.success("成功!");
|
|
- gettasklist();
|
|
|
|
|
|
+ gettasklist();
|
|
});
|
|
});
|
|
};
|
|
};
|
|
const addnewitem = () => {
|
|
const addnewitem = () => {
|
|
@@ -1255,7 +1198,7 @@ const TaskXY = () => {
|
|
}).then((res) => {
|
|
}).then((res) => {
|
|
showxy.value = false;
|
|
showxy.value = false;
|
|
ElMessage.success("保存成功!");
|
|
ElMessage.success("保存成功!");
|
|
- gettasklist();
|
|
|
|
|
|
+ gettasklist();
|
|
});
|
|
});
|
|
};
|
|
};
|
|
|
|
|
|
@@ -1266,7 +1209,7 @@ const Taskdistributed = () => {
|
|
}).then((res) => {
|
|
}).then((res) => {
|
|
showpf.value = false;
|
|
showpf.value = false;
|
|
ElMessage.success("派发成功!");
|
|
ElMessage.success("派发成功!");
|
|
- gettasklist();
|
|
|
|
|
|
+ gettasklist();
|
|
});
|
|
});
|
|
};
|
|
};
|
|
// console.error(route.params.id)
|
|
// console.error(route.params.id)
|
|
@@ -1325,7 +1268,6 @@ const taskinfo = ref({
|
|
tblTaskLogList: [],
|
|
tblTaskLogList: [],
|
|
});
|
|
});
|
|
|
|
|
|
-
|
|
|
|
const gettasklist = () => {
|
|
const gettasklist = () => {
|
|
getTask(Number(route.params.id)).then((res) => {
|
|
getTask(Number(route.params.id)).then((res) => {
|
|
var templist = {};
|
|
var templist = {};
|
|
@@ -1368,7 +1310,7 @@ const gettasklist = () => {
|
|
czobj.value.images = log.images;
|
|
czobj.value.images = log.images;
|
|
}
|
|
}
|
|
} else {
|
|
} else {
|
|
- czobj.value.images = ["", "", ""]
|
|
|
|
|
|
+ czobj.value.images = ["", "", ""];
|
|
}
|
|
}
|
|
}
|
|
}
|
|
if (Array.isArray(logs1) && logs1.length > 0) {
|
|
if (Array.isArray(logs1) && logs1.length > 0) {
|
|
@@ -1378,8 +1320,65 @@ const gettasklist = () => {
|
|
if (log.czwctime) log.czwctime = moment(log.czwctime)._d;
|
|
if (log.czwctime) log.czwctime = moment(log.czwctime)._d;
|
|
xyobj.value = log;
|
|
xyobj.value = log;
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ task_work.value.map((i) => {
|
|
|
|
+ i.remark = i.remark == undefined || i.remark == null ? '' : i.remark;
|
|
|
|
+ var data = { name: i.label, unit1: i.remark };
|
|
|
|
+ if ((i.remark ?? "").split(",").length > 1) {
|
|
|
|
+ data["value1"] = '';
|
|
|
|
+ data["value2"] = '';
|
|
|
|
+ data["unit1"] = (i.remark ?? "").split(",")[0];
|
|
|
|
+ data["unit2"] = (i.remark ?? "").split(",")[1];
|
|
|
|
+ } else {
|
|
|
|
+ data["value1"] = '';
|
|
|
|
+ }
|
|
|
|
+ var temp = czobj.value.gzldata.find((p) => {
|
|
|
|
+ return p.name == data.name;
|
|
|
|
+ });
|
|
|
|
+ if (temp == undefined) {
|
|
|
|
+ czobj.value.gzldata.push(data);
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+
|
|
|
|
+ task_car.value.map((i) => {
|
|
|
|
+ i.remark = i.remark == undefined || i.remark == null ? '' : i.remark;
|
|
|
|
+ var data = { name: i.label, unit1: i.remark };
|
|
|
|
+ if ((i.remark ?? "").split(",").length > 1) {
|
|
|
|
+ data["value1"] = '';
|
|
|
|
+ data["value2"] = '';
|
|
|
|
+ data["unit1"] = (i.remark ?? "").split(",")[0];
|
|
|
|
+ data["unit2"] = (i.remark ?? "").split(",")[1];
|
|
|
|
+ } else {
|
|
|
|
+ data["value1"] = '';
|
|
|
|
+ }
|
|
|
|
+ var temp = czobj.value.clsbdata.find((p) => {
|
|
|
|
+ return p.name == data.name;
|
|
|
|
+ });
|
|
|
|
+ if (temp == undefined) {
|
|
|
|
+ czobj.value.clsbdata.push(data);
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+
|
|
|
|
+ task_consumables.value.map((i) => {
|
|
|
|
+ i.remark = i.remark == undefined || i.remark == null ? '' : i.remark;
|
|
|
|
+ var data = { name: i.label, unit1: i.remark };
|
|
|
|
+ if ((i.remark ?? "").split(",").length > 1) {
|
|
|
|
+ data["value1"] = '';
|
|
|
|
+ data["value2"] = '';
|
|
|
|
+ data["unit1"] = (i.remark ?? "").split(",")[0];
|
|
|
|
+ data["unit2"] = (i.remark ?? "").split(",")[1];
|
|
|
|
+ } else {
|
|
|
|
+ data["value1"] = '';
|
|
|
|
+ }
|
|
|
|
+ var temp = czobj.value.hcdata.find((p) => {
|
|
|
|
+ return p.name == data.name;
|
|
|
|
+ });
|
|
|
|
+ if (temp == undefined) {
|
|
|
|
+ czobj.value.hcdata.push(data);
|
|
|
|
+ }
|
|
|
|
+ });
|
|
});
|
|
});
|
|
-}
|
|
|
|
|
|
+};
|
|
|
|
|
|
onMounted(() => {
|
|
onMounted(() => {
|
|
gettasklist();
|
|
gettasklist();
|
|
@@ -1419,6 +1418,7 @@ watch(
|
|
padding-top: 20px;
|
|
padding-top: 20px;
|
|
position: relative;
|
|
position: relative;
|
|
|
|
|
|
|
|
+
|
|
// .el-select {
|
|
// .el-select {
|
|
// width: 100%;
|
|
// width: 100%;
|
|
// }
|
|
// }
|