1
lzhe
2024-06-05 dcf9c9e0410fe1186239e3f8d6f7bdc789c08010
src/views/mdc/state-feedback.vue
@@ -2,59 +2,69 @@
 * @Author: lzhe lzhe@example.com
 * @Date: 2024-03-26 10:28:33
 * @LastEditors: lzhe lzhe@example.com
 * @LastEditTime: 2024-06-05 11:37:06
 * @LastEditTime: 2024-06-05 12:03:50
 * @FilePath: /smart-web/src/views/master/person/main/index.vue
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<template>
   <div class="aposcope-main">
      <div class="aposcope-left">
         <div class="left-title">工位</div>
         <el-tree :data="tableData" node-key="id" default-expand-all :expand-on-click-node="false" :props="defalutProps" @node-click="handleNodeClick" ref="treeRef" highlight-current />
      </div>
      <div class="aposcope-right">
         <div class="right-top">
            <div>
               <el-button type="primary" @click="addData">反馈</el-button>
               <el-button type="danger" plain @click="delData">批量删除</el-button>
            </div>
            <div>
               <el-select v-model="searchData.feedBackStatus" multiple style="width: 185px;margin-right: 8px;;" @change="feedBackStatusChange">
                  <el-option v-for="item in feedBackStatusList" :key="item.code" :label="item.name" :value="item.code"/>
               </el-select>
               <el-date-picker v-model="searchData.date" type="datetimerange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" align="right" value-format="YYYY-MM-DD HH:mm:ss" @change="dateChange" style="vertical-align: middle;">
               </el-date-picker>
            </div>
         </div>
         <div class="right-content" v-if="searchDataList.length == 0">
            <!-- <img src="./quesheng.bd026700.png" /> -->
            <div>
               <span>暂无反馈状态数据</span>
            </div>
         </div>
         <el-table ref="searchDataListRef" v-if="searchDataList.length != 0" :data="searchDataList" border style="width: 100%;margin-top: 20px;" class="multipleTableRef" @selection-change="searchHandleSelectionChange">
            <el-table-column type="selection" width="55" />
            <el-table-column prop="workstationName" label="工位名称"></el-table-column>
            <el-table-column prop="wcsDesc" label="状态"></el-table-column>
            <el-table-column prop="feedbackDesc" label="描述"></el-table-column>
            <el-table-column prop="httpMethod" label="持续时长">
               <template #default="scope">
                  <span>{{sumTime(scope.row.startTime,scope.row.endTime)}}</span>
               </template>
            </el-table-column>
            <el-table-column prop="scopePath" label="状态时间">
               <template #default="scope">
                  <span>{{scope.row.startTime}}~{{ scope.row.endTime }}</span>
               </template>
            </el-table-column>
            <el-table-column fixed="right" label="操作">
               <template #default="scope">
                  <el-button text type="primary" size="small" @click="table_del(scope.row, scope.$index)">删除</el-button>
               </template>
            </el-table-column>
         </el-table>
      </div>
   </div>
   <el-main style="height: 100%;">
        <el-card shadow="never" style="height: 100%;" body-style="height: 100%;padding: 0;">
            <el-container style="height: 100%;">
                <el-aside width="300px" style="height: 100%;">
                    <el-container style="flex-direction: column;">
                  <div class="left-title">工位</div>
                        <el-main style="padding: 12px 20px 20px;">
                     <el-tree :data="tableData" node-key="id" default-expand-all :expand-on-click-node="false" :props="defalutProps" @node-click="handleNodeClick" ref="treeRef" highlight-current />
                        </el-main>
                    </el-container>
                </el-aside>
                <el-container>
                    <el-main>
                        <div class="right-top">
                     <div>
                        <el-button type="primary" @click="addData">反馈</el-button>
                        <el-button type="danger" plain @click="delData">批量删除</el-button>
                     </div>
                     <div>
                        <el-select v-model="searchData.feedBackStatus" multiple style="width: 185px;margin-right: 8px;;" @change="feedBackStatusChange">
                           <el-option v-for="item in feedBackStatusList" :key="item.code" :label="item.name" :value="item.code"/>
                        </el-select>
                        <el-date-picker v-model="searchData.date" type="datetimerange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" align="right" value-format="YYYY-MM-DD HH:mm:ss" @change="dateChange" style="vertical-align: middle;">
                        </el-date-picker>
                     </div>
                  </div>
                  <div class="right-content" v-if="searchDataList.length == 0">
                     <!-- <img src="./quesheng.bd026700.png" /> -->
                     <div style="margin-top: 120px;font-size: 16px;color: #666;">
                        <span>暂无反馈状态数据</span>
                     </div>
                  </div>
                  <el-table ref="searchDataListRef" v-if="searchDataList.length != 0" :data="searchDataList" border style="width: 100%;margin-top: 20px;" class="multipleTableRef" @selection-change="searchHandleSelectionChange">
                     <el-table-column type="selection" width="55" />
                     <el-table-column prop="workstationName" label="工位名称"></el-table-column>
                     <el-table-column prop="wcsDesc" label="状态"></el-table-column>
                     <el-table-column prop="feedbackDesc" label="描述"></el-table-column>
                     <el-table-column prop="httpMethod" label="持续时长">
                        <template #default="scope">
                           <span>{{sumTime(scope.row.startTime,scope.row.endTime)}}</span>
                        </template>
                     </el-table-column>
                     <el-table-column prop="scopePath" label="状态时间">
                        <template #default="scope">
                           <span>{{scope.row.startTime}}~{{ scope.row.endTime }}</span>
                        </template>
                     </el-table-column>
                     <el-table-column fixed="right" label="操作">
                        <template #default="scope">
                           <el-button text type="primary" size="small" @click="table_del(scope.row, scope.$index)">删除</el-button>
                        </template>
                     </el-table-column>
                  </el-table>
                    </el-main>
                </el-container>
            </el-container>
        </el-card>
    </el-main>
   <save-dialog v-if="dialog.save" ref="saveDialog" :feedBackStatusList="feedBackStatusList" :workstationId="lastLevelId" @success="addfeedbackSuccess" @closed="dialog.save=false"></save-dialog>
</template>
<script>