2022-06-28 11:29:38 +08:00
|
|
|
<template>
|
|
|
|
<el-dialog
|
|
|
|
v-dialogDrag
|
|
|
|
class="dispatcher-cmd chengdou-03__systerm"
|
|
|
|
:title="title"
|
|
|
|
:visible.sync="show"
|
2022-10-08 18:25:12 +08:00
|
|
|
width="1300px"
|
2022-06-28 11:29:38 +08:00
|
|
|
:before-close="doClose"
|
|
|
|
:z-index="2010"
|
|
|
|
:modal="false"
|
|
|
|
:close-on-click-modal="false"
|
|
|
|
append-to-body
|
|
|
|
>
|
|
|
|
<div class="main">
|
|
|
|
<el-row style="height: 100%;">
|
2022-10-08 18:25:12 +08:00
|
|
|
<el-col :span="6" style="height: 100%;">
|
2022-06-28 11:29:38 +08:00
|
|
|
<div class="left">
|
2022-06-29 10:36:57 +08:00
|
|
|
<el-tabs v-model="activeTab" type="border-card" @tab-click="tabClick">
|
2022-06-28 11:29:38 +08:00
|
|
|
<el-tab-pane label="操作" name="operate">
|
|
|
|
<div class="operate-box">
|
2022-06-30 18:13:23 +08:00
|
|
|
<div class="create-cmd">
|
2022-07-07 15:14:42 +08:00
|
|
|
<!-- <span>数据库正常</span> -->
|
2022-07-07 15:03:41 +08:00
|
|
|
<div>
|
2022-10-08 18:25:12 +08:00
|
|
|
<!-- <el-input-number v-model="numTime" controls-position="right" :min="1" :max="24" size="mini" style="width: 83px" /> -->
|
2022-07-07 15:03:41 +08:00
|
|
|
<el-select v-model="numTime" placeholder="请选择" style="width: 66px;">
|
|
|
|
<el-option label="24" value="24" />
|
|
|
|
<el-option label="12" value="12" />
|
|
|
|
</el-select>
|
|
|
|
<span>小时</span>
|
|
|
|
</div>
|
|
|
|
<span style="width: 85px; font-weight: bold; text-align: end;">{{ getSimulationTime }}</span>
|
|
|
|
</div>
|
|
|
|
<div class="create-cmd">
|
2022-07-07 15:14:42 +08:00
|
|
|
<!-- <span>通信正常</span> -->
|
2022-07-07 15:03:41 +08:00
|
|
|
<el-button type="primary" @click="refreshSearch">刷新</el-button>
|
|
|
|
<el-button type="primary" style="width: 100px" @click="createCmd">新建调度命令</el-button>
|
|
|
|
</div>
|
|
|
|
<div class="box-title">
|
|
|
|
<div class="contant-null" />
|
|
|
|
<div class="contant-text">缓存命令</div>
|
|
|
|
<div class="contant-icon" @click="active1=!active1">
|
|
|
|
<i v-if="active1" class="el-icon-arrow-down" />
|
|
|
|
<i v-else class="el-icon-arrow-up" />
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div v-show="active1" class="left-table1">
|
2022-10-08 18:25:12 +08:00
|
|
|
<el-table ref="table1" :data="cacheTableData" border style="width: 100%" height="100" highlight-current-row @current-change="handleCurrentChange($event, 'table1')">
|
|
|
|
<el-table-column prop="number" label="命令号" width="80" />
|
|
|
|
<el-table-column prop="transferNumber" label="识别号" width="80" />
|
2022-07-07 15:03:41 +08:00
|
|
|
<el-table-column prop="title" label="命令标题" show-overflow-tooltip />
|
2022-10-08 18:25:12 +08:00
|
|
|
<el-table-column prop="sendTime" label="接收单位" show-overflow-tooltip width="160">
|
2022-07-07 15:03:41 +08:00
|
|
|
<template slot-scope="scope">
|
2022-10-08 18:25:12 +08:00
|
|
|
<span style="margin-left: 10px">{{ JoinDeviceNameStr(scope.row.receiverInfos) || '' }}</span>
|
2022-07-07 15:03:41 +08:00
|
|
|
</template>
|
|
|
|
</el-table-column>
|
2022-10-08 18:25:12 +08:00
|
|
|
<el-table-column prop="senderName" label="发令人" />
|
|
|
|
<el-table-column prop="companyOfSender" label="发令单位" />
|
2022-07-07 15:03:41 +08:00
|
|
|
<el-table-column label="命令类型" width="100">
|
|
|
|
<template slot-scope="scope">
|
|
|
|
<span style="margin-left: 10px">{{ typeObj[scope.row.type] || '' }}</span>
|
|
|
|
</template>
|
|
|
|
</el-table-column>
|
|
|
|
<el-table-column prop="content" label="命令正文" show-overflow-tooltip />
|
|
|
|
</el-table>
|
|
|
|
</div>
|
|
|
|
<div class="box-title">
|
|
|
|
<div class="contant-null" />
|
|
|
|
<div class="contant-text">接受命令</div>
|
|
|
|
<div class="contant-icon" @click="active2=!active2">
|
|
|
|
<i v-if="active2" class="el-icon-arrow-down" />
|
|
|
|
<i v-else class="el-icon-arrow-up" />
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div v-show="active2" class="left-table1">
|
2022-10-08 18:25:12 +08:00
|
|
|
<el-table ref="table2" :data="receivedTableData" border style="width: 100%" height="100" highlight-current-row @current-change="handleCurrentChange($event, 'table2')">
|
|
|
|
<el-table-column prop="number" label="命令号" width="80" />
|
2022-07-07 15:03:41 +08:00
|
|
|
<el-table-column prop="title" label="命令标题" show-overflow-tooltip />
|
2022-10-08 18:25:12 +08:00
|
|
|
<el-table-column prop="sendTime" label="接收单位" show-overflow-tooltip width="160">
|
2022-07-07 15:03:41 +08:00
|
|
|
<template slot-scope="scope">
|
2022-10-08 18:25:12 +08:00
|
|
|
<span style="margin-left: 10px">{{ JoinDeviceNameStr(scope.row.receiverInfos) || '' }}</span>
|
2022-07-07 15:03:41 +08:00
|
|
|
</template>
|
|
|
|
</el-table-column>
|
2022-10-08 18:25:12 +08:00
|
|
|
<el-table-column prop="senderName" label="发令人" />
|
|
|
|
<el-table-column prop="companyOfSender" label="发令单位" />
|
2022-07-07 15:03:41 +08:00
|
|
|
<el-table-column label="命令类型" width="100">
|
|
|
|
<template slot-scope="scope">
|
|
|
|
<span style="margin-left: 10px">{{ typeObj[scope.row.type] || '' }}</span>
|
|
|
|
</template>
|
|
|
|
</el-table-column>
|
|
|
|
<el-table-column prop="content" label="命令正文" show-overflow-tooltip />
|
|
|
|
</el-table>
|
|
|
|
</div>
|
|
|
|
<div class="box-title">
|
|
|
|
<div class="contant-null" />
|
|
|
|
<div class="contant-text">发送命令</div>
|
|
|
|
<div class="contant-icon" @click="active3=!active3">
|
|
|
|
<i v-if="active3" class="el-icon-arrow-down" />
|
|
|
|
<i v-else class="el-icon-arrow-up" />
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div v-show="active3" class="left-table1">
|
2022-10-08 18:25:12 +08:00
|
|
|
<el-table ref="table3" :data="sendTableData" border style="width: 100%" height="150" highlight-current-row @current-change="handleCurrentChange($event, 'table3')">
|
|
|
|
<el-table-column prop="number" label="命令号" width="80" />
|
2022-07-07 15:03:41 +08:00
|
|
|
<el-table-column prop="title" label="命令标题" show-overflow-tooltip />
|
2022-10-08 18:25:12 +08:00
|
|
|
<el-table-column prop="sendTime" label="接收单位" show-overflow-tooltip width="160">
|
2022-07-07 15:03:41 +08:00
|
|
|
<template slot-scope="scope">
|
2022-10-08 18:25:12 +08:00
|
|
|
<span style="margin-left: 10px">{{ JoinDeviceNameStr(scope.row.receiverInfos) || '' }}</span>
|
2022-07-07 15:03:41 +08:00
|
|
|
</template>
|
|
|
|
</el-table-column>
|
|
|
|
<el-table-column prop="sendTime" label="发令时间" width="160" />
|
2022-10-08 18:25:12 +08:00
|
|
|
<el-table-column prop="senderName" label="发令人" />
|
|
|
|
<el-table-column prop="companyOfSender" label="发令单位" />
|
2022-07-07 15:03:41 +08:00
|
|
|
<el-table-column label="命令类型" width="100">
|
|
|
|
<template slot-scope="scope">
|
|
|
|
<span style="margin-left: 10px">{{ typeObj[scope.row.type] || '' }}</span>
|
|
|
|
</template>
|
|
|
|
</el-table-column>
|
|
|
|
<el-table-column prop="content" label="命令正文" show-overflow-tooltip />
|
|
|
|
</el-table>
|
|
|
|
</div>
|
|
|
|
<div class="box-title">
|
|
|
|
<div class="contant-null" />
|
|
|
|
<div class="contant-text">签收完成</div>
|
|
|
|
<div class="contant-icon" @click="active4=!active4">
|
|
|
|
<i v-if="active4" class="el-icon-arrow-down" />
|
|
|
|
<i v-else class="el-icon-arrow-up" />
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div v-show="active4" class="left-table1">
|
2022-10-08 18:25:12 +08:00
|
|
|
<el-table ref="table4" :data="allSignedTableData" border style="width: 100%" height="170" highlight-current-row @current-change="handleCurrentChange($event, 'table4')">
|
|
|
|
<el-table-column prop="number" label="命令号" width="80" />
|
2022-07-07 15:03:41 +08:00
|
|
|
<el-table-column prop="title" label="命令标题" show-overflow-tooltip />
|
2022-10-08 18:25:12 +08:00
|
|
|
<el-table-column prop="sendTime" label="接收单位" show-overflow-tooltip width="160">
|
2022-07-07 15:03:41 +08:00
|
|
|
<template slot-scope="scope">
|
2022-10-08 18:25:12 +08:00
|
|
|
<span style="margin-left: 10px">{{ JoinDeviceNameStr(scope.row.receiverInfos) || '' }}</span>
|
2022-07-07 15:03:41 +08:00
|
|
|
</template>
|
|
|
|
</el-table-column>
|
|
|
|
<el-table-column prop="sendTime" label="发令时间" width="160" />
|
2022-10-08 18:25:12 +08:00
|
|
|
<el-table-column prop="senderName" label="发令人" />
|
|
|
|
<el-table-column prop="companyOfSender" label="发令单位" />
|
2022-07-07 15:03:41 +08:00
|
|
|
<el-table-column label="命令类型" width="100">
|
|
|
|
<template slot-scope="scope">
|
|
|
|
<span style="margin-left: 10px">{{ typeObj[scope.row.type] || '' }}</span>
|
|
|
|
</template>
|
|
|
|
</el-table-column>
|
|
|
|
<el-table-column prop="content" label="命令正文" show-overflow-tooltip />
|
|
|
|
</el-table>
|
2022-06-30 18:13:23 +08:00
|
|
|
</div>
|
2022-06-28 11:29:38 +08:00
|
|
|
</div>
|
|
|
|
</el-tab-pane>
|
|
|
|
<el-tab-pane label="查询" name="search">
|
|
|
|
<div class="search-box">
|
2022-07-19 14:50:52 +08:00
|
|
|
<div class="box-title">
|
|
|
|
<div class="contant-null" />
|
|
|
|
<div class="contant-text">查询条件</div>
|
|
|
|
<div class="contant-icon" @click="active5=!active5">
|
|
|
|
<i v-if="active1" class="el-icon-arrow-down" />
|
|
|
|
<i v-else class="el-icon-arrow-up" />
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div v-show="active5" class="search-condition">
|
|
|
|
<div class="condition-top">
|
|
|
|
<el-radio v-model="searchObj.timeType" label="1">时间范围</el-radio>
|
|
|
|
<el-radio v-model="searchObj.timeType" label="2">精确匹配发令时间</el-radio>
|
|
|
|
</div>
|
|
|
|
<div class="condition-border" style="padding: 5px 10px">
|
|
|
|
<div v-if="searchObj.timeType==1">
|
|
|
|
<div class="condition-row">
|
|
|
|
<span style="margin-right: 5px">从</span>
|
|
|
|
<el-date-picker v-model="searchObj.startTime" style="flex: 1" type="datetime" placeholder="选择日期时间" value-format="yyyy-MM-dd HH:mm:ss" />
|
|
|
|
</div>
|
|
|
|
<div class="condition-row">
|
|
|
|
<span style="margin-right: 5px">至</span>
|
|
|
|
<el-date-picker v-model="searchObj.endTime" style="flex: 1" type="datetime" placeholder="选择日期时间" value-format="yyyy-MM-dd HH:mm:ss" />
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div v-else class="condition-row">
|
|
|
|
<span style="margin-right: 5px">发令时间</span>
|
|
|
|
<el-date-picker v-model="searchObj.sendTime" style="flex: 1" type="datetime" placeholder="选择日期时间" value-format="yyyy-MM-dd HH:mm:ss" />
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="condition-row">
|
|
|
|
<el-checkbox v-model="searchObj.hasNumber">命令号</el-checkbox>
|
2022-10-08 18:25:12 +08:00
|
|
|
<el-input v-model="searchObj.number" />
|
2022-07-19 14:50:52 +08:00
|
|
|
</div>
|
|
|
|
<div class="condition-border">
|
|
|
|
<div class="condition-row">
|
|
|
|
<el-checkbox v-model="searchObj.hasCompanyOfSender">发令单位</el-checkbox>
|
2022-10-08 18:25:12 +08:00
|
|
|
<el-input v-model="searchObj.companyOfSender" />
|
2022-07-19 14:50:52 +08:00
|
|
|
</div>
|
|
|
|
<div class="condition-row">
|
|
|
|
<el-checkbox v-model="searchObj.hasCompanyOfReceiver">受令单位</el-checkbox>
|
|
|
|
<el-input v-model="searchObj.companyOfReceiver" />
|
|
|
|
</div>
|
|
|
|
<div>
|
|
|
|
<el-checkbox v-model="searchObj.hasTitleKey">命令标题或者内容 关键字</el-checkbox>
|
|
|
|
<el-input v-model="searchObj.titleKey" />
|
|
|
|
</div>
|
|
|
|
<div>
|
|
|
|
<el-select v-model="searchObj.allSigned" placeholder="请选择">
|
|
|
|
<el-option
|
|
|
|
v-for="item in searchSignedOption"
|
|
|
|
:key="item.value"
|
|
|
|
:label="item.label"
|
|
|
|
:value="item.value"
|
|
|
|
/>
|
|
|
|
</el-select>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="condition-btn">
|
|
|
|
<el-button type="primary" @click="search">查询</el-button>
|
|
|
|
<el-button type="primary" style="width: 100px" @click="clearCondition">清除</el-button>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<el-table ref="table5" class="search-table" :data="searchTable" border style="width: 100%" height="100%" highlight-current-row @current-change="handleCurrentChange($event, 'table5')">
|
2022-10-08 18:25:12 +08:00
|
|
|
<el-table-column prop="number" label="命令号" width="80" />
|
|
|
|
<el-table-column prop="transferNumber" label="识别号" width="80" />
|
2022-07-19 14:50:52 +08:00
|
|
|
<el-table-column prop="title" label="命令标题" show-overflow-tooltip />
|
2022-10-08 18:25:12 +08:00
|
|
|
<el-table-column prop="sendTime" label="接收单位" show-overflow-tooltip width="160">
|
2022-07-19 14:50:52 +08:00
|
|
|
<template slot-scope="scope">
|
2022-10-08 18:25:12 +08:00
|
|
|
<span style="margin-left: 10px">{{ JoinDeviceNameStr(scope.row.receiverInfos) || '' }}</span>
|
2022-07-19 14:50:52 +08:00
|
|
|
</template>
|
|
|
|
</el-table-column>
|
|
|
|
<el-table-column prop="sendTime" label="发令时间" width="160" />
|
2022-10-08 18:25:12 +08:00
|
|
|
<el-table-column prop="senderName" label="发令人" />
|
|
|
|
<el-table-column prop="companyOfSender" label="发令单位" />
|
2022-07-19 14:50:52 +08:00
|
|
|
<el-table-column label="命令类型" width="100">
|
|
|
|
<template slot-scope="scope">
|
|
|
|
<span style="margin-left: 10px">{{ typeObj[scope.row.type] || '' }}</span>
|
|
|
|
</template>
|
|
|
|
</el-table-column>
|
|
|
|
<el-table-column prop="content" label="命令正文" show-overflow-tooltip />
|
|
|
|
</el-table>
|
2022-06-28 11:29:38 +08:00
|
|
|
</div>
|
|
|
|
</el-tab-pane>
|
|
|
|
</el-tabs>
|
|
|
|
</div>
|
|
|
|
</el-col>
|
2022-10-08 18:25:12 +08:00
|
|
|
<el-col :span="12">
|
2022-06-28 11:29:38 +08:00
|
|
|
<div class="middle">
|
2022-10-08 18:25:12 +08:00
|
|
|
<el-tabs v-model="cmdTab" type="border-card">
|
2022-06-28 11:29:38 +08:00
|
|
|
<el-tab-pane label="调度命令" name="cmd">
|
2022-10-08 18:25:12 +08:00
|
|
|
<el-form ref="form" :model="command" :rules="rules" label-width="85px">
|
2022-07-08 14:56:33 +08:00
|
|
|
<el-form-item label="命令标题" prop="title">
|
2022-06-29 10:36:57 +08:00
|
|
|
<el-input v-model="command.title" />
|
|
|
|
</el-form-item>
|
2022-10-08 18:25:12 +08:00
|
|
|
<el-col :span="12">
|
|
|
|
<el-form-item label="命令号" prop="number">
|
|
|
|
<el-input v-model.number="command.number" />
|
2022-07-08 11:14:36 +08:00
|
|
|
</el-form-item>
|
|
|
|
</el-col>
|
2022-10-08 18:25:12 +08:00
|
|
|
<el-col :span="12">
|
2022-07-08 11:14:36 +08:00
|
|
|
<el-form-item label="中转识别号">
|
2022-10-08 18:25:12 +08:00
|
|
|
<el-input v-model="command.transferNumber" />
|
2022-07-08 11:14:36 +08:00
|
|
|
</el-form-item>
|
|
|
|
</el-col>
|
2022-10-08 18:25:12 +08:00
|
|
|
<el-col :span="12">
|
2022-07-08 11:14:36 +08:00
|
|
|
<el-form-item label="发令时间">
|
|
|
|
<el-date-picker v-model="command.sendTime" type="datetime" placeholder="选择日期时间" style="width: 100%;" value-format="yyyy-MM-dd HH:mm:ss" />
|
|
|
|
</el-form-item>
|
|
|
|
</el-col>
|
2022-10-08 18:25:12 +08:00
|
|
|
<el-col :span="12">
|
2022-06-29 10:36:57 +08:00
|
|
|
<el-form-item label="发令人">
|
2022-10-08 18:25:12 +08:00
|
|
|
<el-select v-model="command.senderName" disabled placeholder="请选择" style="width: 100%;" @change="senderChange">
|
2022-06-30 18:13:23 +08:00
|
|
|
<el-option
|
2022-07-01 13:58:44 +08:00
|
|
|
v-for="item in memberDataList"
|
|
|
|
:key="item.id"
|
|
|
|
:label="item.labelName"
|
2022-10-08 18:25:12 +08:00
|
|
|
:value="item.labelName"
|
2022-06-30 18:13:23 +08:00
|
|
|
/>
|
|
|
|
</el-select>
|
2022-06-29 10:36:57 +08:00
|
|
|
</el-form-item>
|
|
|
|
</el-col>
|
2022-10-08 18:25:12 +08:00
|
|
|
<el-col :span="12">
|
2022-06-29 10:36:57 +08:00
|
|
|
<el-form-item label="发令单位">
|
2022-10-08 18:25:12 +08:00
|
|
|
<el-input v-model="command.companyOfSender" />
|
2022-06-29 10:36:57 +08:00
|
|
|
</el-form-item>
|
|
|
|
</el-col>
|
2022-10-08 18:25:12 +08:00
|
|
|
<el-col :span="12">
|
2022-06-29 10:36:57 +08:00
|
|
|
<el-form-item label="授权时间">
|
2022-10-08 18:25:12 +08:00
|
|
|
<el-date-picker v-model="command.authorizationTime" type="datetime" placeholder="选择日期时间" style="width: 100%;" value-format="yyyy-MM-dd HH:mm:ss" />
|
2022-06-29 10:36:57 +08:00
|
|
|
</el-form-item>
|
|
|
|
</el-col>
|
2022-10-08 18:25:12 +08:00
|
|
|
<el-col :span="12">
|
2022-06-29 10:36:57 +08:00
|
|
|
<el-form-item label="授权状态">
|
2022-10-08 18:25:12 +08:00
|
|
|
<el-input v-model="command.authorizationStatus" />
|
2022-06-29 10:36:57 +08:00
|
|
|
</el-form-item>
|
|
|
|
</el-col>
|
2022-10-08 18:25:12 +08:00
|
|
|
<el-col :span="12">
|
2022-06-29 10:36:57 +08:00
|
|
|
<el-form-item label="定稿时间">
|
2022-10-08 18:25:12 +08:00
|
|
|
<el-date-picker v-model="command.finalizationTime" type="datetime" placeholder="选择日期时间" style="width: 100%;" value-format="yyyy-MM-dd HH:mm:ss" />
|
2022-06-29 10:36:57 +08:00
|
|
|
</el-form-item>
|
|
|
|
</el-col>
|
2022-10-08 18:25:12 +08:00
|
|
|
<el-col :span="12">
|
2022-06-29 10:36:57 +08:00
|
|
|
<el-form-item label="审核人">
|
2022-10-08 18:25:12 +08:00
|
|
|
<el-select v-model="command.reviewerId" placeholder="请选择" style="width: 100%;">
|
2022-06-30 18:13:23 +08:00
|
|
|
<el-option
|
2022-10-08 18:25:12 +08:00
|
|
|
v-for="item in simulationUserList"
|
|
|
|
:key="item.memberId"
|
|
|
|
:label="item.nickName"
|
|
|
|
:value="item.memberId"
|
2022-06-30 18:13:23 +08:00
|
|
|
/>
|
|
|
|
</el-select>
|
2022-06-29 10:36:57 +08:00
|
|
|
</el-form-item>
|
|
|
|
</el-col>
|
2022-10-08 18:25:12 +08:00
|
|
|
<el-col :span="12">
|
2022-06-29 10:36:57 +08:00
|
|
|
<el-form-item label="拟令人">
|
2022-10-08 18:25:12 +08:00
|
|
|
<el-select v-model="command.author" placeholder="请选择" style="width: 100%;">
|
2022-06-30 18:13:23 +08:00
|
|
|
<el-option
|
2022-10-08 18:25:12 +08:00
|
|
|
v-for="item in simulationUserList"
|
|
|
|
:key="item.memberId"
|
|
|
|
:label="item.nickName"
|
|
|
|
:value="item.memberId"
|
2022-06-30 18:13:23 +08:00
|
|
|
/>
|
|
|
|
</el-select>
|
2022-06-29 10:36:57 +08:00
|
|
|
</el-form-item>
|
|
|
|
</el-col>
|
2022-10-08 18:25:12 +08:00
|
|
|
<el-col :span="12">
|
2022-06-29 10:36:57 +08:00
|
|
|
<el-form-item label="命令分类">
|
2022-06-30 18:13:23 +08:00
|
|
|
<el-select v-model="command.type" placeholder="请选择" style="width: 100%;">
|
|
|
|
<el-option
|
|
|
|
v-for="item in typeOptions"
|
|
|
|
:key="item.value"
|
|
|
|
:label="item.label"
|
|
|
|
:value="item.value"
|
|
|
|
/>
|
|
|
|
</el-select>
|
2022-06-29 10:36:57 +08:00
|
|
|
</el-form-item>
|
|
|
|
</el-col>
|
|
|
|
</el-form>
|
2022-06-28 11:29:38 +08:00
|
|
|
</el-tab-pane>
|
|
|
|
</el-tabs>
|
2022-06-29 10:36:57 +08:00
|
|
|
<el-tabs v-model="textTab" type="border-card">
|
2022-07-08 14:56:33 +08:00
|
|
|
<el-tab-pane :label="getContentLable" name="text">
|
2022-06-28 11:29:38 +08:00
|
|
|
<div class="cmd-box">
|
2022-06-29 10:36:57 +08:00
|
|
|
<div>
|
2022-07-08 14:56:33 +08:00
|
|
|
<el-input v-model="command.content" type="textarea" :rows="6" placeholder="请输入内容" maxlength="200" />
|
2022-06-29 10:36:57 +08:00
|
|
|
</div>
|
2022-06-28 11:29:38 +08:00
|
|
|
</div>
|
|
|
|
</el-tab-pane>
|
|
|
|
</el-tabs>
|
|
|
|
<div>
|
2022-06-30 18:13:23 +08:00
|
|
|
<div class="table-title">
|
2022-06-29 10:36:57 +08:00
|
|
|
<span>受令列表</span>
|
2022-06-30 18:13:23 +08:00
|
|
|
<!-- <el-checkbox v-model="tableChecked">全选</el-checkbox> -->
|
2022-06-29 10:36:57 +08:00
|
|
|
</div>
|
|
|
|
<div class="table">
|
2022-10-08 18:25:12 +08:00
|
|
|
<el-table ref="table" :data="getTableData" border style="width: 100%" height="200" @selection-change="selectionChange">
|
|
|
|
<el-table-column type="selection" width="50" />
|
|
|
|
<el-table-column label="受令单位" width="160">
|
2022-07-01 15:37:55 +08:00
|
|
|
<template slot-scope="scope">
|
2022-10-08 18:25:12 +08:00
|
|
|
<span style="margin-left: 10px">{{ getDeviceName(scope.row.receiverId) }}</span>
|
2022-07-07 15:03:41 +08:00
|
|
|
</template>
|
|
|
|
</el-table-column>
|
2022-10-08 18:25:12 +08:00
|
|
|
<el-table-column prop="copyers" label="抄送" width="120" show-overflow-tooltip />
|
|
|
|
<el-table-column label="签收状态">
|
2022-07-07 15:03:41 +08:00
|
|
|
<template slot-scope="scope">
|
2022-10-08 18:25:12 +08:00
|
|
|
<span style="margin-left: 10px">{{ signedStatusObj[scope.row.signedStatus] || '' }}</span>
|
2022-10-08 16:57:48 +08:00
|
|
|
</template>
|
|
|
|
</el-table-column>
|
2022-10-08 18:25:12 +08:00
|
|
|
<el-table-column label="签收人">
|
2022-10-08 16:57:48 +08:00
|
|
|
<template slot-scope="scope">
|
2022-10-08 18:25:12 +08:00
|
|
|
<span style="margin-left: 10px">{{ getSignedBy(scope.row) || '' }}</span>
|
2022-07-01 15:37:55 +08:00
|
|
|
</template>
|
|
|
|
</el-table-column>
|
2022-10-08 18:25:12 +08:00
|
|
|
<el-table-column prop="time" label="签收时间" width="160" />
|
2022-06-29 10:36:57 +08:00
|
|
|
</el-table>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="midle-bottom">
|
2022-10-08 18:25:12 +08:00
|
|
|
<el-button type="primary" @click="sendCmd">下达</el-button>
|
2022-06-30 18:13:23 +08:00
|
|
|
<el-button type="primary" @click="doClose">关闭</el-button>
|
2022-06-28 11:29:38 +08:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</el-col>
|
2022-10-08 18:25:12 +08:00
|
|
|
<el-col :span="6">
|
2022-06-28 11:29:38 +08:00
|
|
|
<div class="right">
|
|
|
|
常用词汇
|
|
|
|
</div>
|
|
|
|
</el-col>
|
|
|
|
</el-row>
|
|
|
|
</div>
|
|
|
|
</el-dialog>
|
|
|
|
</template>
|
|
|
|
<script>
|
2022-06-30 18:13:23 +08:00
|
|
|
import { sendCommandNew } from '@/api/jmap/training';
|
|
|
|
import { mapState } from 'vuex';
|
2022-07-07 15:03:41 +08:00
|
|
|
import { parseTime } from '@/utils/index';
|
2022-06-28 11:29:38 +08:00
|
|
|
export default {
|
|
|
|
name:'DispatcherCmd',
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
dialogShow: false,
|
|
|
|
activeTab: 'operate',
|
|
|
|
cmdTab: 'cmd',
|
2022-06-29 10:36:57 +08:00
|
|
|
textTab: 'text',
|
2022-07-07 15:03:41 +08:00
|
|
|
typeObj: {
|
2022-10-08 18:25:12 +08:00
|
|
|
NORMAL: '正常调度命令'
|
2022-07-07 15:03:41 +08:00
|
|
|
},
|
2022-07-01 15:37:55 +08:00
|
|
|
signedStatusObj: {
|
2022-10-08 18:25:12 +08:00
|
|
|
UNSIGNED: '未签收',
|
|
|
|
SIGNED: '签收',
|
|
|
|
REFUSE: '拒签'
|
2022-07-01 15:37:55 +08:00
|
|
|
},
|
2022-06-29 10:36:57 +08:00
|
|
|
command: {
|
|
|
|
title: '',
|
2022-10-08 18:25:12 +08:00
|
|
|
number: '',
|
|
|
|
transferNumber: '',
|
2022-10-08 16:57:48 +08:00
|
|
|
sendTime: '',
|
2022-10-08 18:25:12 +08:00
|
|
|
senderId: '',
|
|
|
|
senderName: '',
|
|
|
|
companyOfSender: '',
|
|
|
|
authorizationTime: '',
|
|
|
|
authorizationStatus: '',
|
|
|
|
finalizationTime: '',
|
|
|
|
reviewerId: '',
|
|
|
|
author: '',
|
|
|
|
receiverIds: [],
|
|
|
|
type: 'NORMAL',
|
|
|
|
content: ''
|
2022-07-19 14:50:52 +08:00
|
|
|
// allSigned: ''
|
2022-06-29 10:36:57 +08:00
|
|
|
},
|
2022-07-08 14:56:33 +08:00
|
|
|
rules: {
|
|
|
|
title: [
|
|
|
|
{ required: true, message: '命令标题不能为空', trigger: 'blur' },
|
|
|
|
{ min: 1, max: 20, message: '长度在 1 到 20 个字符', trigger: 'blur' }
|
|
|
|
],
|
2022-10-08 18:25:12 +08:00
|
|
|
number: [
|
2022-07-08 14:56:33 +08:00
|
|
|
{ required: true, message: '命令号不能为空', trigger: 'blur' },
|
2022-10-08 18:25:12 +08:00
|
|
|
{ type: 'number', required: true, min: 1, max: 9999999999, message: '请输入最多10位数字', trigger: 'blur' }
|
2022-07-08 14:56:33 +08:00
|
|
|
]
|
|
|
|
},
|
2022-07-01 13:58:44 +08:00
|
|
|
tableChecked: false,
|
2022-10-08 18:25:12 +08:00
|
|
|
memberDataList: [],
|
2022-07-07 15:03:41 +08:00
|
|
|
active1: true,
|
|
|
|
active2: true,
|
|
|
|
active3: true,
|
|
|
|
active4: true,
|
2022-07-19 14:50:52 +08:00
|
|
|
active5: true,
|
2022-10-08 18:25:12 +08:00
|
|
|
timeTypeRadio: '1',
|
2022-07-07 15:03:41 +08:00
|
|
|
numTime: 24,
|
2022-10-08 18:25:12 +08:00
|
|
|
seachData: [],
|
|
|
|
cacheTableData: [],
|
|
|
|
currentInfo: {},
|
2022-07-19 14:50:52 +08:00
|
|
|
searchObj: {
|
|
|
|
timeType: '1',
|
|
|
|
startTime: '',
|
|
|
|
endTime: '',
|
|
|
|
sendTime: '',
|
|
|
|
hasNumber: false,
|
2022-10-08 18:25:12 +08:00
|
|
|
number: '',
|
2022-07-19 14:50:52 +08:00
|
|
|
hasCompanyOfSender: false,
|
2022-10-08 18:25:12 +08:00
|
|
|
companyOfSender: '',
|
2022-07-19 14:50:52 +08:00
|
|
|
hasCompanyOfReceiver: false,
|
|
|
|
companyOfReceiver: '',
|
|
|
|
hasTitleKey: false,
|
|
|
|
titleKey: '',
|
|
|
|
allSigned: ''
|
|
|
|
},
|
|
|
|
searchTable: [],
|
|
|
|
searchSignedOption: [
|
|
|
|
{ value: '', label: '全部'},
|
|
|
|
{ value: true, label: '只显示签收完成的'},
|
|
|
|
{ value: false, label: '只显示未签收完成的'}
|
|
|
|
]
|
2022-06-28 11:29:38 +08:00
|
|
|
};
|
|
|
|
},
|
|
|
|
computed: {
|
2022-06-30 18:13:23 +08:00
|
|
|
...mapState('training', [
|
2022-07-07 15:03:41 +08:00
|
|
|
'memberList', 'memberData', 'simulationUserList', 'initTime'
|
2022-06-30 18:13:23 +08:00
|
|
|
]),
|
2022-07-08 14:56:33 +08:00
|
|
|
getContentLable() {
|
|
|
|
const text = '命令正文';
|
|
|
|
const fontLength = this.command.content.length;
|
|
|
|
return `${text} ${fontLength}字`;
|
|
|
|
},
|
2022-07-07 15:03:41 +08:00
|
|
|
typeOptions() {
|
|
|
|
const list = [];
|
|
|
|
Object.keys(this.typeObj).forEach(item => {
|
|
|
|
list.push({
|
|
|
|
label: this.typeObj[item],
|
|
|
|
value: item
|
|
|
|
});
|
|
|
|
});
|
|
|
|
return list;
|
|
|
|
},
|
|
|
|
getSimulationTime() {
|
|
|
|
const t = parseTime(this.initTime, '{h}:{i}:{s}');
|
|
|
|
const tArr = t.split(':');
|
|
|
|
let s = ' ';
|
|
|
|
let h = tArr[0];
|
|
|
|
if (this.numTime != 24) {
|
|
|
|
s = '上午';
|
|
|
|
if (h > 12) {
|
|
|
|
s = '下午';
|
|
|
|
h = h - 12;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return `${s} ${h}:${tArr[1]}:${tArr[2]}`;
|
|
|
|
},
|
2022-06-28 11:29:38 +08:00
|
|
|
show() {
|
|
|
|
return this.dialogShow;
|
|
|
|
},
|
2022-06-30 18:13:23 +08:00
|
|
|
group() {
|
|
|
|
return this.$route.query.group;
|
|
|
|
},
|
2022-06-28 11:29:38 +08:00
|
|
|
title() {
|
|
|
|
return '调度命令管理系统';
|
2022-06-30 18:13:23 +08:00
|
|
|
},
|
2022-10-08 18:25:12 +08:00
|
|
|
mapSimulationUserList() {
|
|
|
|
const obj = {};
|
|
|
|
this.simulationUserList.forEach(item => {
|
|
|
|
obj[item.userId] = item;
|
|
|
|
});
|
|
|
|
return obj;
|
|
|
|
},
|
2022-06-30 18:13:23 +08:00
|
|
|
getTableData() {
|
2022-07-07 15:03:41 +08:00
|
|
|
const mList = [];
|
|
|
|
const filterArr = this.memberList.filter(item => {
|
2022-06-30 18:13:23 +08:00
|
|
|
return item.type == 'STATION_SUPERVISOR';
|
|
|
|
});
|
2022-07-07 15:03:41 +08:00
|
|
|
filterArr.forEach(item => {
|
2022-10-08 18:25:12 +08:00
|
|
|
let cInfo = {};
|
|
|
|
if (this.currentInfo.receiverInfos && this.currentInfo.receiverInfos[item.deviceCode]) {
|
|
|
|
cInfo = this.currentInfo.receiverInfos[item.deviceCode];
|
|
|
|
}
|
2022-07-07 15:03:41 +08:00
|
|
|
mList.push({
|
2022-10-08 18:25:12 +08:00
|
|
|
receiverId: item.deviceCode || '',
|
|
|
|
signedBy: '',
|
|
|
|
receivedTime: '',
|
|
|
|
signedStatus: '',
|
|
|
|
time: '',
|
|
|
|
...cInfo
|
2022-07-07 15:03:41 +08:00
|
|
|
});
|
|
|
|
});
|
|
|
|
return mList;
|
|
|
|
},
|
|
|
|
getActiveSender() {
|
|
|
|
const userInfo = this.memberDataList.find(item => {
|
|
|
|
return item.userId == this.$store.state.user.id;
|
|
|
|
});
|
|
|
|
const activeUser = userInfo || {};
|
|
|
|
return activeUser;
|
|
|
|
},
|
2022-10-08 18:25:12 +08:00
|
|
|
receivedTableData() {
|
|
|
|
const list = this.seachData.filter(item => {
|
|
|
|
return item.receiverInfos[this.getActiveSender.deviceCode];
|
|
|
|
});
|
|
|
|
return list;
|
|
|
|
},
|
|
|
|
sendTableData() {
|
|
|
|
const list = this.seachData.filter(item => {
|
|
|
|
return item.senderName == this.getActiveSender.labelName;
|
|
|
|
});
|
|
|
|
return list;
|
2022-07-07 15:03:41 +08:00
|
|
|
},
|
2022-10-08 18:25:12 +08:00
|
|
|
allSignedTableData() {
|
|
|
|
const list = this.seachData.filter(item => {
|
|
|
|
return item.allSigned;
|
2022-06-30 18:13:23 +08:00
|
|
|
});
|
2022-10-08 18:25:12 +08:00
|
|
|
return list;
|
2022-06-30 18:13:23 +08:00
|
|
|
}
|
|
|
|
},
|
2022-10-08 18:25:12 +08:00
|
|
|
watch: {},
|
2022-06-28 11:29:38 +08:00
|
|
|
beforeDestroy() {},
|
2022-07-01 13:58:44 +08:00
|
|
|
mounted() {},
|
2022-06-28 11:29:38 +08:00
|
|
|
methods:{
|
2022-07-19 14:50:52 +08:00
|
|
|
search() {
|
|
|
|
this.searchTable = [];
|
|
|
|
this.searchCmd().then(res => {
|
|
|
|
this.getSearchTable();
|
|
|
|
});
|
|
|
|
},
|
|
|
|
getSearchTable() {
|
2022-10-08 18:25:12 +08:00
|
|
|
const list = this.seachData.filter(item => {
|
2022-07-19 14:50:52 +08:00
|
|
|
return this.conditionFilter(item);
|
|
|
|
});
|
|
|
|
this.searchTable = list;
|
|
|
|
},
|
|
|
|
conditionFilter(item) {
|
|
|
|
let status = true;
|
|
|
|
if (this.searchObj.timeType == '1') {
|
|
|
|
if (this.searchObj.startTime && new Date(this.searchObj.startTime).getTime() > new Date(item.sendTime).getTime()) {
|
|
|
|
status = false;
|
|
|
|
}
|
|
|
|
if (this.searchObj.endTime && new Date(this.searchObj.endTime).getTime() < new Date(item.sendTime).getTime()) {
|
|
|
|
status = false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (this.searchObj.timeType == '2' && this.searchObj.sendTime) {
|
|
|
|
if (this.searchObj.sendTime != item.sendTime) {
|
|
|
|
status = false;
|
|
|
|
}
|
|
|
|
}
|
2022-10-08 18:25:12 +08:00
|
|
|
if (this.searchObj.hasNumber && this.searchObj.number) {
|
|
|
|
if (this.searchObj.number != item.number) {
|
2022-07-19 14:50:52 +08:00
|
|
|
status = false;
|
|
|
|
}
|
|
|
|
}
|
2022-10-08 18:25:12 +08:00
|
|
|
if (this.searchObj.hasCompanyOfSender && this.searchObj.companyOfSender) {
|
|
|
|
if (this.searchObj.companyOfSender != item.companyOfSender) {
|
2022-07-19 14:50:52 +08:00
|
|
|
status = false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (this.searchObj.hasCompanyOfReceiver && this.searchObj.companyOfReceiver) {
|
2022-10-08 18:25:12 +08:00
|
|
|
const findObj = Object.keys(item.receiverInfos).find(ii => {
|
|
|
|
const device = this.$store.getters['map/getDeviceByCode'](ii);
|
2022-07-19 14:50:52 +08:00
|
|
|
const name = device ? device.name : '';
|
|
|
|
return name == this.searchObj.companyOfReceiver;
|
|
|
|
});
|
|
|
|
if (!findObj) {
|
|
|
|
status = false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (this.searchObj.hasTitleKey && this.searchObj.titleKey) {
|
|
|
|
if (!item.title.includes(this.searchObj.titleKey) && !item.content.includes(this.searchObj.titleKey)) {
|
|
|
|
status = false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (this.searchObj.allSigned != '') {
|
2022-10-08 18:25:12 +08:00
|
|
|
if (this.searchObj.allSigned != item.allSigned) {
|
2022-07-19 14:50:52 +08:00
|
|
|
status = false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return status;
|
|
|
|
},
|
2022-07-07 15:03:41 +08:00
|
|
|
setCurrentRow(obj, refName) {
|
2022-10-08 18:25:12 +08:00
|
|
|
const tableArr = ['table1', 'table2', 'table3', 'table4', 'table5'];
|
2022-07-07 15:03:41 +08:00
|
|
|
tableArr.forEach(key => {
|
|
|
|
if (key != refName) {
|
2022-07-07 16:32:18 +08:00
|
|
|
this.$refs[key] && this.$refs[key].setCurrentRow();
|
2022-07-07 15:03:41 +08:00
|
|
|
} else {
|
2022-07-07 16:32:18 +08:00
|
|
|
this.$refs[key] && this.$refs[key].setCurrentRow(obj);
|
2022-07-07 15:03:41 +08:00
|
|
|
}
|
|
|
|
});
|
|
|
|
},
|
|
|
|
handleCurrentChange(obj, refName) {
|
|
|
|
if (!obj) { return; }
|
2022-10-08 18:25:12 +08:00
|
|
|
this.currentInfo = obj;
|
2022-07-19 14:50:52 +08:00
|
|
|
// this.command = {...obj};
|
|
|
|
Object.keys(this.command).forEach(key => {
|
|
|
|
this.command[key] = obj[key] || '';
|
|
|
|
});
|
2022-07-07 15:03:41 +08:00
|
|
|
this.setCurrentRow(obj, refName);
|
2022-10-08 18:25:12 +08:00
|
|
|
const infoList = Object.keys(this.currentInfo.receiverInfos || {});
|
|
|
|
if (infoList.length) {
|
|
|
|
this.command.receiverIds = infoList;
|
|
|
|
setTimeout(() => {
|
|
|
|
infoList.forEach(item => {
|
|
|
|
const findObj = this.getTableData.find(ii => {
|
|
|
|
return ii.receiverId == item;
|
|
|
|
});
|
|
|
|
findObj && this.$refs.table.toggleRowSelection(findObj, true);
|
|
|
|
});
|
|
|
|
}, 200);
|
|
|
|
} else {
|
|
|
|
this.$refs.table.clearSelection();
|
|
|
|
}
|
2022-07-07 15:03:41 +08:00
|
|
|
},
|
|
|
|
getSignedBy(info) {
|
2022-10-08 18:25:12 +08:00
|
|
|
const signedInfo = this.simulationUserList.find(item => {
|
|
|
|
return item.memberId == info.signedBy;
|
|
|
|
});
|
2022-07-07 15:03:41 +08:00
|
|
|
let name = '';
|
|
|
|
if (signedInfo) {
|
2022-10-08 18:25:12 +08:00
|
|
|
name = signedInfo.nickName;
|
2022-07-07 15:03:41 +08:00
|
|
|
}
|
|
|
|
return name;
|
|
|
|
},
|
|
|
|
getDeviceName(receiverId) {
|
|
|
|
let name = '';
|
|
|
|
if (receiverId) {
|
|
|
|
const device = this.$store.getters['map/getDeviceByCode'](receiverId);
|
|
|
|
name = device ? device.name : '';
|
|
|
|
}
|
|
|
|
return name;
|
|
|
|
},
|
2022-10-08 18:25:12 +08:00
|
|
|
JoinDeviceNameStr(info) {
|
2022-07-07 15:03:41 +08:00
|
|
|
let name = '';
|
2022-10-08 18:25:12 +08:00
|
|
|
const devCodeArr = Object.keys(info);
|
2022-07-07 15:03:41 +08:00
|
|
|
const nameArr = [];
|
|
|
|
devCodeArr.forEach(ii => {
|
2022-10-08 18:25:12 +08:00
|
|
|
const device = this.$store.getters['map/getDeviceByCode'](ii);
|
2022-07-07 15:03:41 +08:00
|
|
|
nameArr.push(device ? device.name : '');
|
|
|
|
});
|
|
|
|
name = nameArr.join(',');
|
|
|
|
return name;
|
|
|
|
},
|
|
|
|
refreshSearch() {
|
|
|
|
console.log('刷新');
|
|
|
|
this.searchCmd();
|
|
|
|
},
|
2022-07-19 14:50:52 +08:00
|
|
|
clearCondition() {
|
|
|
|
this.searchTable = [];
|
|
|
|
this.searchObj = {
|
|
|
|
timeType: '1',
|
|
|
|
startTime: '',
|
|
|
|
endTime: '',
|
|
|
|
sendTime: '',
|
|
|
|
hasNumber: false,
|
2022-10-08 18:25:12 +08:00
|
|
|
number: '',
|
2022-07-19 14:50:52 +08:00
|
|
|
hasCompanyOfSender: false,
|
2022-10-08 18:25:12 +08:00
|
|
|
companyOfSender: '',
|
2022-07-19 14:50:52 +08:00
|
|
|
hasCompanyOfReceiver: false,
|
|
|
|
companyOfReceiver: '',
|
|
|
|
hasTitleKey: false,
|
|
|
|
titleKey: '',
|
|
|
|
allSigned: ''
|
|
|
|
};
|
|
|
|
},
|
2022-07-04 14:46:00 +08:00
|
|
|
createCmd() {
|
2022-10-08 18:25:12 +08:00
|
|
|
this.$confirm('当前调度命令已经被编辑修改过了,你要放弃所有的修改吗?', '操作提示', {
|
|
|
|
confirmButtonText: '是',
|
|
|
|
cancelButtonText: '否'
|
2022-07-04 14:46:00 +08:00
|
|
|
}).then(() => {
|
|
|
|
this.initData();
|
|
|
|
}).catch(() => {
|
|
|
|
console.log('取消新建调度命令!');
|
|
|
|
});
|
|
|
|
},
|
2022-10-08 16:57:48 +08:00
|
|
|
initData() {
|
|
|
|
this.command = {
|
2022-10-08 18:25:12 +08:00
|
|
|
title: '',
|
|
|
|
number: '',
|
|
|
|
transferNumber: '',
|
|
|
|
sendTime: '',
|
|
|
|
senderId: '',
|
|
|
|
senderName: this.command.senderName,
|
|
|
|
companyOfSender: '',
|
|
|
|
authorizationTime: '',
|
|
|
|
authorizationStatus: '',
|
|
|
|
finalizationTime: '',
|
|
|
|
reviewerId: '',
|
|
|
|
author: '',
|
|
|
|
receiverIds: [],
|
|
|
|
type: 'NORMAL',
|
|
|
|
content: ''
|
|
|
|
// allSigned: ''
|
2022-06-30 18:13:23 +08:00
|
|
|
};
|
2022-10-08 18:25:12 +08:00
|
|
|
this.currentInfo = {};
|
2022-07-07 16:32:18 +08:00
|
|
|
this.$refs.table && this.$refs.table.clearSelection();
|
2022-07-08 14:56:33 +08:00
|
|
|
this.$refs.form && this.$refs.form.resetFields();
|
2022-07-07 15:03:41 +08:00
|
|
|
this.setCurrentRow();
|
2022-06-30 18:13:23 +08:00
|
|
|
},
|
2022-10-08 18:25:12 +08:00
|
|
|
senderChange(memberId) {
|
|
|
|
const obj = this.mapSimulationUserList.find(item => {
|
|
|
|
return item.memberId == memberId;
|
2022-06-30 18:13:23 +08:00
|
|
|
});
|
|
|
|
if (obj) {
|
2022-10-08 18:25:12 +08:00
|
|
|
const device = this.$store.getters['map/getDeviceByCode'](obj.deviceCode);
|
|
|
|
this.command.companyOfSender = device ? device.name : '';
|
2022-06-30 18:13:23 +08:00
|
|
|
}
|
|
|
|
},
|
2022-07-01 13:58:44 +08:00
|
|
|
getSenderName() {
|
2022-10-08 18:25:12 +08:00
|
|
|
this.memberDataList = Object.values(this.memberData);
|
2022-07-01 13:58:44 +08:00
|
|
|
const activeUser = this.memberDataList.find(item => {
|
|
|
|
return item.userId == this.$store.state.user.id;
|
|
|
|
});
|
|
|
|
if (activeUser) {
|
|
|
|
// this.command.senderId = activeUser.id;
|
2022-10-08 18:25:12 +08:00
|
|
|
this.command.senderName = activeUser.labelName;
|
2022-07-01 13:58:44 +08:00
|
|
|
}
|
|
|
|
},
|
2022-06-28 11:29:38 +08:00
|
|
|
doShow() {
|
2022-07-07 15:03:41 +08:00
|
|
|
this.searchCmd();
|
2022-07-01 13:58:44 +08:00
|
|
|
this.getSenderName();
|
2022-06-28 11:29:38 +08:00
|
|
|
this.dialogShow = true;
|
2022-10-08 18:25:12 +08:00
|
|
|
this.initData();
|
2022-06-28 11:29:38 +08:00
|
|
|
},
|
|
|
|
doClose() {
|
|
|
|
this.dialogShow = false;
|
|
|
|
},
|
|
|
|
tabClick() {
|
|
|
|
console.log('tabClick');
|
2022-06-30 18:13:23 +08:00
|
|
|
},
|
|
|
|
selectionChange(selection) {
|
|
|
|
const arr = [];
|
|
|
|
selection.forEach(item => {
|
2022-10-08 18:25:12 +08:00
|
|
|
arr.push(item.receiverId);
|
2022-06-30 18:13:23 +08:00
|
|
|
});
|
2022-10-08 18:25:12 +08:00
|
|
|
this.command.receiverIds = arr;
|
2022-06-30 18:13:23 +08:00
|
|
|
},
|
|
|
|
sendCmd() {
|
2022-10-08 18:25:12 +08:00
|
|
|
const test = `【${this.command.number}】号调度命令下达到以下受令人:`;
|
2022-07-07 16:00:03 +08:00
|
|
|
const messageData = [test];
|
|
|
|
const h = this.$createElement;
|
2022-10-08 18:25:12 +08:00
|
|
|
this.command.receiverIds.forEach((item, index) => {
|
|
|
|
const device = this.$store.getters['map/getDeviceByCode'](item);
|
|
|
|
const msg = `${index + 1}. ${device ? device.name : ''}`;
|
2022-07-07 16:00:03 +08:00
|
|
|
messageData.push(h('p', null, msg));
|
|
|
|
});
|
|
|
|
this.$confirm('提示', {
|
|
|
|
title: '操作提示',
|
|
|
|
message: h('div', null, messageData),
|
|
|
|
confirmButtonText: '确定',
|
|
|
|
cancelButtonText: '取消',
|
|
|
|
type: 'warning'
|
2022-07-07 15:03:41 +08:00
|
|
|
}).then(() => {
|
2022-07-08 14:56:33 +08:00
|
|
|
this.$refs['form'].validate((valid) => {
|
|
|
|
if (valid) {
|
|
|
|
if (!this.command.content) {
|
|
|
|
this.$messageBox('请选择填写命令正文');
|
|
|
|
return;
|
|
|
|
}
|
2022-10-08 18:25:12 +08:00
|
|
|
if (!this.command.receiverIds.length) {
|
2022-07-08 14:56:33 +08:00
|
|
|
this.$messageBox('请选择受令单位');
|
|
|
|
return;
|
|
|
|
}
|
2022-10-08 18:25:12 +08:00
|
|
|
const data = {
|
|
|
|
command: this.command
|
|
|
|
};
|
|
|
|
sendCommandNew(this.group, 'CTC_SEND_DISPATCH_COMMAND', data).then((res) => {
|
|
|
|
console.log(res, '---res');
|
|
|
|
this.$message.success('发送调度命令成功!');
|
|
|
|
this.searchCmd();
|
|
|
|
this.initData();
|
|
|
|
}).catch(error => {
|
|
|
|
this.$messageBox('发送调度命令失败:' + error.message);
|
2022-07-08 14:56:33 +08:00
|
|
|
});
|
|
|
|
}
|
2022-07-07 15:03:41 +08:00
|
|
|
});
|
2022-06-30 18:13:23 +08:00
|
|
|
});
|
|
|
|
},
|
|
|
|
searchCmd() {
|
2022-07-19 14:50:52 +08:00
|
|
|
return new Promise((resolve, reject) => {
|
2022-10-08 18:25:12 +08:00
|
|
|
sendCommandNew(this.group, 'CTC_QUERY_DISPATCH_COMMAND', {}).then((res) => {
|
2022-07-19 14:50:52 +08:00
|
|
|
console.log(res, '---res----');
|
2022-10-08 18:25:12 +08:00
|
|
|
this.seachData = res.data;
|
2022-07-19 14:50:52 +08:00
|
|
|
resolve();
|
|
|
|
}).catch(error => {
|
|
|
|
this.$messageBox('查询调度命令失败:' + error.message);
|
|
|
|
reject(error.message);
|
|
|
|
});
|
2022-06-30 18:13:23 +08:00
|
|
|
});
|
2022-06-28 11:29:38 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
};
|
|
|
|
</script>
|
|
|
|
<style lang="scss" scoped>
|
|
|
|
// .dispatcher-cmd{
|
|
|
|
// }
|
|
|
|
.main {
|
|
|
|
height: 100%;
|
|
|
|
.left {
|
|
|
|
height: 100%;
|
2022-07-07 15:03:41 +08:00
|
|
|
.operate-box {
|
|
|
|
overflow-y: auto;
|
|
|
|
}
|
2022-06-30 18:13:23 +08:00
|
|
|
.create-cmd {
|
2022-07-07 15:03:41 +08:00
|
|
|
height: 30px;
|
|
|
|
display: flex;
|
2022-07-07 15:14:42 +08:00
|
|
|
justify-content: flex-end;
|
2022-07-07 15:03:41 +08:00
|
|
|
align-items: center;
|
|
|
|
}
|
|
|
|
.box-title {
|
|
|
|
height: 28px;
|
|
|
|
display: flex;
|
|
|
|
justify-content: center;
|
|
|
|
align-items: center;
|
|
|
|
background: #B3B2C2;
|
|
|
|
.contant-null, .contant-icon {
|
|
|
|
width: 20px;
|
|
|
|
display: flex;
|
|
|
|
justify-content: center;
|
|
|
|
}
|
|
|
|
.contant-icon:hover {
|
|
|
|
cursor: pointer;
|
|
|
|
}
|
|
|
|
.contant-text {
|
|
|
|
display: flex;
|
|
|
|
justify-content: center;
|
|
|
|
flex: 1;
|
|
|
|
color: blue;
|
|
|
|
}
|
2022-06-30 18:13:23 +08:00
|
|
|
}
|
2022-07-19 14:50:52 +08:00
|
|
|
.search-box {
|
|
|
|
height: 720px;
|
|
|
|
display: flex;
|
|
|
|
flex-direction: column;
|
|
|
|
justify-content: center;
|
|
|
|
.search-condition {
|
|
|
|
padding: 5px;
|
|
|
|
.condition-top {
|
|
|
|
padding: 5px;
|
|
|
|
}
|
|
|
|
.condition-btn {
|
|
|
|
padding: 10px;
|
|
|
|
text-align: center;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
.search-table {
|
|
|
|
flex: 1;
|
|
|
|
}
|
|
|
|
.condition-border {
|
|
|
|
margin: 10px 0;
|
|
|
|
padding: 5px;
|
|
|
|
border: 1px solid #92ACD7;
|
|
|
|
div {
|
|
|
|
margin: 5px 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
.condition-row {
|
|
|
|
display: flex;
|
|
|
|
justify-content: space-between;
|
|
|
|
align-items: center;
|
|
|
|
height: 32px;
|
|
|
|
line-height: 32px;
|
|
|
|
}
|
|
|
|
.el-checkbox {
|
|
|
|
margin-right: 5px;
|
|
|
|
}
|
|
|
|
}
|
2022-06-28 11:29:38 +08:00
|
|
|
}
|
2022-06-29 10:36:57 +08:00
|
|
|
/deep/ .el-tabs__item {
|
|
|
|
height: 30px !important;
|
|
|
|
line-height: 30px !important;
|
|
|
|
}
|
2022-07-19 14:50:52 +08:00
|
|
|
.middle, .left {
|
2022-06-29 10:36:57 +08:00
|
|
|
/deep/ .el-form-item {
|
|
|
|
margin-bottom: 0px;
|
2022-07-08 14:56:33 +08:00
|
|
|
.el-form-item__error {
|
|
|
|
top: 30px;
|
|
|
|
}
|
2022-06-29 10:36:57 +08:00
|
|
|
}
|
2022-06-30 18:13:23 +08:00
|
|
|
.el-input {
|
|
|
|
/deep/ .el-input__icon {
|
|
|
|
line-height: 22px;
|
|
|
|
}
|
2022-06-29 10:36:57 +08:00
|
|
|
}
|
|
|
|
.midle-bottom {
|
|
|
|
height: 40px;
|
|
|
|
display: flex;
|
|
|
|
justify-content: center;
|
|
|
|
align-items: center;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</style>
|
|
|
|
<style>
|
|
|
|
.dispatcher-cmd .el-dialog .el-dialog__body {
|
|
|
|
padding: 5px !important;
|
|
|
|
}
|
|
|
|
.dispatcher-cmd .el-dialog {
|
|
|
|
margin-top: 8vh !important;
|
2022-06-28 11:29:38 +08:00
|
|
|
}
|
2022-07-19 14:50:52 +08:00
|
|
|
.dispatcher-cmd .el-tabs--border-card>.el-tabs__content {
|
|
|
|
padding: 5px !important;
|
|
|
|
}
|
2022-06-28 11:29:38 +08:00
|
|
|
</style>
|