wenhongquan hace 3 años
padre
commit
9e409a3ee6

+ 12 - 1
src/views/mb/task/detail/index.vue

@@ -66,7 +66,18 @@
             <van-col :span="12"
               >投诉人电话:{{ taskinfo.taskComplainConnect }}</van-col
             >
-            <van-col :span="12">上报人:{{ taskinfo.taskReporter }}</van-col>
+            <van-col :span="12"
+              >接单人:{{
+                allusers
+                  .filter(
+                    (i) =>
+                      [taskinfo.taskReporter + ""].indexOf(i.userId + "") != -1
+                  )
+                  .map((i) => i.nickName)
+                  .join(",")
+              }}</van-col
+            >
+            <!-- <van-col :span="12">上报人:{{ taskinfo.taskReporter }}</van-col> -->
           </van-row>
           <van-row>
             <van-col :span="24">详细地址:{{ taskinfo.taskAddr }}</van-col>

+ 197 - 3
src/views/mb/task/disposal/index.vue

@@ -69,6 +69,120 @@
               label="公里数"
               placeholder="请输入公里数"
             />
+
+
+            <van-tabs v-model:active="activeName">
+              <van-tab title="工作量" name="1">
+                <van-row>
+                  <van-col :span="24" v-for="item in czobj.gzldata">
+                    <div style="margin-bottom:10px">
+                       <van-row>
+                      <!-- <van-col :span="8"><div style="text-align: right;padding-right:6px">{{ item.name }}:</div></van-col> -->
+                      <van-col :span="item.hasOwnProperty('value2') ? 16 : 24">
+                        <van-field
+                          v-model="item.value1"
+                          placeholder="请输入"
+                          :label="item.name"
+                        >
+                          <template #button v-if="item.unit1!==''">{{
+                            item.unit1
+                          }}</template></van-field
+                        >
+                      </van-col>
+                      <van-col :span="8" v-if="item.hasOwnProperty('value2')">
+                        <div style="padding-left:5px">
+                           <van-field
+                          v-if="item.hasOwnProperty('value2')"
+                          v-model="item.value2"
+                          placeholder="请输入"
+                        >
+                          <template #button v-if="item.unit2!==''">{{
+                            item.unit2
+                          }}</template></van-field>
+                        </div>
+                      </van-col>
+                    </van-row>
+
+                    </div>
+                  </van-col>
+
+                </van-row>
+              </van-tab>
+              <van-tab title="车辆设备" name="2">
+                 <van-row>
+                  <van-col :span="24" v-for="item in czobj.clsbdata">
+                    <div style="margin-bottom:10px">
+                       <van-row>
+                      <!-- <van-col :span="8"><div style="text-align: right;padding-right:6px">{{ item.name }}:</div></van-col> -->
+                      <van-col :span="item.hasOwnProperty('value2') ? 16 : 24">
+                        <van-field
+                          v-model="item.value1"
+                          placeholder="请输入"
+                          :label="item.name"
+                        >
+                          <template #button v-if="item.unit1!==''">{{
+                            item.unit1
+                          }}</template></van-field
+                        >
+                      </van-col>
+                      <van-col :span="8" v-if="item.hasOwnProperty('value2')">
+                        <div style="padding-left:5px">
+                           <van-field
+                          v-if="item.hasOwnProperty('value2')"
+                          v-model="item.value2"
+                          placeholder="请输入"
+                        >
+                          <template #button v-if="item.unit2!==''">{{
+                            item.unit2
+                          }}</template></van-field>
+                        </div>
+                      </van-col>
+                    </van-row>
+
+                    </div>
+                  </van-col>
+
+                </van-row>
+              </van-tab>
+              <van-tab title="耗材" name="3">
+                 <van-row>
+                  <van-col :span="24" v-for="item in czobj.hcdata">
+                    <div style="margin-bottom:10px">
+                       <van-row>
+                      <!-- <van-col :span="8"><div style="text-align: right;padding-right:6px">{{ item.name }}:</div></van-col> -->
+                      <van-col :span="item.hasOwnProperty('value2') ? 16 : 24">
+                        <van-field
+                          v-model="item.value1"
+                          placeholder="请输入"
+                          :label="item.name"
+                        >
+                          <template #button v-if="item.unit1!==''">{{
+                            item.unit1
+                          }}</template></van-field
+                        >
+                      </van-col>
+                      <van-col :span="8" v-if="item.hasOwnProperty('value2')">
+                        <div style="padding-left:5px">
+                           <van-field
+                          v-if="item.hasOwnProperty('value2')"
+                          v-model="item.value2"
+                          placeholder="请输入"
+                        >
+                          <template #button v-if="item.unit2!==''">{{
+                            item.unit2
+                          }}</template></van-field>
+                        </div>
+                      </van-col>
+                    </van-row>
+
+                    </div>
+                  </van-col>
+
+                </van-row>
+              </van-tab>
+            </van-tabs>
+
+
             <van-field
               v-model="czobj.images[0]"
               name="处置前照片"
@@ -171,13 +285,19 @@ import {
 } from "@/api/system/user";
 
 const {
- sys_area,
+  sys_area,
+  task_work,
+  task_car,
+  task_consumables,
 } = useDict(
-  "sys_area"
+  "sys_area",
+  "task_work",
+  "task_car",
+  "task_consumables"
 );
 
 
-
+const activeName = "1";
 const route = useRoute();
 
 const bhobj = ref({ resonRemark: [], files: "", images: [] });
@@ -211,6 +331,16 @@ try {
       } else {
          czobj.value.images = ["", "", ""]
       }
+      if (!czobj.value.hasOwnProperty('gzldata')) {
+        czobj.value.gzldata = [];
+      }
+      if (!czobj.value.hasOwnProperty('clsbdata')) {
+        czobj.value.clsbdata = [];
+      }
+      if (!czobj.value.hasOwnProperty('hcdata')) {
+        czobj.value.hcdata = [];
+      }
+
     }
   } else {
     Toast.fail("未查到任务");
@@ -372,6 +502,70 @@ const onSubmit = async () => {
 const onClickLeft = () => {
   router.back();
 };
+
+watch(() => task_work.value, () => {
+  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);
+      }
+      });
+})
+
+watch(() => task_car.value, () => {
+  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);
+      }
+      });
+})
+
+watch(() => task_consumables.value, () => {
+  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(() => {
   formlocation.value.addr = taskinfo.value.taskAddr;
   formlocation.value.locations = taskinfo.value.taskLocation;

+ 134 - 66
src/views/mb/task/index.vue

@@ -69,9 +69,23 @@
                           }}
                         </div></van-col
                       >
-                      <van-col span="12">
-                        <div>联系人:{{ item.taskReporter }}</div></van-col
+
+                      <van-col :span="12"
+                        >接单人:{{
+                          allusers
+                            .filter(
+                              (i) =>
+                                [item.taskReporter + ""].indexOf(
+                                  i.userId + ""
+                                ) != -1
+                            )
+                            .map((i) => i.nickName)
+                            .join(",")
+                        }}</van-col
                       >
+                      <!-- <van-col span="12">
+                        <div>接单人:{{ item.taskReporter }}</div></van-col
+                      > -->
                       <van-col span="12"
                         ><div>
                           联系方式:{{ item.taskComplainConnect }}
@@ -81,25 +95,70 @@
                         ><div>任务内容: {{ item.taskContent }}</div></van-col
                       >
                     </van-row>
-                    <van-row v-if="item.status == 2 && ((item.tblTaskLogList??[]).filter(i=>i.taskStatus==-1).length<1)">
-                        <van-col span="24">
-                         <div style="text-align:right">
-                            <van-button type="primary" size="small" @click.stop="receivetask(item)">接收任务</van-button>
-                          </div>
-                        </van-col>
+                    <van-row
+                      v-if="
+                        item.status == 2 &&
+                        (item.tblTaskLogList ?? []).filter(
+                          (i) => i.taskStatus == -1
+                        ).length < 1
+                      "
+                    >
+                      <van-col span="24">
+                        <div style="text-align: right">
+                          <van-button
+                            type="primary"
+                            size="small"
+                            @click.stop="receivetask(item)"
+                            >接收任务</van-button
+                          >
+                        </div>
+                      </van-col>
                     </van-row>
 
-
-                     <van-row v-if="item.status == 2 && (gettaskitemlogdes(item,-1)??{}).zyfzr === getters.userId">
-                        <van-col span="24">
-                         <div style="text-align:right">
-                          <van-button v-if="(gettaskitemlogdes(item,-1)??{}).ddxctime ==='' " type="primary" size="small" @click.stop="daoda(item)" style="margin-right:10px">到达现场</van-button>
-                          <van-button v-if="(gettaskitemlogdes(item,-1)??{}).ddxctime !=='' " type="primary" size="small" @click.stop="bhfk(item)" style="margin-right:10px">驳回反馈</van-button>
-                          <van-button v-if="(gettaskitemlogdes(item,-1)??{}).ddxctime !=='' " type="primary" size="small" @click.stop="czfk(item)">处置反馈</van-button>
-                          </div>
-                        </van-col>
+                    <van-row
+                      v-if="
+                        item.status == 2 &&
+                        (gettaskitemlogdes(item, -1) ?? {}).zyfzr ===
+                          getters.userId
+                      "
+                    >
+                      <van-col span="24">
+                        <div style="text-align: right">
+                          <van-button
+                            v-if="
+                              (gettaskitemlogdes(item, -1) ?? {}).ddxctime ===
+                              ''
+                            "
+                            type="primary"
+                            size="small"
+                            @click.stop="daoda(item)"
+                            style="margin-right: 10px"
+                            >到达现场</van-button
+                          >
+                          <van-button
+                            v-if="
+                              (gettaskitemlogdes(item, -1) ?? {}).ddxctime !==
+                              ''
+                            "
+                            type="primary"
+                            size="small"
+                            @click.stop="bhfk(item)"
+                            style="margin-right: 10px"
+                            >驳回反馈</van-button
+                          >
+                          <van-button
+                            v-if="
+                              (gettaskitemlogdes(item, -1) ?? {}).ddxctime !==
+                              ''
+                            "
+                            type="primary"
+                            size="small"
+                            @click.stop="czfk(item)"
+                            >处置反馈</van-button
+                          >
+                        </div>
+                      </van-col>
                     </van-row>
-
                   </div>
                 </div>
               </div>
@@ -125,19 +184,23 @@ import {
 } from "@/api/system/task";
 import { Toast } from "vant";
 import moment from "moment";
+import {
+  changeUserStatus,
+  listUser,
+  resetUserPwd,
+  delUser,
+  getUser,
+  updateUser,
+  addUser,
+} from "@/api/system/user";
 
 const tasklist = ref([]);
 const loading = ref(false);
 const finished = ref(false);
 const refreshing = ref(false);
 
-
-const { task_status, task_event_category, task_event_type,task_type } = useDict(
-  "task_status",
-  "task_event_category",
-  "task_event_type",
-  "task_type"
-);
+const { task_status, task_event_category, task_event_type, task_type } =
+  useDict("task_status", "task_event_category", "task_event_type", "task_type");
 
 const bodyheight = ref(0);
 bodyheight.value = document.body.clientHeight - 48 - 46;
@@ -201,10 +264,9 @@ const onClickLeft = () => {
   router.back();
 };
 const onClickRight = () => {
-  router.push("/mb/task/add")
+  router.push("/mb/task/add");
 };
 
-
 const xyobj = ref({
   bzxytime: "",
   ddxctime: "",
@@ -221,56 +283,63 @@ const xyobj = ref({
 const store = useStore();
 const getters = computed(() => store.getters);
 
-
+const allusers = ref([]);
+listUser({ pageSize: 1000 }).then((res) => {
+  allusers.value = res.rows;
+});
 
 const gettaskitemlogdes = (item, status) => {
-   var templist = {};
-    var list = item.tblTaskLogList;
-    for (var i in list) {
-      var log = list[i];
-      if (templist.hasOwnProperty(log.taskStatus + "")) {
-        if (
-          moment(templist[log.taskStatus + ""].createTime).unix() -
-            moment(log.createTime).unix() <
-          0
-        ) {
-          templist[log.taskStatus + ""] = log;
-        }
-      } else {
+  var templist = {};
+  var list = item.tblTaskLogList;
+  for (var i in list) {
+    var log = list[i];
+    if (templist.hasOwnProperty(log.taskStatus + "")) {
+      if (
+        moment(templist[log.taskStatus + ""].createTime).unix() -
+          moment(log.createTime).unix() <
+        0
+      ) {
         templist[log.taskStatus + ""] = log;
       }
+    } else {
+      templist[log.taskStatus + ""] = log;
     }
-    var lists = [];
-    for (var i in templist) {
-      lists.push(templist[i]);
-    }
-  if (templist[status + ""] == null || templist[status + ""] == undefined || templist[status + ""] == "") return null;
+  }
+  var lists = [];
+  for (var i in templist) {
+    lists.push(templist[i]);
+  }
+  if (
+    templist[status + ""] == null ||
+    templist[status + ""] == undefined ||
+    templist[status + ""] == ""
+  )
+    return null;
   return JSON.parse(templist[status + ""].logDes);
-}
+};
 
 const receivetask = (item) => {
-
   var logc = gettaskitemlogdes(item, -1);
-  if (logc !=null) {
+  if (logc != null) {
     xyobj.value = logc;
   }
 
   xyobj.value.bzxytime = moment().format("YYYY-MM-DD HH:mm:ss");
   xyobj.value.zyfzr = getters.value.userId;
-  console.log(xyobj.value)
-   ddTask({
+  console.log(xyobj.value);
+  ddTask({
     taskId: item.taskId,
     taskStatus: -1,
-    logDes: JSON.stringify(xyobj.value)
-   }).then(res => {
+    logDes: JSON.stringify(xyobj.value),
+  }).then((res) => {
     Toast.success("成功");
     onRefresh();
-  })
-}
+  });
+};
 
 const daoda = (item) => {
-   var logc = gettaskitemlogdes(item, -1);
-  if (logc !=null) {
+  var logc = gettaskitemlogdes(item, -1);
+  if (logc != null) {
     xyobj.value = logc;
   }
   xyobj.value.ddxctime = moment().format("YYYY-MM-DD HH:mm:ss");
@@ -279,22 +348,21 @@ const daoda = (item) => {
   ddTask({
     taskId: item.taskId,
     taskStatus: -1,
-    logDes: JSON.stringify(xyobj.value)
-   }).then(res => {
+    logDes: JSON.stringify(xyobj.value),
+  }).then((res) => {
     Toast.success("成功");
     onRefresh();
-  })
-}
+  });
+};
 const czfk = (item) => {
   localStorage.setItem("currenttask", JSON.stringify(item));
-  router.push(`/mb/task/disposal?id=${item.taskId}`)
-}
+  router.push(`/mb/task/disposal?id=${item.taskId}`);
+};
 
 const bhfk = (item) => {
   localStorage.setItem("currenttask", JSON.stringify(item));
-  router.push(`/mb/task/disposal?bh=1&id=${item.taskId}`)
-}
-
+  router.push(`/mb/task/disposal?bh=1&id=${item.taskId}`);
+};
 </script>
 
 <style lang="scss">

+ 187 - 187
src/views/task/detail/index.vue

@@ -848,195 +848,138 @@
           </el-form-item>
 
           <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-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 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 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-form-item>
           <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="(处置中)">
-            <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>
       </div>
       <template #footer>
@@ -1049,7 +992,7 @@
   </div>
 </template>
 
-<script lang="ts" setup>
+<script setup>
 import { defineComponent, ref, onMounted, watch } from "vue";
 import { useDict } from "@/utils/dict";
 // 图片预览组件
@@ -1117,7 +1060,7 @@ const pdobj = ref({ fzbz: [], fzr: [] });
 const bhobj = ref({ resonRemark: [], files: "", images: [] });
 const czobj = ref({
   qsdes: "",
-  images: ["","",""],
+  images: ["", "", ""],
   gzldata: [],
   clsbdata: [],
   hcdata: [],
@@ -1188,7 +1131,7 @@ const TaskClose = () => {
   }).then((res) => {
     showbh.value = false;
     ElMessage.success("成功!");
-     gettasklist();
+    gettasklist();
   });
 };
 const addnewitem = () => {
@@ -1255,7 +1198,7 @@ const TaskXY = () => {
   }).then((res) => {
     showxy.value = false;
     ElMessage.success("保存成功!");
-     gettasklist();
+    gettasklist();
   });
 };
 
@@ -1266,7 +1209,7 @@ const Taskdistributed = () => {
   }).then((res) => {
     showpf.value = false;
     ElMessage.success("派发成功!");
-     gettasklist();
+    gettasklist();
   });
 };
 // console.error(route.params.id)
@@ -1325,7 +1268,6 @@ const taskinfo = ref({
   tblTaskLogList: [],
 });
 
-
 const gettasklist = () => {
   getTask(Number(route.params.id)).then((res) => {
     var templist = {};
@@ -1368,7 +1310,7 @@ const gettasklist = () => {
           czobj.value.images = log.images;
         }
       } else {
-         czobj.value.images = ["", "", ""]
+        czobj.value.images = ["", "", ""];
       }
     }
     if (Array.isArray(logs1) && logs1.length > 0) {
@@ -1378,8 +1320,65 @@ const gettasklist = () => {
       if (log.czwctime) log.czwctime = moment(log.czwctime)._d;
       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(() => {
   gettasklist();
@@ -1419,6 +1418,7 @@ watch(
   padding-top: 20px;
   position: relative;
 
+
   // .el-select {
   //   width: 100%;
   // }