| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684 |
- <template>
- <div class="page">
- <el-form label-width="130px">
- <div class="content-detail">
- <div class="basic-details">
- <HeaderTitle title="基本信息" size="16px"></HeaderTitle>
- <el-row>
- <el-col :span="12">
- <el-col :span="12">
- <el-form-item label="计划单号">
- <span> {{ infoData.code }} </span>
- </el-form-item>
- </el-col>
- <el-col :span="12">
- <el-form-item label="来源计划配置单号">
- <span> {{ infoData.planConfigCode }} </span>
- </el-form-item>
- </el-col>
- <!-- <el-col :span="12">
- <el-form-item label="名称">
- <span> {{ infoData.planName }} </span>
- </el-form-item>
- </el-col>
- <el-col :span="12">
- <el-form-item label="部门">
- <span>
- {{ infoData.executeGroupName }}
- </span>
- </el-form-item>
- </el-col>
- <el-col :span="12">
- <el-form-item label="人员">
- <span>
- {{ infoData.executeUserName }}
- </span>
- </el-form-item>
- </el-col> -->
- <el-col :span="12">
- <el-form-item label="计划完成时长">
- <span v-if="infoData.duration >= 0"
- >{{ infoData.duration }}分钟</span
- >
- </el-form-item>
- </el-col>
- <el-col :span="12">
- <el-form-item label="周期">
- <span v-if="infoData.ruleInfo">
- {{ infoData.ruleInfo.cycleValue
- }}{{
- getDictValue('巡点检周期', infoData.ruleInfo.cycleType)
- }}
- </span>
- </el-form-item>
- </el-col>
- <!-- <el-col :span="12">
- <el-form-item label="设备分类">
- <span> {{ infoData.categoryLevelName }} </span>
- </el-form-item>
- </el-col> -->
- <el-col :span="12">
- <el-form-item label="规则名称">
- <span>
- {{ infoData.name }}
- </span>
- </el-form-item>
- </el-col>
- <!-- <el-col :span="12">
- <el-form-item label="创建部门">
- <span> {{ infoData.createGroupName }} </span>
- </el-form-item>
- </el-col> -->
- <el-col :span="12">
- <el-form-item label="创建人">
- <span> {{ infoData.createUserName }} </span>
- </el-form-item>
- </el-col>
- <el-col :span="12">
- <el-form-item label="创建时间">
- <span> {{ infoData.createTime }} </span>
- </el-form-item>
- </el-col>
- <el-col :span="24">
- <el-form-item label="备注">
- <span> {{ infoData.remark }} </span>
- </el-form-item>
- </el-col>
- </el-col>
- </el-row>
- </div>
- <div class="maintain_equipment_info">
- <HeaderTitle title="量具设备" size="16px">
- <template
- v-if="
- taskDefinitionKey !== 'user_submit' ||
- taskDefinitionKey !== 'user_receive'
- "
- >
- <span class="normarl_num"
- >正常:{{
- infoData.planDeviceList?.length > 0
- ? infoData.planDeviceList.filter(
- (item) => item.teamLeaderResult == 1
- ).length
- : 0
- }}</span
- >
- <span class="unnormarl_num"
- >异常:{{
- infoData.planDeviceList?.length > 0
- ? infoData.planDeviceList.filter(
- (item) => item.teamLeaderResult == 2
- ).length
- : 0
- }}</span
- >
- <span class="lose_num"
- >丢失:{{
- infoData.planDeviceList?.length > 0
- ? infoData.planDeviceList.filter(
- (item) => item.teamLeaderResult == 3
- ).length
- : 0
- }}</span
- >
- </template>
- </HeaderTitle>
- <div class="maintain_equipment_info_content">
- <div class="confirmBtn">
- <el-button
- v-if="
- taskDefinitionKey === 'leader_receive' &&
- !infoData.planDeviceList[0].leaderVerifyTime
- "
- type="primary"
- @click="confirmReceive(1, 3)"
- >确定收到</el-button
- >
- <el-button
- v-if="
- taskDefinitionKey === 'team_leader_receive1' &&
- !infoData.planDeviceList[0].teamVerifyTime
- "
- @click="confirmReceive(2, 2)"
- type="primary"
- >确定收到</el-button
- >
- </div>
- <el-table :height="300" :data="infoData.planDeviceList" border>
- <el-table-column label="序号" type="index" width="50">
- </el-table-column>
- <el-table-column label="设备编码" prop="name">
- <template slot-scope="scope">
- <div>
- <span>{{ scope.row.substance.code }}</span>
- </div>
- </template>
- </el-table-column>
- <el-table-column label="编号" prop="norm">
- <template slot-scope="scope">
- <div>
- <span>{{ scope.row.substance.extInfo.codeNumber }}</span>
- </div>
- </template>
- </el-table-column>
- <el-table-column label="设备名称" prop="content">
- <template slot-scope="scope">
- <div>
- <span>{{ scope.row.substance.name }}</span>
- </div>
- </template>
- </el-table-column>
- <el-table-column label="设备型号" prop="norm">
- <template slot-scope="scope">
- <div>
- <span>{{ scope.row.substance.model }}</span>
- </div>
- </template>
- </el-table-column>
- <el-table-column label="质检" prop="qualityStatus">
- <template slot-scope="scope">
- <el-select
- v-if="
- (taskDefinitionKey === 'leader_check' &&
- infoData.logList.length == 1) ||
- taskDefinitionKey === 'user_receive'
- "
- v-model="scope.row.qualityStatus"
- placeholder="请选择"
- >
- <el-option
- v-for="item in statusOption"
- :label="item.label"
- :value="item.value"
- :key="item.value"
- >
- </el-option>
- </el-select>
- <span v-else>{{
- scope.row.qualityStatus != null
- ? statusOption.filter(
- (item) => item.value == scope.row.qualityStatus
- )[0].label
- : ''
- }}</span>
- </template>
- </el-table-column>
- <el-table-column label="是否遗失" prop="isLose">
- <template slot-scope="scope">
- <el-select
- v-if="taskDefinitionKey === 'user_submit'"
- v-model="scope.row.isLose"
- placeholder="请选择"
- >
- <el-option
- v-for="item in option"
- :label="item.label"
- :value="item.value"
- :key="item.value"
- >
- </el-option>
- </el-select>
- <span v-else>{{
- scope.row.isLose != null
- ? option.filter(
- (item) => item.value == scope.row.isLose
- )[0].label
- : ''
- }}</span>
- </template>
- </el-table-column>
- <template
- v-if="
- taskDefinitionKey !== 'user_submit' ||
- taskDefinitionKey !== 'user_receive'
- "
- >
- <el-table-column
- v-if="
- taskDefinitionKey !== 'user_submit' ||
- taskDefinitionKey !== 'user_receive'
- "
- label="上交时间"
- prop="handTime"
- ></el-table-column>
- <el-table-column
- label="负责人确认结果"
- width="260"
- prop="teamLeaderResult"
- >
- <template slot-scope="scope">
- <el-radio-group v-model="scope.row.teamLeaderResult">
- <el-radio :label="1">正常</el-radio>
- <el-radio :label="2">异常</el-radio>
- <el-radio :label="3">丢失</el-radio>
- </el-radio-group>
- </template>
- </el-table-column>
- <el-table-column
- label="负责人确认时间"
- prop="teamReceiptTime"
- ></el-table-column>
- <el-table-column
- label="量具管理员确认时间"
- prop="leaderVerifyTime"
- ></el-table-column>
- <el-table-column
- label="负责人确认收到时间"
- prop="teamVerifyTime"
- ></el-table-column>
- <el-table-column
- label="使用人收取量具时间"
- prop="harvestTime"
- ></el-table-column>
- <!-- <el-table-column label="操作" width="90">
- <template slot-scope="scope">
- <el-button
- v-if="!scope.row.teamReceiptTime"
- @click="configResult(scope.row)"
- type="primary"
- size="small"
- >确认</el-button
- >
- </template>
- </el-table-column> -->
- </template>
- </el-table>
- <!-- <div
- class="equipment_item"
- v-for="item in infoData.planDeviceList"
- :key="item.id"
- >
- <div class="equipment_info" v-if="item.substance">
- <div class="item_info">
- <span class="item_label">设备编码</span>
- <span class="item_value">{{ item.substance.code }}</span>
- </div>
- <div class="item_info">
- <span class="item_label">设备名称</span>
- <span class="item_value">{{ item.substance.name }}</span>
- </div>
- <div class="item_info">
- <span class="item_label">设备型号</span>
- <span class="item_value">{{ item.substance.model }}</span>
- </div>
- <div class="item_info">
- <span class="item_label">设备位置</span>
- <span class="item_value">{{
- item.substance.positionNames
- }}</span>
- </div>
- <div
- class="item_info"
- v-if="
- taskDefinitionKey === 'leader_check' &&
- infoData.logList.length == 1
- "
- >
- <span class="item_label">质检</span>
- <span class="item_value">
- <el-select v-model="item.status" placeholder="请选择">
- <el-option
- v-for="item in statusOption"
- :label="item.label"
- :value="item.value"
- :key="item.value"
- >
- </el-option>
- </el-select>
- </span>
- </div>
- </div>
- </div> -->
- </div>
- </div>
- <div class="ruleMatters_box">
- <HeaderTitle title="操作事项" size="16px"></HeaderTitle>
- <el-table
- :height="300"
- :data="infoData.planDeviceList[0].workItems"
- border
- >
- <el-table-column label="序号" width="50">
- <template slot-scope="scope">
- <span>{{ scope.$index + 1 }}</span>
- </template>
- </el-table-column>
- <el-table-column label="事项" prop="name" width="100">
- <template slot-scope="scope">
- <div>
- <span>{{ scope.row.name }}</span>
- </div>
- </template>
- </el-table-column>
- <el-table-column label="内容" prop="content" width="300">
- <template slot-scope="scope">
- <div>
- <span>{{ scope.row.content }}</span>
- </div>
- </template>
- </el-table-column>
- <el-table-column label="操作指导" prop="operationGuide">
- <template slot-scope="scope">
- <div class="operationGuide_box">
- <div class="left_content">
- <template v-if="scope.row.operationGuide">
- <div
- v-for="(item, index) in scope.row.operationGuide
- .toolList"
- :key="item.id"
- >{{ index + 1 }}.{{ item.name }}</div
- >
- </template>
- </div>
- <div class="line"></div>
- <div class="right_content">
- <template v-if="scope.row.operationGuide">
- <div
- v-for="(item, index) in scope.row.operationGuide
- .procedureList"
- :key="item.id"
- >{{ index + 1 }}.{{ item.content }}</div
- >
- </template>
- </div>
- </div>
- </template>
- </el-table-column>
- <el-table-column label="标准" prop="norm" width="100">
- <template slot-scope="scope">
- <div>
- <span>{{ scope.row.norm }}</span>
- </div>
- </template>
- </el-table-column>
- <el-table-column label="状态" prop="status" width="100">
- <template slot-scope="scope">
- <div>
- <span>{{ options[scope.row.status] }}</span>
- </div>
- </template>
- </el-table-column>
- <el-table-column label="结果" prop="result" width="200">
- </el-table-column>
- </el-table>
- </div>
- </div>
- </el-form>
- </div>
- </template>
- <script>
- import { EventBus } from './eventBus';
- import dictMixins from '@/mixins/dictMixins';
- import {
- processById,
- getList,
- adminVerify
- } from '@/api/bpm/components/inspectionManage/index.js';
- export default {
- name: 'measuringToolInspection_detailDialog',
- mixins: [dictMixins],
- props: {
- businessId: {
- default: ''
- },
- taskId: {
- default: ''
- },
- taskDefinitionKey: {
- default: ''
- }
- },
- data() {
- return {
- infoData: {
- planDeviceList: [
- {
- substance: {},
- workItems: []
- }
- ]
- },
- option: [
- {
- value: 0,
- label: '否'
- },
- {
- value: 1,
- label: '是'
- }
- ],
- statusOption: [
- {
- value: 0,
- label: '正常'
- },
- {
- value: 1,
- label: '异常'
- },
- {
- value: 2,
- label: '未收'
- }
- ],
- options: {
- 0: '正常',
- '-1': '缺陷'
- },
- type: {
- 1: '使用人',
- 2: '班组',
- 3: '负责人'
- }
- };
- },
- async created() {
- this.requestDict('巡点检周期');
- let type = '';
- switch (this.taskDefinitionKey) {
- case 'user_submit':
- type = 1;
- break;
- case 'team_leader_receive':
- type = 2;
- break;
- case 'team_leader_submit':
- type = 2;
- break;
- case 'leader_receive':
- type = 3;
- break;
- case 'leader_send':
- type = 3;
- break;
- case 'team_leader_receive1':
- type = 2;
- break;
- case 'team_leader_send':
- type = 2;
- break;
- case 'user_receive':
- type = 1;
- break;
- }
- processById({ id: this.businessId, type }).then(async (data) => {
- console.log(data);
- // 查询日志
- let res = await getList({
- planId: data.planId,
- node: this.taskDefinitionKey
- });
- console.log(res);
- data.logList = res.data;
- this.infoData = data;
- if (this.taskDefinitionKey == 'leader_check') {
- this.infoData.planDeviceList = this.infoData.planDeviceList.map(
- (item) => {
- return {
- ...item,
- qualityStatus: 0
- };
- }
- );
- }
- EventBus.$emit('getData', this.infoData);
- });
- },
- methods: {
- confirmReceive(confirmType, listType) {
- let params = this.infoData.planDeviceList.map((item) => {
- return {
- id: item.id,
- type: confirmType
- };
- });
- adminVerify(params).then(() => {
- processById({ id: this.businessId, type: listType }).then(
- async (data) => {
- this.infoData = data;
- this.$message.success('确认成功');
- }
- );
- });
- },
- async getTableValue() {
- return this.infoData;
- }
- }
- };
- </script>
- <style lang="scss" scoped>
- ::v-deep .el-form-item--medium .el-form-item__label {
- color: #6e6e6e;
- font-size: 14px;
- font-weight: bold;
- }
- .maintain_equipment_info {
- margin-bottom: 20px;
- .normarl_num {
- font-size: 14px !important;
- color: green;
- margin-right: 10px;
- }
- .unnormarl_num {
- font-size: 14px !important;
- color: red;
- margin-right: 10px;
- }
- .lose_num {
- font-size: 14px !important;
- color: orange;
- }
- .maintain_equipment_info_title {
- border-bottom: 1px solid #1890ff;
- padding-bottom: 3px;
- margin-bottom: 20px;
- > span {
- display: inline-block;
- line-height: 16px;
- border-left: 6px solid #1890ff;
- padding-left: 6px;
- }
- }
- .maintain_equipment_info_content {
- padding: 0 30px;
- .confirmBtn {
- display: flex;
- justify-content: flex-end;
- margin: 20px 0;
- }
- .equipment_item {
- font-size: 14px;
- padding: 15px;
- margin-bottom: 30px;
- .equipment_info {
- display: flex;
- flex-wrap: wrap;
- border: 1px solid #ddd;
- .item_info {
- width: 33.33%;
- height: 44px;
- line-height: 44px;
- display: flex;
- .item_label {
- width: 90px;
- text-align: center;
- background-color: #f2f2f2;
- font-weight: 700;
- }
- .item_value {
- border-bottom: 1px solid #f2f2f2;
- flex: 1;
- padding-left: 5px;
- }
- // &:last-child {
- // width: 100%;
- // .item_value {
- // border: 0;
- // }
- // }
- }
- }
- > p {
- margin-top: 20px;
- color: #797979;
- }
- .matter_info {
- ::v-deep .el-table {
- th.el-table__cell {
- background-color: #f2f2f2;
- padding: 0;
- }
- td.el-table__cell {
- padding: 0;
- }
- }
- }
- }
- }
- }
- .ruleMatters_box {
- height: 100%;
- display: flex;
- flex-direction: column;
- .divider {
- flex: 0 0 50px;
- .title {
- height: 35px;
- }
- }
- .el-table {
- overflow: auto;
- .operationGuide_box {
- width: 100%;
- display: flex;
- position: relative;
- .left_content {
- flex: 0 0 150px;
- padding: 10px;
- margin-right: 10px;
- overflow-y: auto;
- }
- .line {
- position: absolute;
- top: -10px;
- left: 150px;
- bottom: -10px;
- height: 110%;
- width: 1px;
- background-color: #ededed;
- }
- .right_content {
- flex: 1;
- padding: 10px;
- overflow-y: auto;
- }
- }
- }
- }
- </style>
|