xiangpei
2024-04-16 4f6b976ffd719d73812bcc645b986c1d081a564b
Merge remote-tracking branch 'origin/master'
3个文件已修改
184 ■■■■■ 已修改文件
src/api/platform/work-order.js 24 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/FileUpload/index.vue 9 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/system/work-order/index.vue 151 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/platform/work-order.js
@@ -78,3 +78,27 @@
    data: data
  })
}
// 获取工单运维情况
export function getYwCondition(data) {
  return request({
    url: '/work-order/yw-condition/' + data,
    method: 'get'
  })
}
// 获取工单运维审核记录
export function getYwAuditingList(data) {
  return request({
    url: '/work-order/yw-auditing-list/' + data,
    method: 'get'
  })
}
// 获取工单运维情况记录
export function getYwConditionList(data) {
  return request({
    url: '/work-order/yw-condition-list/' + data,
    method: 'get'
  })
}
src/components/FileUpload/index.vue
@@ -28,9 +28,12 @@
    <!-- 文件列表 -->
    <transition-group class="upload-file-list el-upload-list el-upload-list--text" name="el-fade-in-linear" tag="ul">
      <li :key="file.url" class="el-upload-list__item ele-upload-list__item-content" v-for="(file, index) in fileList">
        <el-link :href="`${baseUrl}${file.url}`" :underline="false" target="_blank">
        <el-link @click="handleDownload(file.url)" :underline="false" target="_blank">
          <span class="el-icon-document"> {{ getFileName(file.name) }} </span>
        </el-link>
        <!-- <el-link :href="`${baseUrl}${file.url}`" :underline="false" target="_blank">
          <span class="el-icon-document"> {{ getFileName(file.name) }} </span>
        </el-link> -->
        <div class="ele-upload-list__item-content-action">
          <el-link :underline="false" @click="handleDelete(index)" type="danger">删除</el-link>
        </div>
@@ -189,6 +192,10 @@
        strs += list[i].url + separator;
      }
      return strs != '' ? strs.substr(0, strs.length - 1) : '';
    },
    /** 下载按钮操作 */
    handleDownload (data) {
      this.$download.resource(data);
    }
  }
};
src/views/system/work-order/index.vue
@@ -16,6 +16,14 @@
          <el-option label="设备遗失" value="设备遗失"></el-option>
        </el-select>
      </el-form-item>
      <el-form-item label="审核状态" prop="status">
        <el-select v-model="queryParams.status" placeholder="审核状态" clearable @clear="handleQuery">
          <el-option label="已下发" value="DISTRIBUTED"></el-option>
          <el-option label="运维已处理" value="YW_HANDLE"></el-option>
          <el-option label="审核通过" value="AUDITING_SUCCESS"></el-option>
          <el-option label="审核不通过" value="AUDITING_FAIL"></el-option>
        </el-select>
      </el-form-item>
      <el-form-item label="运维处理时间">
        <el-date-picker
          clearable
@@ -131,15 +139,15 @@
        <el-form-item label="运维人员" prop="ywPeopleName">
          <el-input v-model="auditingForm.ywPeopleName" disabled />
        </el-form-item>
        <el-form-item label="现场情况">
        <el-form-item label="现场情况" v-if="auditingForm.condition">
          <el-input type="textarea" v-html="auditingForm.condition" disabled />
        </el-form-item>
        <el-form-item label="佐证材料">
        <el-form-item label="佐证材料" v-if="auditingForm.proofMaterials">
          <el-link v-for="item in auditingForm.proofMaterials != null ? auditingForm.proofMaterials.split(',') : auditingForm.proofMaterials" :underline="false" :key="item" @click="handleDownload(item)">{{ item.substring(item.lastIndexOf("/") + 1) }}</el-link>
        </el-form-item>
        <el-form-item label="审核结果" prop="auditingResult">
          <el-radio v-model="auditingForm.auditingResult" label="pass">通过</el-radio>
          <el-radio v-model="auditingForm.auditingResult" label="return">驳回</el-radio>
          <el-radio v-model="auditingForm.auditingResult" label="AUDITING_SUCCESS">通过</el-radio>
          <el-radio v-model="auditingForm.auditingResult" label="AUDITING_FAIL">驳回</el-radio>
        </el-form-item>
        <el-form-item label="审核备注" prop="auditingRemark">
          <el-input v-model="auditingForm.auditingRemark" type="textarea" maxlength="30" show-word-limit/>
@@ -152,7 +160,7 @@
    </el-dialog>
    <el-dialog title="运维情况记录" :visible.sync="ywConditionOpen" width="500px" append-to-body>
      <el-form ref="ywConditionForm" :model="ywConditionForm" :rules="ywConditionRules" label-width="80px">
      <el-form ref="form" :model="form" :rules="ywConditionRules" label-width="80px">
        <el-form-item label="工单号" prop="workOrderNo">
          <el-input v-model="ywConditionForm.workOrderNo" disabled  />
        </el-form-item>
@@ -160,13 +168,13 @@
          <el-input v-model="ywConditionForm.unitName" disabled  />
        </el-form-item>
        <el-form-item label="运维人员" prop="ywPeopleName">
          <el-input v-model="ywConditionForm.ywPeopleName" />
          <el-input v-model="ywConditionForm.ywPeopleName" disabled />
        </el-form-item>
        <el-form-item label="现场情况" prop="reportContent">
          <editor v-model="form.condition" :min-height="192"/>
        <el-form-item label="现场情况" prop="ywCondition">
          <editor v-model="form.ywCondition" :min-height="192"/>
        </el-form-item>
        <el-form-item label="佐证材料" prop="reportMaterials">
          <file-upload v-model="form.proofMaterials"/>
        <el-form-item label="佐证材料" prop="ywProofMaterials">
          <file-upload v-model="form.ywProofMaterials"/>
        </el-form-item>
      </el-form>
      <div slot="footer" class="dialog-footer">
@@ -179,7 +187,7 @@
    <!-- 过程图 -->
    <el-dialog title="过程图" :visible.sync="flowOpen" width="1200px" :close-on-click-modal="false" append-to-body>
      <div>
        <el-steps :active="2" :space="500">
        <el-steps :active="ywAuditingList.length != 0 ? 3 : ywHandleList.length != 0 ? 2 : 1" :space="500">
          <el-step title="产生工单">
            <template slot="description">
              <div>
@@ -195,88 +203,54 @@
                <div class="flow-item-x">
                  创建时间:{{flowForm.createTime}}
                </div>
                <div class="flow-item-x">
                  处理期限:<el-tag type="danger" size="small">12小时</el-tag>
                <div class="flow-item-x" v-if="flowForm.processingPeriod">
                  处理期限:<el-tag type="danger" size="small">{{ flowForm.processingPeriod }}</el-tag>
                </div>
              </div>
            </template>
          </el-step>
          <el-step title="运维处理">
            <template slot="description">
              <div class="y-item">
              <div class="y-item" v-for="(item, index) in ywHandleList">
                <div class="y-item-1">
                  <div class="flow-item-x">
                    运维状态:<el-tag type="danger" size="small">结果上报</el-tag>
                    现场情况:
                    <el-tooltip class="item" effect="dark" :content="item.ywCondition" placement="top">
                      <el-tag size="small" class="line-limit-length">{{ item.ywCondition }}</el-tag>
                    </el-tooltip>
                  </div>
                  <div class="flow-item-x">
                    运维人员:<el-tag type="danger" size="small">{{flowForm.ywPeopleName}}</el-tag>
                  </div>
                  <!-- <div class="flow-item-x">
                    <el-tag size="small" v-for="file in item.ywProofMaterials != null ? item.ywProofMaterials.split(',') : item.ywProofMaterials" :key="file" @click="handleDownload(file)">{{ file.substring(file.lastIndexOf("/") + 1) }}</el-tag>
                  </div> -->
                </div>
                <div class="y-item-2">
                  <div >
                    {{flowForm.ywHandleTime}}
                    {{ parseTime(item.createTime) }}
                  </div>
                  <div >
                    第几次:1
                    第几次:{{ index + 1 }}
                  </div>
                </div>
              </div>
              <div class="y-item">
                <div class="y-item-1">
                  <div class="flow-item-x">
                    运维状态:<el-tag type="danger" size="small">结果上报</el-tag>
                  </div>
                  <div class="flow-item-x">
                    运维人员:<el-tag type="danger" size="small">{{flowForm.ywPeopleName}}</el-tag>
                  </div>
                </div>
                <div class="y-item-2">
                  <div >
                    {{flowForm.ywHandleTime}}
                  </div>
                  <div >
                    第几次:2
                  </div>
                </div>
              </div>
            </template>
          </el-step>
          <el-step title="结果审核">
            <template slot="description">
              <div class="y-item">
              <div class="y-item" v-for="(item, index) in ywAuditingList">
                <div class="y-item-1">
                  <div class="flow-item-x">
                    审核结果:<el-tag type="danger" size="small">驳回</el-tag>
                    审核结果:<el-tag :type="item.result == '审核通过' ? 'success' : 'danger'" size="small">{{ item.result }}</el-tag>
                  </div>
                  <div class="flow-item-x">
                    审核说明:<el-tag type="danger" size="small">未成功处理</el-tag>
                    审核说明:<el-tag size="small" v-if="item.remark">{{ item.remark }}</el-tag>
                  </div>
                </div>
                <div class="y-item-2">
                  <div >
                    {{flowForm.ywHandleTime}}
                    {{ parseTime(item.createTime) }}
                  </div>
                  <div >
                    第几次:1
                  </div>
                </div>
              </div>
              <div class="y-item">
                <div class="y-item-1">
                  <div class="flow-item-x">
                    审核状态:<el-tag type="info" size="small">审核中</el-tag>
                  </div>
                  <div class="flow-item-x">
                    审核说明:
                  </div>
                </div>
                <div class="y-item-2">
                  <div >
                    {{flowForm.ywHandleTime}}
                  </div>
                  <div >
                    第几次:2
                    第几次:{{ index + 1 }}
                  </div>
                </div>
              </div>
@@ -308,13 +282,16 @@
}
</style>
<script>
import { listWorkOrder, getWorkOrder, delWorkOrder, addWorkOrder, updateWorkOrder,auditing, ywCondition } from "@/api/platform/work-order";
import { listWorkOrder, getWorkOrder, delWorkOrder, addWorkOrder, updateWorkOrder,auditing, ywCondition, getYwCondition, getYwConditionList, getYwAuditingList } from "@/api/platform/work-order";
import { addReport } from "@/api/platform/report";
export default {
  name: "Work-order",
  components: {
  },
  data() {
    return {
      ywHandleList: [],
      ywAuditingList: [],
      reportFormRules: {
        reportContent: [
          { required: true, message: "报备内容不能为空", trigger: "blur" }
@@ -326,7 +303,7 @@
      reportOpen: false,
      reportForm: {
        reportType: "事后报备",
        pointId: "琼于镇3街1号摄像头",
        pointId: "",
        errorType: "",
        reportContent: "",
        reportMaterials: ""
@@ -423,7 +400,7 @@
    submitReportForm() {
      this.$refs["reportForm"].validate(valid => {
        if (valid) {
          addReport(this.form).then(response => {
          addReport(this.reportForm).then(response => {
            this.$modal.msgSuccess("成功提交报备");
            this.open = false;
            this.getList();
@@ -439,14 +416,20 @@
    // 审核按钮
    handleAuditing(row) {
      this.auditingForm = row;
      this.auditingForm.condition = '设备异常遮挡,现场修复完成'
      this.auditingForm.proofMaterials = '30路由配置_20240411101816A008.png'
      this.auditingOpen = true;
      getYwCondition(row.id).then(response => {
        if (response.data) {
          this.auditingForm.condition = response.data.ywCondition;
          this.auditingForm.proofMaterials = response.data.ywProofMaterials;
        }
        this.auditingOpen = true;
      });
    },
    // 运维情况按钮
    handleYwCondition(row) {
      this.form = {};
      this.ywConditionForm = row;
      this.ywConditionOpen = true;
      this.form.id = row.id;
    },
    // 运维结果按钮
    handleYwResult(row) {
@@ -460,8 +443,18 @@
    },
    // 过程图查看
    handleFlow(row) {
      this.flowOpen = true;
      this.flowForm = row;
      getYwAuditingList(row.id).then(response => {
        if (response.data) {
          this.ywAuditingList = response.data;
        }
      });
      getYwConditionList(row.id).then(response => {
        if (response.data) {
          this.ywHandleList = response.data;
        }
        this.flowOpen = true;
      });
    },
    // 提交审核
    submitAuditing() {
@@ -470,6 +463,7 @@
          auditing(this.auditingForm).then(res => {
            this.auditingOpen = false;
            this.$modal.msgSuccess("操作成功");
            this.getList();
          })
        }
      })
@@ -507,11 +501,12 @@
    },
    // 提交运维情况
    submitYwCondition() {
      this.$refs["ywConditionForm"].validate(valid => {
      this.$refs["form"].validate(valid => {
        if (valid) {
          ywCondition(this.ywConditionForm).then(res => {
          ywCondition(this.form).then(res => {
            this.ywConditionOpen = false;
            this.$modal.msgSuccess("操作成功");
            this.getList();
          })
        }
      })
@@ -540,10 +535,9 @@
    getList() {
      this.loading = true;
      this.queryParams.params = {};
      if (null != this.daterangeYwHandleTime && '' != this.daterangeYwHandleTime) {
        this.queryParams["start"] = this.daterangeYwHandleTime[0];
        this.queryParams["end"] = this.daterangeYwHandleTime[1];
      }
      this.queryParams["start"] = this.daterangeYwHandleTime[0];
      this.queryParams["end"] = this.daterangeYwHandleTime[1];
      if (this.queryParams["status"] == "") { this.queryParams["status"] = "DISTRIBUTED"; }
      listWorkOrder(this.queryParams).then(response => {
        this.workOrderList = response.data;
        this.total = response.total;
@@ -673,4 +667,11 @@
  height: 150px;
  padding: 10px;
}
.line-limit-length {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  width: 200px;
}
</style>