From 706f7a1328df01219b663826bd5c6e8ebb0ef185 Mon Sep 17 00:00:00 2001
From: MrShi <1878285526@qq.com>
Date: 星期六, 27 一月 2024 11:42:56 +0800
Subject: [PATCH] Mr.Shi
---
platform/src/components/business/dispatchUnitDetails.vue | 261 ++++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 261 insertions(+), 0 deletions(-)
diff --git a/platform/src/components/business/dispatchUnitDetails.vue b/platform/src/components/business/dispatchUnitDetails.vue
new file mode 100644
index 0000000..3913223
--- /dev/null
+++ b/platform/src/components/business/dispatchUnitDetails.vue
@@ -0,0 +1,261 @@
+<template>
+ <GlobalWindow
+ :title="title"
+ :visible.sync="visible"
+ :confirm-working="isWorking"
+ @confirm="confirm"
+ >
+ <div class="info">
+ <div class="info_list">
+ <div class="info_list_item">
+ <div class="info_list_item_label">娲鹃仯鍗曚綅锛�</div>
+ <div class="info_list_item_val">{{form.name}}</div>
+ </div>
+ <div class="info_list_item">
+ <div class="info_list_item_label">娲鹃仯鍗曚綅淇$敤浠g爜锛�</div>
+ <div class="info_list_item_val">{{form.code}}</div>
+ </div>
+ <div class="info_list_item">
+ <div class="info_list_item_label">娲鹃仯鍗曚綅鐘舵�侊細</div>
+ <div class="info_list_item_val" v-if="form.unitStatus === 0">寰呭鏍�</div>
+ <div class="info_list_item_val" style="color: green;" v-if="form.unitStatus === 1">瀹℃牳閫氳繃</div>
+ <div class="info_list_item_val" style="color: red;" v-if="form.unitStatus === 2">瀹℃牳涓嶉�氳繃</div>
+ </div>
+ <div class="info_list_item">
+ <div class="info_list_item_label">娲鹃仯鍗曚綅璇﹁堪锛�</div>
+ <div class="info_list_item_val">{{form.content}}</div>
+ </div>
+ </div>
+ <div class="info_btns">
+ <el-button type="primary">淇敼娲鹃仯鍗曚綅</el-button>
+ <el-button type="primary">娣诲姞宸ョ</el-button>
+ </div>
+ <div class="info_table">
+ <div class="info_table_item" v-for="(item, index) in form.duSolutionList" :key="index">
+ <div class="info_table_item_label">淇濋櫓鏂规锛歿{item.solutionName}}</div>
+ <div class="info_table_item_content">
+ <el-table
+ :data="item.duWorktypeList"
+ border
+ style="width: 100%">
+ <el-table-column label="搴忓彿" width="80px">
+ <template slot-scope="scope">
+ <span>{{scope.$index + 1}}</span>
+ </template>
+ </el-table-column>
+ <el-table-column
+ prop="workTypeName"
+ label="鎵�灞炲伐绉�">
+ </el-table-column>
+ <el-table-column
+ prop="name"
+ label="鎿嶄綔瑙嗛">
+ <template slot-scope="{row}">
+ <video loop controls width="150px" height="150px" :src="row.videoUrlFull"></video>
+ </template>
+ </el-table-column>
+ <el-table-column
+ prop="checkDate"
+ label="瀹℃牳閫氳繃鏃ユ湡">
+ </el-table-column>
+ <el-table-column
+ label="鐘舵��">
+ <template slot-scope="{row}">
+ <span v-if="row.status === 0">寰呭鏍�</span>
+ <span v-if="row.status === 1">瀹℃牳閫氳繃</span>
+ <span v-if="row.status === 2">瀹℃牳涓嶉�氳繃</span>
+ </template>
+ </el-table-column>
+ <el-table-column
+ label="鎿嶄綔">
+ <template slot-scope="scope">
+ <el-button type="text" style="color: red;" v-if="scope.row.status === 2" @click="dele(scope.row.id, index, scope.$index)">鍒犻櫎</el-button>
+ </template>
+ </el-table-column>
+ </el-table>
+ </div>
+ </div>
+ </div>
+ <div class="info_status">
+ <div class="info_status_label">瀹℃牳娴佺▼</div>
+ <div class="info_status_list">
+ <el-timeline :reverse="reverse">
+ <el-timeline-item
+ v-for="(activity, index) in form.duLogList"
+ :key="index">
+ <div style="display: flex; flex-direction: column;">
+ <span style="font-size: 16px; font-weight: 400; color: black;">
+ {{activity.title}}
+ <span style="font-size: 16px; font-weight: 400; color: black; margin-left: 10px;" v-if="activity.objType === 5 || activity.objType === 6 || activity.objType === 1 || activity.objType === 2">
+ 鎻愪氦鎰忚: -
+ </span>
+ </span>
+ <span style="margin-top: 5px; font-size: 12px; font-weight: 400; color: #999999;">
+ 鎿嶄綔鍛�-{{activity.creatorName}}锛坽{activity.companyName}}锛墈{activity.createDate}}
+ </span>
+ </div>
+ </el-timeline-item>
+ </el-timeline>
+ </div>
+ </div>
+ </div>
+ </GlobalWindow>
+</template>
+
+<script>
+ import BaseOpera from '@/components/base/BaseOpera'
+ import GlobalWindow from '@/components/common/GlobalWindow'
+ import { getById } from '@/api/business/dispatchUnit'
+ import { deleteById } from '@/api/business/duWorktype'
+ export default {
+ name: 'OperaDispatchUnitWindow',
+ extends: BaseOpera,
+ components: { GlobalWindow },
+ data () {
+ return {
+ // 琛ㄥ崟鏁版嵁
+ form: {
+ id: null,
+ name: '',
+ code: '',
+ content: '',
+ unitStatus: '',
+ duLogList: [],
+ duSolutionList: [],
+ saveDuSolutionDTOList: [
+ {
+ id: '',
+ saveDuWorkTypeDTOList: [
+ {
+ videoUrl: '',
+ workTypeId: '',
+ file: {
+ videourl: '',
+ videourlfull: ''
+ }
+ }
+ ],
+ typeWork: [],
+ solutionId: ''
+ }
+ ]
+ },
+ tableData: [],
+ insuranceScheme: [],
+ reverse: true,
+ activities: [{
+ content: '娲诲姩鎸夋湡寮�濮�',
+ timestamp: '2018-04-15'
+ }, {
+ content: '閫氳繃瀹℃牳',
+ timestamp: '2018-04-13'
+ }, {
+ content: '鍒涘缓鎴愬姛',
+ timestamp: '2018-04-11'
+ }]
+ }
+ },
+ created () {
+ this.config({
+ api: '/business/dispatchUnit',
+ 'field.id': 'id'
+ })
+ },
+ methods: {
+ dele (id, b, c) {
+ this.$confirm('姝ゆ搷浣滃皢姘镐箙鍒犻櫎璇ュ伐绉�, 鏄惁缁х画?', '鎻愮ず', {
+ confirmButtonText: '纭畾',
+ cancelButtonText: '鍙栨秷',
+ type: 'warning'
+ }).then(() => {
+ deleteById(id)
+ .then(res => {
+ this.$message.success('鍒犻櫎鎴愬姛')
+ this.getDetails()
+ })
+ }).catch(() => {
+
+ });
+ },
+ open (title, target) {
+ this.title = title
+ this.form.id = target.id
+ this.visible = true
+ this.getDetails()
+ },
+ async getDetails() {
+ let res = await getById(this.form.id)
+ for (const key in this.form) {
+ this.form[key] = res[key]
+ }
+ }
+ }
+ }
+</script>
+
+<style lang="scss" scoped>
+ .info {
+ width: 100%;
+ .info_list {
+ width: 100%;
+ display: flex;
+ align-items: center;
+ flex-wrap: wrap;
+ .info_list_item {
+ width: 33.3%;
+ display: flex;
+ align-items: center;
+ margin-bottom: 15px;
+ .info_list_item_label {
+ flex-shrink: 0;
+ width: 150px;
+ font-size: 14px;
+ color: black;
+ }
+ .info_list_item_val {
+ flex: 1;
+ font-size: 14px;
+ color: black;
+ }
+ }
+ }
+ .info_btns {
+ width: 100%;
+ display: flex;
+ align-items: center;
+ margin-bottom: 15px;
+ }
+ .info_table {
+ width: 100%;
+ display: flex;
+ flex-direction: column;
+ margin-bottom: 15px;
+ .info_table_item {
+ width: 100%;
+ display: flex;
+ flex-direction: column;
+ margin-bottom: 15px;
+ &:last-child {
+ margin: 0 !important;
+ }
+ .info_table_item_label {
+ font-size: 14px;
+ color: black;
+ margin-bottom: 10px;
+ }
+ .info_table_item_content {
+ width: 100%;
+ }
+ }
+ }
+ .info_status {
+ width: 100%;
+ .info_status_label {
+ width: 100%;
+ font-size: 18px;
+ font-weight: bold;
+ margin-bottom: 15px;
+ }
+ }
+ }
+</style>
--
Gitblit v1.9.3