You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1453 lines
48 KiB

3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
  1. <template>
  2. <div class="mod-config">
  3. <div>
  4. <span @click="favoriteFunction()">
  5. <icon-svg :name="favorite?'xiangqufill':'xiangqu'" class="sl-svg"></icon-svg>
  6. </span>
  7. </div>
  8. <el-form :inline="true" label-position="top" :model="searchData" @keyup.enter.native="getDataList()">
  9. <el-form-item :label="'反馈单号'">
  10. <el-input v-model="searchData.planID" clearable style="width: 120px"></el-input>
  11. </el-form-item>
  12. <el-form-item :label="'工单编码'">
  13. <el-input v-model="searchData.orderNo" clearable style="width: 120px"></el-input>
  14. </el-form-item>
  15. <el-form-item :label="'设备编码'">
  16. <el-input v-model="searchData.objectID" clearable style="width: 120px"></el-input>
  17. </el-form-item>
  18. <el-form-item style="margin-left: 0px" >
  19. <span slot="label" style="" @click="getBaseList(201)"><a herf="#">计划执行人员编码</a></span>
  20. <el-input v-model="searchData.planOperator" clearable style="width: 120px"></el-input>
  21. </el-form-item>
  22. <el-form-item :label="'状态'">
  23. <el-select v-model="searchData.status" style="width: 100px">
  24. <el-option label="全部" value=""></el-option>
  25. <el-option label="未开工" value="未开工"></el-option>
  26. <el-option label="已到达" value="已到达"></el-option>
  27. </el-select>
  28. </el-form-item>
  29. <el-form-item :label="'单据来源'">
  30. <el-select v-model="searchData.documentSource" style="width: 100px">
  31. <el-option label="全部" value=""></el-option>
  32. <el-option label="设备点检" value="设备点检"></el-option>
  33. <el-option label="设备维修" value="设备维修"></el-option>
  34. </el-select>
  35. </el-form-item>
  36. <el-form-item :label="'计划执行日期:'">
  37. <el-date-picker
  38. style="width: 120px"
  39. v-model="searchData.startDate"
  40. type="date"
  41. value-format="yyyy-MM-dd"
  42. placeholder="选择日期">
  43. </el-date-picker>
  44. </el-form-item>
  45. <el-form-item style="margin-top: 23px;">
  46. <laber style="margin-left: -9px;font-size: 19px">&#10142</laber>
  47. </el-form-item>
  48. <el-form-item :label="' '">
  49. <el-date-picker
  50. style="width: 120px"
  51. v-model="searchData.endDate"
  52. type="date"
  53. value-format="yyyy-MM-dd"
  54. placeholder="选择日期">
  55. </el-date-picker>
  56. </el-form-item>
  57. <el-form-item label=" ">
  58. <el-button @click="getDataList()">查询</el-button>
  59. <download-excel
  60. :fields="fields()"
  61. :data="exportData"
  62. type="xls"
  63. :name="exportName"
  64. :header="exportHeader"
  65. :footer="exportFooter"
  66. :fetch="createExportData"
  67. :before-generate="startDownload"
  68. :before-finish="finishDownload"
  69. worksheet="导出信息"
  70. class="el-button el-button--primary el-button--medium">
  71. {{ "导出" }}
  72. </download-excel>
  73. </el-form-item>
  74. </el-form>
  75. <el-table
  76. :height="height"
  77. :data="dataList"
  78. border
  79. v-loading="dataListLoading"
  80. style="width: 100%;">
  81. <el-table-column
  82. v-for="(item,index) in columnList" :key="index"
  83. :sortable="item.columnSortable"
  84. :prop="item.columnProp"
  85. :header-align="item.headerAlign"
  86. :show-overflow-tooltip="item.showOverflowTooltip"
  87. :align="item.align"
  88. :fixed="item.fixed==''?false:item.fixed"
  89. :min-width="item.columnWidth"
  90. :label="item.columnLabel">
  91. <template slot-scope="scope">
  92. <span v-if="!item.columnHidden">{{scope.row[item.columnProp]}}</span>
  93. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
  94. </template>
  95. </el-table-column>
  96. <el-table-column
  97. prop=""
  98. header-align="center"
  99. align="center"
  100. min-width="100"
  101. fixed="right"
  102. label="操作">
  103. <template slot-scope="scope">
  104. <a type="text" size="small" v-if="scope.row.status=='未开工'" @click="chooseReachOperator(scope.row)">到达</a>
  105. <a type="text" size="small" v-if="scope.row.status=='已到达'" @click="reportModal(scope.row)">执行</a>
  106. </template>
  107. </el-table-column>
  108. </el-table>
  109. <el-pagination
  110. @size-change="sizeChangeHandle"
  111. @current-change="currentChangeHandle"
  112. :current-page="pageIndex"
  113. :page-sizes="[20, 50, 100, 200, 500]"
  114. :page-size="pageSize"
  115. :total="totalPage"
  116. layout="total, sizes, prev, pager, next, jumper">
  117. </el-pagination>
  118. <el-dialog title="执行维修工单" :close-on-click-modal="false" v-drag :visible.sync="detailModelFlag" width="1200px">
  119. <el-form :inline="true" label-position="top" @keyup.enter.native="getDataList()">
  120. <el-form-item :label="'工单号'">
  121. <el-input v-model="saveData.orderNo" disabled style="width: 221px"></el-input>
  122. </el-form-item>
  123. <el-form-item :label="'计划执行人员'">
  124. <el-input v-model="saveData.planOperatorName" disabled style="width: 221px"></el-input>
  125. </el-form-item>
  126. <el-form-item label="设备编码">
  127. <el-input v-model="saveData.objectID" disabled style="width: 221px"></el-input>
  128. </el-form-item>
  129. <el-form-item label="设备名称">
  130. <el-input v-model="saveData.objectDesc" disabled style="width: 240px"></el-input>
  131. </el-form-item>
  132. </el-form>
  133. <el-tabs v-model="activeTable" style="margin-top: 10px; width: 100%; height: 100%;" type="border-card" @tab-click="tabClick" class="customer-tab">
  134. <el-tab-pane label="维修单" name="inspection_form" style="height: 305px">
  135. <el-form :inline="true" label-position="top" @keyup.enter.native="getDataList()">
  136. <el-form-item>
  137. <span slot="label" style="" @click="getBaseList(1033)"><a herf="#">故障编码</a></span>
  138. <el-input v-model="saveData.defectID" style="width: 221px"></el-input>
  139. </el-form-item>
  140. <el-form-item label="故障名称">
  141. <el-input v-model="saveData.defectDesc" disabled style="width: 221px"></el-input>
  142. </el-form-item>
  143. <el-form-item :label="'到达时间'">
  144. <el-date-picker
  145. style="width: 221px"
  146. v-model="saveData.reachDate"
  147. :picker-options="pickerOptions"
  148. type="datetime"
  149. value-format='yyyy-MM-dd HH:mm:ss'
  150. format='yyyy-MM-dd HH:mm:ss'
  151. placeholder="到达时间"
  152. :editable="false"
  153. @focus='elDatePickerOnFocus'
  154. @change="handleChangeTime"
  155. disabled>
  156. </el-date-picker>
  157. </el-form-item>
  158. <el-form-item :label="' '">
  159. <el-button type="primary" @click="uploadFaultImageModal()">故障图片</el-button>
  160. </el-form-item>
  161. <el-form-item :label="' '">
  162. <el-button type="primary" @click="uploadSparPartImageModal()">备件图片</el-button>
  163. </el-form-item>
  164. </el-form>
  165. <el-form :inline="true" label-position="top" @keyup.enter.native="getDataList()">
  166. <el-form-item >
  167. <span slot="label" @click="getOperatorList()"><a>选择执行人员</a></span>
  168. <el-input v-model="saveData.operatorName" style="width: 556px"></el-input>
  169. </el-form-item>
  170. <el-form-item :label="'维修结果'">
  171. <el-select v-model="saveData.result" style="width: 155px">
  172. <el-option label="维修完成" value="维修完成"></el-option>
  173. <el-option label="维修失败" value="维修失败"></el-option>
  174. </el-select>
  175. </el-form-item>
  176. <el-form-item v-if="this.saveData.result === '维修失败'" :label="'处置措施'">
  177. <el-select v-model="saveData.disposalMeasures" style="width: 120px">
  178. <el-option label="缺少备件" value="缺少备件"></el-option>
  179. <el-option label="等待售后" value="等待售后"></el-option>
  180. <el-option label="远程协助" value="远程协助"></el-option>
  181. <el-option label="换班换人" value="换班换人"></el-option>
  182. </el-select>
  183. </el-form-item>
  184. </el-form>
  185. <el-form :inline="true" label-position="top">
  186. <el-form-item label="反馈描述">
  187. <el-input v-model="saveData.feedBackDesc" style="width: 860px"></el-input>
  188. </el-form-item>
  189. </el-form>
  190. <el-form :inline="true" label-position="top">
  191. <el-form-item :label="'故障原因'">
  192. <el-input type="textarea" v-model="saveData.faultReason" :rows="3" resize='none' show-word-limit style="width: 560px"></el-input>
  193. </el-form-item>
  194. <el-form-item :label="'处理方式'">
  195. <el-input type="textarea" v-model="saveData.handlingMethod" :rows="3" resize='none' show-word-limit style="width: 560px"></el-input>
  196. </el-form-item>
  197. </el-form>
  198. <el-form :inline="true" label-position="top" style="margin-top: 45px">
  199. <el-form-item :label="'预防措施'">
  200. <el-input type="textarea" v-model="saveData.preventiveMeasure" :rows="3" resize='none' show-word-limit style="width: 560px"></el-input>
  201. </el-form-item>
  202. <el-form-item :label="'执行结果备注'">
  203. <el-input type="textarea" v-model="saveData.remark" :rows="3" resize='none' show-word-limit style="width: 560px"></el-input>
  204. </el-form-item>
  205. </el-form>
  206. </el-tab-pane>
  207. <el-tab-pane label="维修记录" name="history_record">
  208. <div class="rq ">
  209. <el-table
  210. :height="305"
  211. :data="HistoryRecordList"
  212. border
  213. v-loading="dataListLoading"
  214. style="width: 100%;">
  215. <el-table-column
  216. v-for="(item,index) in columnHistoryList" :key="index"
  217. :sortable="item.columnSortable"
  218. :prop="item.columnProp"
  219. :header-align="item.headerAlign"
  220. :show-overflow-tooltip="item.showOverflowTooltip"
  221. :align="item.align"
  222. :fixed="item.fixed==''?false:item.fixed"
  223. :min-width="item.columnWidth"
  224. :label="item.columnLabel">
  225. <template slot-scope="scope">
  226. <span v-if="!item.columnHidden"> {{ scope.row[item.columnProp] }}</span>
  227. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
  228. </template>
  229. </el-table-column>
  230. <el-table-column
  231. fixed="right"
  232. header-align="center"
  233. align="center"
  234. width="120"
  235. label="图片">
  236. <template slot-scope="scope">
  237. <!-- <a type="text" size="small" @click="detailModal(scope.row)">详情</a>-->
  238. <el-button type="primary" @click="checkFaultImageModal(scope.row)" >故障</el-button>
  239. <el-button type="primary" @click="checkSparPartImageModal(scope.row)" >备件</el-button>
  240. </template>
  241. </el-table-column>
  242. </el-table>
  243. </div>
  244. </el-tab-pane>
  245. </el-tabs>
  246. <el-footer style="height:40px;margin-top: 20px;text-align:center">
  247. <el-button type="primary" @click="saveCheckReport()">保存</el-button>
  248. <el-button type="primary" @click="detailModelFlag = false">关闭</el-button>
  249. </el-footer>
  250. </el-dialog>
  251. <!-- 执行人员清单 -->
  252. <el-dialog title="执行人员清单" :close-on-click-modal="false" v-drag :visible.sync="operatorModelFlag" width="820px">
  253. <div class="rq">
  254. <el-form :inline="true" label-position="top" :model="operatorData">
  255. <el-form-item :label="'人员编码'">
  256. <el-input v-model="operatorData.adminID" clearable style="width: 120px"></el-input>
  257. </el-form-item>
  258. <el-form-item :label="'人员姓名'">
  259. <el-input v-model="operatorData.adminName" clearable style="width: 120px"></el-input>
  260. </el-form-item>
  261. <el-form-item :label="'部门'">
  262. <el-input v-model="operatorData.departmentName" clearable style="width: 120px"></el-input>
  263. </el-form-item>
  264. <el-form-item :label="' '">
  265. <el-button type="primary" @click="getOperatorList()">查询</el-button>
  266. </el-form-item>
  267. </el-form>
  268. <el-table
  269. :height="300"
  270. :data="operatorList"
  271. ref="operatorTable"
  272. @row-click="operatorClickRow"
  273. @selection-change="selectionChangeHandle2"
  274. border
  275. v-loading="dataListLoading"
  276. style="width: 100%;">
  277. <el-table-column
  278. type="selection"
  279. header-align="center"
  280. align="center"
  281. :selectable="selectFlag"
  282. width="50">
  283. </el-table-column>
  284. <el-table-column
  285. v-for="(item,index) in operatorDetailList" :key="index"
  286. :sortable="item.columnSortable"
  287. :prop="item.columnProp"
  288. :header-align="item.headerAlign"
  289. :show-overflow-tooltip="item.showOverflowTooltip"
  290. :align="item.align"
  291. :fixed="item.fixed==''?false:item.fixed"
  292. :min-width="item.columnWidth"
  293. :label="item.columnLabel">
  294. <template slot-scope="scope">
  295. <span v-if="!item.columnHidden">{{ scope.row[item.columnProp] }}</span>
  296. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
  297. </template>
  298. </el-table-column>
  299. </el-table>
  300. </div>
  301. <el-footer style="height:40px;margin-top: 20px;text-align:center">
  302. <el-button type="primary" @click="confirmOperator()">确认</el-button>
  303. <el-button type="primary" @click="operatorModelFlag = false">关闭</el-button>
  304. </el-footer>
  305. </el-dialog>
  306. <el-dialog title="到达" :close-on-click-modal="false" v-drag :visible.sync="chooseReachModelFlag" width="410px">
  307. <el-form :inline="true" label-position="top">
  308. <el-form-item >
  309. <span slot="label" @click="getOperatorList()"><a>选择到达人员</a></span>
  310. <el-input v-model="saveData.operatorName" style="width: 389px"></el-input>
  311. </el-form-item>
  312. </el-form>
  313. <el-footer style="height:40px;margin-top: 20px;text-align:center">
  314. <el-button type="primary" @click="reach()">保存</el-button>
  315. <el-button type="primary" @click="chooseReachModelFlag = false">关闭</el-button>
  316. </el-footer>
  317. </el-dialog>
  318. <el-dialog title="图片查看" :close-on-click-modal="false" v-drag :visible.sync="imageModalFlag" width="390px" style="height: 550px;">
  319. <div v-viewer>
  320. <img v-for="(item, index) in descImages" :src="item" :key="index" style="width: 100px;height: 100px"/>
  321. </div>
  322. <el-footer style="height:40px;margin-top: 20px;text-align:center">
  323. <el-button type="primary" @click="imageModalFlag = false">关闭</el-button>
  324. </el-footer>
  325. </el-dialog>
  326. <Chooselist ref="baseList" @getBaseData="getBaseData"></Chooselist>
  327. <!-- 上传文件的modal -->
  328. <reportImageUpload ref="reportImageUpload" @refreshPageTables="getDataList()" v-drag></reportImageUpload>
  329. </div>
  330. </template>
  331. <script>
  332. import {
  333. eamWorkOrderSearch,
  334. eamWorkOrderItemSearch,
  335. saveOrderReportForDefect,
  336. checkSparPartImage,
  337. getOperatorList, // 获取机修人员列表
  338. queryHistoryRecord,
  339. searchFileUrl, // 查询文件路径
  340. reach // 到达
  341. } from "@/api/eam/eam.js"
  342. import Chooselist from '@/views/modules/common/Chooselist_eam'
  343. import {userFavoriteList, saveUserFavorite, removeUserFavorite} from '@/api/userFavorite.js'
  344. import reportImageUpload from "./report_image_upload.vue";
  345. export default {
  346. components: {
  347. Chooselist,
  348. reportImageUpload
  349. },
  350. watch: {
  351. saveData: {
  352. deep: true,
  353. handler: function (newV, oldV) {
  354. this.saveData.workTime = Math.ceil(Math.floor(this.dayjs(this.saveData.endDate).diff(this.saveData.startDate, 'seconds') / 30) / 2)
  355. }
  356. },
  357. searchData: {
  358. deep: true,
  359. handler: function (newV, oldV) {
  360. this.searchData.groupID = this.searchData.groupID.toUpperCase()
  361. }
  362. },
  363. modalData: {
  364. deep: true,
  365. handler: function (newV, oldV) {
  366. this.modalData.groupID = this.modalData.groupID.toUpperCase()
  367. }
  368. }
  369. },
  370. data () {
  371. return {
  372. // 是否收藏
  373. favorite: false,
  374. tagNo:'',
  375. // 导出 start
  376. exportData: [],
  377. exportName: "维修执行" + this.dayjs().format('YYYYMMDDHHmmss'),
  378. exportHeader: ["维修执行"],
  379. exportFooter: [],
  380. exportList:[],
  381. // 导出 end
  382. searchData: {
  383. site: this.$store.state.user.site,
  384. username: this.$store.state.user.name,
  385. orderNo: '',
  386. planID: '',
  387. objectID: '',
  388. planOperator: '',
  389. functionType: 'C',
  390. status: '',
  391. startDate:'',
  392. endDate:'',
  393. page: 1,
  394. limit: 10,
  395. searchType: 'reportDefect',
  396. documentSource: ''
  397. },
  398. height: 200,
  399. pageIndex: 1,
  400. pageSize: 50,
  401. totalPage: 0,
  402. dataList: [],
  403. dataListLoading: false,
  404. dataListSelections: [],
  405. modalFlag:false,
  406. modalDisableFlag:false,
  407. modalData:{
  408. flag:'',
  409. site: this.$store.state.user.site,
  410. groupID:'',
  411. groupDesc:'',
  412. active:'',
  413. },
  414. departmentList:[],
  415. // 展示列集
  416. columnList: [
  417. {
  418. userId: this.$store.state.user.name,
  419. functionId: 101020,
  420. serialNumber: '101020TableOrderNo',
  421. tableId: "101020Table",
  422. tableName: "common",
  423. columnProp: 'urgency',
  424. headerAlign: "center",
  425. align: "center",
  426. columnLabel: '紧急程度',
  427. columnHidden: false,
  428. columnImage: false,
  429. columnSortable: false,
  430. sortLv: 0,
  431. status: true,
  432. fixed: '',
  433. columnWidth: 60,
  434. },
  435. {
  436. userId: this.$store.state.user.name,
  437. functionId: 101020,
  438. serialNumber: '101020TableOrderNo',
  439. tableId: "101020Table",
  440. tableName: "common",
  441. columnProp: 'orderNo',
  442. headerAlign: "center",
  443. align: "center",
  444. columnLabel: '工单编码',
  445. columnHidden: false,
  446. columnImage: false,
  447. columnSortable: false,
  448. sortLv: 0,
  449. status: true,
  450. fixed: '',
  451. },
  452. {
  453. userId: this.$store.state.user.name,
  454. functionId: 101020,
  455. serialNumber: '101020TablePlanID',
  456. tableId: "101020Table",
  457. tableName: "common",
  458. columnProp: 'planID',
  459. headerAlign: "center",
  460. align: "center",
  461. columnLabel: '反馈单号',
  462. columnHidden: false,
  463. columnImage: false,
  464. columnSortable: false,
  465. sortLv: 0,
  466. status: true,
  467. fixed: '',
  468. },
  469. {
  470. userId: this.$store.state.user.name,
  471. functionId: 101020,
  472. serialNumber: '101020TablePlanID',
  473. tableId: "101020Table",
  474. tableName: "common",
  475. columnProp: 'feedBackDesc',
  476. headerAlign: "center",
  477. align: "center",
  478. columnLabel: '反馈描述',
  479. columnHidden: false,
  480. columnImage: false,
  481. columnSortable: false,
  482. sortLv: 0,
  483. status: true,
  484. fixed: '',
  485. },
  486. {
  487. userId: this.$store.state.user.name,
  488. functionId: 101020,
  489. serialNumber: '101020TablePlanID',
  490. tableId: "101020Table",
  491. tableName: "common",
  492. columnProp: 'defectID',
  493. headerAlign: "center",
  494. align: "center",
  495. columnLabel: '故障编码',
  496. columnHidden: false,
  497. columnImage: false,
  498. columnSortable: false,
  499. sortLv: 0,
  500. status: true,
  501. fixed: '',
  502. },
  503. {
  504. userId: this.$store.state.user.name,
  505. functionId: 101020,
  506. serialNumber: '101020TablePlanID',
  507. tableId: "101020Table",
  508. tableName: "common",
  509. columnProp: 'defectDesc',
  510. headerAlign: "center",
  511. align: "center",
  512. columnLabel: '故障名称',
  513. columnHidden: false,
  514. columnImage: false,
  515. columnSortable: false,
  516. sortLv: 0,
  517. status: true,
  518. fixed: '',
  519. },
  520. {
  521. userId: this.$store.state.user.name,
  522. functionId: 101020,
  523. serialNumber: '101020TableObjectID',
  524. tableId: "101020Table",
  525. tableName: "common",
  526. columnProp: 'objectID',
  527. headerAlign: "center",
  528. align: "center",
  529. columnLabel: '设备编码',
  530. columnHidden: false,
  531. columnImage: false,
  532. columnSortable: false,
  533. sortLv: 0,
  534. status: true,
  535. fixed: '',
  536. },
  537. {
  538. userId: this.$store.state.user.name,
  539. functionId: 101020,
  540. serialNumber: '101020TableObjectID',
  541. tableId: "101020Table",
  542. tableName: "common",
  543. columnProp: 'objectDesc',
  544. headerAlign: "center",
  545. align: "center",
  546. columnLabel: '设备名称',
  547. columnHidden: false,
  548. columnImage: false,
  549. columnSortable: false,
  550. sortLv: 0,
  551. status: true,
  552. fixed: '',
  553. },
  554. {
  555. userId: this.$store.state.user.name,
  556. functionId: 101020,
  557. serialNumber: '101020TableObjectID',
  558. tableId: "101020Table",
  559. tableName: "common",
  560. columnProp: 'createBy',
  561. headerAlign: "center",
  562. align: "center",
  563. columnLabel: '报修人员名称',
  564. columnHidden: false,
  565. columnImage: false,
  566. columnSortable: false,
  567. sortLv: 0,
  568. status: true,
  569. fixed: '',
  570. },
  571. {
  572. userId: this.$store.state.user.name,
  573. functionId: 101020,
  574. serialNumber: '101020TableStatus',
  575. tableId: "101020Table",
  576. tableName: "common",
  577. columnProp: 'status',
  578. headerAlign: "center",
  579. align: "center",
  580. columnLabel: '状态',
  581. columnHidden: false,
  582. columnImage: false,
  583. columnSortable: false,
  584. sortLv: 0,
  585. status: true,
  586. fixed: '',
  587. },
  588. {
  589. userId: this.$store.state.user.name,
  590. functionId: 101020,
  591. serialNumber: '101020TablePlanOperatorName',
  592. tableId: "101020Table",
  593. tableName: "common",
  594. columnProp: 'planOperatorName',
  595. headerAlign: "center",
  596. align: "center",
  597. columnLabel: '计划执行人员',
  598. columnHidden: false,
  599. columnImage: false,
  600. columnSortable: false,
  601. sortLv: 0,
  602. status: true,
  603. fixed: '',
  604. },
  605. // {
  606. // userId: this.$store.state.user.name,
  607. // functionId: 101020,
  608. // serialNumber: '101020TableActualOperatorName',
  609. // tableId: "101020Table",
  610. // tableName: "common",
  611. // columnProp: 'actualOperatorName',
  612. // headerAlign: "center",
  613. // align: "center",
  614. // columnLabel: '实际机修人员',
  615. // columnHidden: false,
  616. // columnImage: false,
  617. // columnSortable: false,
  618. // sortLv: 0,
  619. // status: true,
  620. // fixed: '',
  621. // },
  622. {
  623. userId: this.$store.state.user.name,
  624. functionId: 101020,
  625. serialNumber: '101020TableActualPlanDate',
  626. tableId: "101020Table",
  627. tableName: "common",
  628. columnProp: 'planDate',
  629. headerAlign: "center",
  630. align: "center",
  631. columnLabel: '计划执行日期',
  632. columnHidden: false,
  633. columnImage: false,
  634. columnSortable: false,
  635. sortLv: 0,
  636. status: true,
  637. fixed: '',
  638. },
  639. // {
  640. // userId: this.$store.state.user.name,
  641. // functionId: 101020,
  642. // serialNumber: '101020TableActualActualDate',
  643. // tableId: "101020Table",
  644. // tableName: "common",
  645. // columnProp: 'actualDate',
  646. // headerAlign: "center",
  647. // align: "center",
  648. // columnLabel: '实际执行时间',
  649. // columnHidden: false,
  650. // columnImage: false,
  651. // columnSortable: false,
  652. // sortLv: 0,
  653. // status: true,
  654. // fixed: '',
  655. // },
  656. // {
  657. // userId: this.$store.state.user.name,
  658. // functionId: 101020,
  659. // serialNumber: '101020TableWorkTime',
  660. // tableId: "101020Table",
  661. // tableName: "common",
  662. // columnProp: 'workTime',
  663. // headerAlign: "center",
  664. // align: "center",
  665. // columnLabel: '工作时间',
  666. // columnHidden: false,
  667. // columnImage: false,
  668. // columnSortable: false,
  669. // sortLv: 0,
  670. // status: true,
  671. // fixed: '',
  672. // },
  673. {
  674. userId: this.$store.state.user.name,
  675. functionId: 101020,
  676. serialNumber: '101020TableActualRemark',
  677. tableId: "101020Table",
  678. tableName: "common",
  679. columnProp: 'remark',
  680. headerAlign: "center",
  681. align: "center",
  682. columnLabel: '备注',
  683. columnHidden: false,
  684. columnImage: false,
  685. columnSortable: false,
  686. sortLv: 0,
  687. status: true,
  688. fixed: '',
  689. },
  690. {
  691. userId: this.$store.state.user.name,
  692. functionId: 101020,
  693. serialNumber: '101020TableActualRemark',
  694. tableId: "101020Table",
  695. tableName: "common",
  696. columnProp: 'documentSource',
  697. headerAlign: "center",
  698. align: "center",
  699. columnLabel: '单据来源',
  700. columnHidden: false,
  701. columnImage: false,
  702. columnSortable: false,
  703. sortLv: 0,
  704. status: true,
  705. fixed: '',
  706. },
  707. ],
  708. detailModelFlag:false,
  709. detailList:[],
  710. saveData:{
  711. site:'',
  712. functionType: 'C',
  713. orderNo:'',
  714. planOperatorName:'',
  715. startDate: '',
  716. endDate: '',
  717. workTime:'',
  718. remark:'',
  719. mesUser:'',
  720. planID:'',
  721. itemList:[],
  722. result:'',
  723. defectID: '',
  724. defectDesc: '',
  725. operator: '',
  726. operatorName: '',
  727. disposalMeasures: '',
  728. objectID: '',
  729. objectDesc: '',
  730. checkWorkPlanId: '',
  731. checkItemNo: '',
  732. reachDate: '',
  733. finishDate: '',
  734. handlingMethod: '',
  735. feedBackDesc: '',
  736. faultReason: '',
  737. preventiveMeasure: ''
  738. },
  739. operatorData: {
  740. site: this.$store.state.user.site,
  741. adminID: '',
  742. adminName: '',
  743. departmentName: ''
  744. },
  745. operatorModelFlag: false,
  746. operatorList: [],
  747. dataListSelections2: [],
  748. operatorDetailList: [
  749. {
  750. columnProp: 'adminID',
  751. headerAlign: "center",
  752. align: "center",
  753. columnLabel: '编码',
  754. columnHidden: false,
  755. columnImage: false,
  756. columnSortable: false,
  757. sortLv: 0,
  758. status: true,
  759. fixed: '',
  760. },
  761. {
  762. columnProp: 'adminName',
  763. headerAlign: "center",
  764. align: "center",
  765. columnLabel: '名称',
  766. columnHidden: false,
  767. columnImage: false,
  768. columnSortable: false,
  769. sortLv: 0,
  770. status: true,
  771. fixed: '',
  772. },
  773. {
  774. columnProp: 'phone',
  775. headerAlign: "center",
  776. align: "center",
  777. columnLabel: '手机号',
  778. columnHidden: false,
  779. columnImage: false,
  780. columnSortable: false,
  781. sortLv: 0,
  782. status: true,
  783. fixed: '',
  784. },
  785. {
  786. columnProp: 'departmentName',
  787. headerAlign: "center",
  788. align: "center",
  789. columnLabel: '部门',
  790. columnHidden: false,
  791. columnImage: false,
  792. columnSortable: false,
  793. sortLv: 0,
  794. status: true,
  795. fixed: '',
  796. },
  797. {
  798. columnProp: 'email',
  799. headerAlign: "center",
  800. align: "center",
  801. columnLabel: '邮箱',
  802. columnHidden: false,
  803. columnImage: false,
  804. columnSortable: false,
  805. sortLv: 0,
  806. status: true,
  807. fixed: '',
  808. },
  809. {
  810. columnProp: 'tel',
  811. headerAlign: "center",
  812. align: "center",
  813. columnLabel: '座机号',
  814. columnHidden: false,
  815. columnImage: false,
  816. columnSortable: false,
  817. sortLv: 0,
  818. status: true,
  819. fixed: '',
  820. },
  821. {
  822. columnProp: 'adminLevelDesc',
  823. headerAlign: "center",
  824. align: "center",
  825. columnLabel: '等级',
  826. columnHidden: false,
  827. columnImage: false,
  828. columnSortable: false,
  829. sortLv: 0,
  830. status: true,
  831. fixed: '',
  832. },
  833. {
  834. columnProp: 'mesUser',
  835. headerAlign: "center",
  836. align: "center",
  837. columnLabel: 'MES账号',
  838. columnHidden: false,
  839. columnImage: false,
  840. columnSortable: false,
  841. sortLv: 0,
  842. status: true,
  843. fixed: '',
  844. },
  845. ],
  846. // 日期限制
  847. pickerOptions: {
  848. disabledDate(time) {
  849. return time.getTime() > Date.now();
  850. },
  851. },
  852. activeTable: 'inspection_form',
  853. HistoryRecordList: [],
  854. columnHistoryList: [
  855. {
  856. columnProp: 'orderNo',
  857. headerAlign: "center",
  858. align: "center",
  859. columnLabel: '工单编号',
  860. columnHidden: false,
  861. columnImage: false,
  862. columnSortable: false,
  863. sortLv: 0,
  864. status: true,
  865. fixed: '',
  866. },
  867. {
  868. columnProp: 'planDesc',
  869. headerAlign: "center",
  870. align: "center",
  871. columnLabel: '故障描述',
  872. columnHidden: false,
  873. columnImage: false,
  874. columnSortable: false,
  875. sortLv: 0,
  876. status: true,
  877. fixed: '',
  878. },
  879. {
  880. columnProp: 'defectDesc',
  881. headerAlign: "center",
  882. align: "center",
  883. columnLabel: '故障名称',
  884. columnHidden: false,
  885. columnImage: false,
  886. columnSortable: false,
  887. sortLv: 0,
  888. status: true,
  889. fixed: '',
  890. },
  891. {
  892. columnProp: 'result',
  893. headerAlign: "center",
  894. align: "center",
  895. columnLabel: '维修结论',
  896. columnHidden: false,
  897. columnImage: false,
  898. columnSortable: false,
  899. sortLv: 0,
  900. status: true,
  901. fixed: '',
  902. },
  903. {
  904. columnProp: 'disposalMeasures',
  905. headerAlign: "center",
  906. align: "center",
  907. columnLabel: '处置措施',
  908. columnHidden: false,
  909. columnImage: false,
  910. columnSortable: false,
  911. sortLv: 0,
  912. status: true,
  913. fixed: '',
  914. },
  915. {
  916. columnProp: 'actualOperatorName',
  917. headerAlign: "center",
  918. align: "center",
  919. columnLabel: '维修人员',
  920. columnHidden: false,
  921. columnImage: false,
  922. columnSortable: false,
  923. sortLv: 0,
  924. status: true,
  925. fixed: '',
  926. },
  927. {
  928. columnProp: 'workTime',
  929. headerAlign: "center",
  930. align: "right",
  931. columnLabel: '工作时长',
  932. columnHidden: false,
  933. columnImage: false,
  934. columnSortable: false,
  935. sortLv: 0,
  936. status: true,
  937. fixed: '',
  938. },
  939. {
  940. columnProp: 'actualDate',
  941. headerAlign: "center",
  942. align: "center",
  943. columnLabel: '维修时间',
  944. columnHidden: false,
  945. columnImage: false,
  946. columnSortable: false,
  947. sortLv: 0,
  948. status: true,
  949. fixed: '',
  950. },
  951. {
  952. columnProp: 'remark',
  953. headerAlign: "center",
  954. align: "center",
  955. columnLabel: '工单备注',
  956. columnHidden: false,
  957. columnImage: false,
  958. columnSortable: false,
  959. sortLv: 0,
  960. status: true,
  961. fixed: '',
  962. },
  963. ],
  964. descImages: [],
  965. imageModalFlag: false,
  966. chooseReachModelFlag: false,
  967. reachData: {}
  968. }
  969. },
  970. mounted () {
  971. this.$nextTick(() => {
  972. this.height = window.innerHeight - 210
  973. })
  974. },
  975. created () {
  976. this.getDataList()
  977. this.favoriteIsOk()
  978. },
  979. methods: {
  980. // 时间处理函数
  981. getStandTime(data) {
  982. let value =
  983. data.getFullYear() +
  984. "-" +
  985. this.checkTime(data.getMonth() + 1) +
  986. "-" +
  987. this.checkTime(data.getDate()) +
  988. " " +
  989. this.checkTime(data.getHours()) +
  990. ":" +
  991. this.checkTime(data.getMinutes()) +
  992. ":" +
  993. this.checkTime(data.getSeconds());
  994. return value;
  995. },
  996. // 时间处理,如果时间小于10 ,则再前面加一个'0'
  997. checkTime(i) {
  998. if (i < 10) {
  999. i = "0" + i;
  1000. }
  1001. return i;
  1002. },
  1003. // 日期时间选择器改变
  1004. handleChangeTime() {
  1005. // 当选择的时间大于当前时间,自动填充为当前时间
  1006. // 设备开始时间
  1007. let start = (new Date(this.saveData.startDate) * 1000) / 1000;
  1008. if (start > Date.now()) {
  1009. this.saveData.startDate = this.getStandTime(new Date());
  1010. this.$message({
  1011. message: "时间超出范围!",
  1012. type: "warning",
  1013. });
  1014. }
  1015. // 设备结束时间
  1016. let end = (new Date(this.saveData.endDate) * 1000) / 1000;
  1017. if (end > Date.now()) {
  1018. this.saveData.endDate = this.getStandTime(new Date());
  1019. this.$message({
  1020. message: "时间超出范围!",
  1021. type: "warning",
  1022. });
  1023. }
  1024. // 结束时间小于开始时间
  1025. if (start > end) {
  1026. this.saveData.endDate = this.saveData.startDate;
  1027. this.$message({
  1028. message: "结束时间小于开始时间!",
  1029. type: "warning",
  1030. });
  1031. }
  1032. },
  1033. // 点击行选中复选框
  1034. operatorClickRow(row){
  1035. this.$refs.operatorTable.toggleRowSelection(row);
  1036. },
  1037. // 获取机修人员列表
  1038. getOperatorList(){
  1039. if (this.saveData.operator == null) {
  1040. this.saveData.operator = ''
  1041. this.saveData.operatorName = ''
  1042. }
  1043. // 先清空缓存选中
  1044. this.$nextTick(() => this.$refs.operatorTable.clearSelection())
  1045. // 拿到选中的人员编号
  1046. let tempDataList = this.saveData.operator.split(';')
  1047. // 查询人员
  1048. getOperatorList(this.operatorData).then(({data}) => {
  1049. if (data && data.code === 0) {
  1050. this.operatorList = data.rows
  1051. this.operatorList.forEach(val => {
  1052. // 回显选中的人员
  1053. if (tempDataList.includes(val.adminID)) {
  1054. this.$nextTick(() => this.$refs.operatorTable.toggleRowSelection(val, true))
  1055. }
  1056. })
  1057. this.operatorModelFlag = true
  1058. } else {
  1059. this.$alert(data.msg, '错误', {
  1060. confirmButtonText: '确定'
  1061. })
  1062. }
  1063. })
  1064. // getOperatorList(this.operatorData).then(({data}) => {
  1065. // if (data && data.code === 0) {
  1066. // this.operatorList = data.rows
  1067. // this.saveData.operatorName = ''
  1068. // this.saveData.operator = ''
  1069. // this.operatorModelFlag = true
  1070. // } else {
  1071. // this.$alert(data.msg, '错误', {
  1072. // confirmButtonText: '确定'
  1073. // })
  1074. // }
  1075. // })
  1076. },
  1077. // 多选
  1078. selectionChangeHandle2 (val) {
  1079. this.dataListSelections2 = val
  1080. },
  1081. selectFlag(){
  1082. return true;
  1083. },
  1084. // 确认多选机修人员
  1085. confirmOperator(){
  1086. this.saveData.operatorName = ''
  1087. this.saveData.operator = ''
  1088. for (let i = 0; i < this.dataListSelections2.length; i++) {
  1089. this.saveData.operatorName = this.saveData.operatorName + ";" + this.dataListSelections2[i].adminName
  1090. this.saveData.operator = this.saveData.operator + ";" + this.dataListSelections2[i].adminID
  1091. }
  1092. this.saveData.operator = this.saveData.operator.substring(1)
  1093. this.saveData.operatorName = this.saveData.operatorName.substring(1)
  1094. this.operatorModelFlag = false
  1095. },
  1096. // 校验用户是否收藏
  1097. favoriteIsOk() {
  1098. let userFavorite = {
  1099. userId: this.$store.state.user.id,
  1100. languageCode: this.$i18n.locale
  1101. }
  1102. userFavoriteList(userFavorite).then(({data}) => {
  1103. for (let i = 0; i < data.list.length; i++) {
  1104. if(this.$route.meta.menuId==data.list[i].menuId){
  1105. this.favorite = true
  1106. }
  1107. }
  1108. })
  1109. },
  1110. // 收藏 OR 取消收藏
  1111. favoriteFunction() {
  1112. let userFavorite = {
  1113. userId: this.$store.state.user.id,
  1114. functionId: this.$route.meta.menuId,
  1115. }
  1116. if (this.favorite) {
  1117. removeUserFavorite(userFavorite).then(({data}) => {
  1118. this.$message.success(data.msg)
  1119. this.favorite = false
  1120. })
  1121. } else {
  1122. // 收藏
  1123. saveUserFavorite(userFavorite).then(({data}) => {
  1124. this.$message.success(data.msg)
  1125. this.favorite = true
  1126. })
  1127. }
  1128. },
  1129. // 获取基础数据列表S
  1130. getBaseList (val,type) {
  1131. this.tagNo = val
  1132. this.$nextTick(() => {
  1133. let strVal = ''
  1134. if (val === 201) {
  1135. strVal = this.searchData.planOperator
  1136. this.$refs.baseList.init(val, strVal)
  1137. }
  1138. if (val === 1033) {
  1139. strVal = this.saveData.defectID
  1140. this.$refs.baseList.init(val, strVal)
  1141. }
  1142. })
  1143. },
  1144. /* 列表方法的回调 */
  1145. getBaseData (val) {
  1146. if (this.tagNo === 201) {
  1147. this.searchData.planOperator = val.AdminID
  1148. }
  1149. if (this.tagNo === 1033) {
  1150. this.saveData.defectID = val.DefectID
  1151. this.saveData.defectDesc = val.DefectDesc
  1152. }
  1153. },
  1154. //导出excel
  1155. async createExportData() {
  1156. this.searchData.limit = -1
  1157. this.searchData.page = 1
  1158. await eamWorkOrderSearch(this.searchData).then(({data}) => {
  1159. this.exportList= data.page.list;
  1160. })
  1161. return this.exportList;
  1162. },
  1163. startDownload() {},
  1164. finishDownload() {},
  1165. fields() {
  1166. let json = "{"
  1167. this.columnList.forEach((item, index) => {
  1168. if (index == this.columnList.length - 1) {
  1169. json += "\"" + item.columnLabel + "\"" + ":" + "\"" + item.columnProp + "\""
  1170. } else {
  1171. json += "\"" + item.columnLabel + "\"" + ":" + "\"" + item.columnProp + "\"" + ","
  1172. }
  1173. })
  1174. json += "}"
  1175. let s = eval("(" + json + ")")
  1176. return s
  1177. },
  1178. // 获取数据列表
  1179. getDataList () {
  1180. this.searchData.limit = this.pageSize
  1181. this.searchData.page = this.pageIndex
  1182. eamWorkOrderSearch(this.searchData).then(({data}) => {
  1183. if (data.code === 0) {
  1184. this.dataList = data.page.list
  1185. this.pageIndex = data.page.currPage
  1186. this.pageSize = data.page.pageSize
  1187. this.totalPage = data.page.totalCount
  1188. }
  1189. this.dataListLoading = false
  1190. })
  1191. },
  1192. // 每页数
  1193. sizeChangeHandle (val) {
  1194. this.pageSize = val
  1195. this.pageIndex = 1
  1196. this.getDataList()
  1197. },
  1198. // 当前页
  1199. currentChangeHandle (val) {
  1200. this.pageIndex = val
  1201. this.getDataList()
  1202. },
  1203. // 多选
  1204. selectionChangeHandle (val) {
  1205. this.dataListSelections = val
  1206. },
  1207. // 选择到达人员
  1208. chooseReachOperator (row) {
  1209. this.saveData.operator = ''
  1210. this.saveData.operatorName = ''
  1211. this.reachData = row
  1212. this.chooseReachModelFlag = true
  1213. },
  1214. // 到达
  1215. reach () {
  1216. let tempData = {
  1217. site: this.reachData.site,
  1218. functionType: 'C',
  1219. orderNo: this.reachData.orderNo,
  1220. status: '已到达',
  1221. reachOperator: this.saveData.operator,
  1222. reachOperatorName: this.saveData.operatorName
  1223. }
  1224. reach(tempData).then(({data}) => {
  1225. if (data && data.code === 0) {
  1226. this.getDataList()
  1227. this.chooseReachModelFlag = false
  1228. this.$message({
  1229. message: '操作成功',
  1230. type: 'success',
  1231. duration: 1500,
  1232. onClose: () => {}
  1233. })
  1234. } else {
  1235. this.$alert(data.msg, '错误', {
  1236. confirmButtonText: '确定'
  1237. })
  1238. }
  1239. })
  1240. },
  1241. // 执行
  1242. reportModal (row) {
  1243. this.saveData = {
  1244. site: row.site,
  1245. functionType: 'C',
  1246. orderNo: row.orderNo,
  1247. planID: row.planID,
  1248. planOperatorName: row.planOperatorName,
  1249. workTime: '',
  1250. remark: '',
  1251. disposalMeasures: '',
  1252. mesUser: this.$store.state.user.name,
  1253. itemList: [],
  1254. defectID: row.defectID,
  1255. defectDesc: row.defectDesc,
  1256. objectID: row.objectID,
  1257. objectDesc: row.objectDesc,
  1258. checkWorkPlanId: row.checkWorkPlanId,
  1259. checkItemNo: row.checkItemNo,
  1260. reachDate: row.reachDate,
  1261. operator: row.reachOperator,
  1262. operatorName: row.reachOperatorName,
  1263. handlingMethod: '',
  1264. feedBackDesc: row.feedBackDesc,
  1265. faultReason: '',
  1266. preventiveMeasure: ''
  1267. }
  1268. this.queryHistoryRecord()
  1269. this.detailModelFlag = true
  1270. },
  1271. saveCheckReport () {
  1272. if (this.saveData.defectID === '' || this.saveData.defectID == null) {
  1273. this.$message.warning('请选择故障编码!')
  1274. return
  1275. }
  1276. if (this.saveData.result === '' || this.saveData.result == null) {
  1277. this.$message.warning('请选择维修结果!')
  1278. return
  1279. }
  1280. if (this.saveData.result === '维修失败' && (this.saveData.disposalMeasures == null || this.saveData.disposalMeasures === '')) {
  1281. this.$message.warning('请选择处置措施!')
  1282. return
  1283. }
  1284. if (this.saveData.operator == null || this.saveData.operator === '') {
  1285. this.$message.warning('请选择维修人员!')
  1286. return
  1287. }
  1288. if (this.saveData.handlingMethod == null || this.saveData.handlingMethod === '') {
  1289. this.$message.warning('请填写处理方式!')
  1290. return
  1291. }
  1292. saveOrderReportForDefect(this.saveData).then(({data}) => {
  1293. if (data && data.code === 0) {
  1294. this.getDataList()
  1295. this.detailModelFlag = false
  1296. this.$message({
  1297. message: '操作成功',
  1298. type: 'success',
  1299. duration: 1500,
  1300. onClose: () => {}
  1301. })
  1302. } else {
  1303. this.$alert(data.msg, '错误', {
  1304. confirmButtonText: '确定'
  1305. })
  1306. }
  1307. })
  1308. },
  1309. // 上传故障图片
  1310. uploadFaultImageModal () {
  1311. let currentData = {
  1312. site: this.$store.state.user.site,
  1313. createBy: this.$store.state.user.name,
  1314. orderNo: this.saveData.orderNo,
  1315. folder: 'reportFault',
  1316. }
  1317. //打开组件 去做新增业务
  1318. this.$nextTick(() => {
  1319. this.$refs.reportImageUpload.init(currentData);
  1320. })
  1321. },
  1322. // 上传备件图片
  1323. uploadSparPartImageModal(){
  1324. let currentData = {
  1325. site: this.$store.state.user.site,
  1326. createBy: this.$store.state.user.name,
  1327. orderNo: this.saveData.orderNo,
  1328. folder: 'reportSparPart',
  1329. }
  1330. //打开组件 去做新增业务
  1331. this.$nextTick(() => {
  1332. this.$refs.reportImageUpload.init(currentData);
  1333. })
  1334. },
  1335. // 列表表格选择替换
  1336. tabClick (tab, event) {
  1337. // 刷新列表数据
  1338. this.refreshCurrentTabTable()
  1339. },
  1340. // 刷新页签的table数据
  1341. refreshCurrentTabTable () {
  1342. // 区分不同的页签刷新不同的列表数据
  1343. if (this.activeTable === 'inspection_form') {
  1344. this.getInspectionFormData();
  1345. } else if (this.activeTable === 'history_record') {
  1346. this.queryHistoryRecord();
  1347. }
  1348. },
  1349. // 维修记录
  1350. queryHistoryRecord(){
  1351. let tempData = {
  1352. site: this.saveData.site,
  1353. objectID: this.saveData.objectID,
  1354. functionType: 'C'
  1355. }
  1356. queryHistoryRecord(tempData).then(({data}) => {
  1357. if (data && data.code === 0) {
  1358. this.HistoryRecordList = data.rows
  1359. }else {
  1360. this.HistoryRecordList = [];
  1361. }
  1362. })
  1363. },
  1364. /**
  1365. * 查看故障图片
  1366. */
  1367. checkFaultImageModal (row){
  1368. this.descImages = [];
  1369. let tempData = {
  1370. site: this.$store.state.user.site,
  1371. orderNo: row.orderNo,
  1372. folder: 'reportFault',
  1373. };
  1374. searchFileUrl(tempData).then(({data}) => {
  1375. if (data.code === 0) {
  1376. for (let i = 0; i < data.rows.length; i++) {
  1377. this.descImages.push(data.rows[i].url)
  1378. }
  1379. }else {
  1380. this.$message.warning(data.msg);
  1381. }
  1382. })
  1383. this.imageModalFlag = true
  1384. },
  1385. /**
  1386. * 查看备件图片
  1387. */
  1388. checkSparPartImageModal (row){
  1389. this.descImages = [];
  1390. let tempData = {
  1391. site: this.$store.state.user.site,
  1392. orderNo: row.orderNo,
  1393. folder: 'reportSparPart',
  1394. };
  1395. searchFileUrl(tempData).then(({data}) => {
  1396. if (data.code === 0) {
  1397. for (let i = 0; i < data.rows.length; i++) {
  1398. this.descImages.push(data.rows[i].url)
  1399. }
  1400. }else {
  1401. this.$message.warning(data.msg);
  1402. }
  1403. })
  1404. this.imageModalFlag = true
  1405. },
  1406. //去掉input框获得的焦点
  1407. elDatePickerOnFocus(){
  1408. document.activeElement.blur();
  1409. },
  1410. }
  1411. }
  1412. </script>
  1413. <style>
  1414. </style>