综合办公系统
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.

deviceForm.vue 25KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625
  1. <!--
  2. * @Author: ysh
  3. * @Date: 2024-03-07 13:44:39
  4. * @LastEditors: Please set LastEditors
  5. * @LastEditTime: 2024-07-29 15:41:35
  6. -->
  7. <template>
  8. <div>
  9. <el-row :gutter="20">
  10. <el-col :span="flowDisabled ? 18 : 24" :xs="24">
  11. <el-card>
  12. <h2 style="text-align: center;">设备申请表</h2>
  13. <div>
  14. <el-form ref="deviceForm" :model="form" label-width="120px" :rules="rules">
  15. <!-- 申请人填写 -->
  16. <el-divider></el-divider>
  17. <el-row :gutter="20">
  18. <el-col :span="6" :xs="24">
  19. <el-form-item label="申请人:" prop="user.nickName">
  20. {{ form.applierUser ? form.applierUser.nickName : form.user.nickName }}
  21. </el-form-item>
  22. </el-col>
  23. <el-col :span="6" :xs="24">
  24. <el-form-item label="所在部门:" prop="dept.deptName">
  25. {{ form.dept.deptName }}
  26. </el-form-item>
  27. </el-col>
  28. <el-col :span="6" :xs="24">
  29. <el-form-item label="申请时间:" prop="applyDate">
  30. <el-date-picker style="width:170px;" v-model="form.applyDate" value-format="yyyy-MM-dd" type="date"
  31. placeholder="选择日期" :disabled="taskName != '设备申请'">
  32. </el-date-picker>
  33. </el-form-item>
  34. </el-col>
  35. </el-row>
  36. <el-form-item label="项目编号:" prop="projectId">
  37. <el-button type="primary" size="mini" @click="openProject = true"
  38. v-if="taskName == '设备申请'">选择项目</el-button>
  39. <el-descriptions border v-if="isSelect" style="margin-top: 10px;" :column="1">
  40. <el-descriptions-item label="项目编号" label-class-name="my-label">{{ chooseProject.projectNumber
  41. }}</el-descriptions-item>
  42. <el-descriptions-item label="项目名称" label-class-name="my-label">{{ chooseProject.projectName
  43. }}</el-descriptions-item>
  44. <el-descriptions-item label="项目负责人" label-class-name="my-label">{{ chooseProject.projectLeaderUser ?
  45. chooseProject.projectLeaderUser.nickName : ''
  46. }}</el-descriptions-item>
  47. <el-descriptions-item label="承担部门" label-class-name="my-label">
  48. <el-tag size="small">{{ chooseProject.undertakingDeptName }}</el-tag>
  49. </el-descriptions-item>
  50. <el-descriptions-item label="项目类型" label-class-name="my-label">{{ chooseProject.projectType
  51. }}</el-descriptions-item>
  52. </el-descriptions>
  53. </el-form-item>
  54. <el-form-item label="设备选择:" prop="devices">
  55. <el-button type="primary" icon="el-icon-plus" size="mini" @click="openDevice = true"
  56. :disabled="taskName != '设备申请'">选择设备</el-button>
  57. <el-table :data="deviceList">
  58. <el-table-column label="序号" type="index" />
  59. <el-table-column label="出厂编号" align="center" prop="code" />
  60. <el-table-column label="设备品牌" align="center" prop="brand" />
  61. <el-table-column label="设备名称" align="center" prop="name" />
  62. <el-table-column label="规格型号" align="center" prop="series" />
  63. <el-table-column label="存放地址" align="center" prop="place" />
  64. </el-table>
  65. </el-form-item>
  66. <el-form-item label="申领事由:" prop="applyReason">
  67. <el-input type="textarea" :rows="3" placeholder="请输入申领事由" v-model="form.applyReason"
  68. :disabled="taskName != '设备申请'">
  69. </el-input>
  70. </el-form-item>
  71. <el-row>
  72. <el-col :span="6" :xs="24">
  73. <el-form-item label="开始日期:" prop="beginDate">
  74. <el-date-picker style="width:170px;" v-model="form.beginDate" value-format="yyyy-MM-dd" type="date"
  75. placeholder="选择日期" @change="calculateDay" :disabled="taskName != '设备申请'">
  76. </el-date-picker>
  77. </el-form-item>
  78. </el-col>
  79. <el-col :span="6" :xs="24">
  80. <el-form-item label="结束日期:" prop="endDate">
  81. <el-date-picker style="width:170px;" v-model="form.endDate" value-format="yyyy-MM-dd" type="date"
  82. placeholder="选择日期" @change="calculateDay" :disabled="taskName != '设备申请'">
  83. </el-date-picker>
  84. </el-form-item>
  85. </el-col>
  86. <el-col :span="8" :xs="24">
  87. <el-form-item label="共计:">
  88. {{ form.days + '天' }}
  89. </el-form-item>
  90. </el-col>
  91. </el-row>
  92. <!-- 安排设备意见 -->
  93. <el-divider></el-divider>
  94. <el-form-item label-width="120px" label="拟发放设备:" prop="modifyDevices">
  95. <el-table :data="modifyDeviceList">
  96. <el-table-column label="序号" type="index" />
  97. <el-table-column label="出厂编号" align="center" prop="code" />
  98. <el-table-column label="设备品牌" align="center" prop="brand" />
  99. <el-table-column label="设备名称" align="center" prop="name" />
  100. <el-table-column label="规格型号" align="center" prop="series" />
  101. <el-table-column label="存放地址" align="center" prop="place" />
  102. <el-table-column label="操作" align="center" v-if="taskName == '安排设备'">
  103. <template slot-scope="scope">
  104. <el-button type="text" primary @click="replaceRowData(scope.row, scope.$index)">重新选择</el-button>
  105. <el-button type="text" style="color:#F56C6C"
  106. @click="deleteRowData(scope.row, scope.$index)">删除</el-button>
  107. </template>
  108. </el-table-column>
  109. </el-table>
  110. <el-button class="mt10" type="primary" size="mini" @click="addRowdata()" icon="el-icon-plus"
  111. :disabled="taskName != '安排设备'">新增设备</el-button>
  112. </el-form-item>
  113. <el-form-item label="安排设备意见:" prop="dispatchComment" label-width="125px">
  114. <el-input type="textarea" :rows="3" placeholder="请输入安排设备意见" v-model="form.dispatchComment"
  115. :disabled="taskName != '安排设备'">
  116. </el-input>
  117. </el-form-item>
  118. <el-row>
  119. <el-col :span="6" :xs="24" :offset="12">
  120. <el-form-item label="签名:" label-width="120px" v-if="taskName != '设备申请'">
  121. <span class="auditor"> {{ form.dispatchUser ? form.dispatchUser.nickName : dispatchUser }} </span>
  122. </el-form-item>
  123. </el-col>
  124. <el-col :span="6">
  125. <el-form-item label="日期:" label-width="120px" v-if="taskName != '设备申请'">
  126. <span> {{ form.dispatchTime ? form.dispatchTime : dispatchTime }} </span>
  127. </el-form-item>
  128. </el-col>
  129. </el-row>
  130. <!-- 分管审核意见 -->
  131. <el-divider></el-divider>
  132. <el-form-item label="分管审核意见:" prop="managerComment" label-width="125px">
  133. <el-input type="textarea" :rows="3" placeholder="请输入分管审核意见" v-model="form.managerComment"
  134. :disabled="taskName != '分管审核'">
  135. </el-input>
  136. </el-form-item>
  137. <el-row>
  138. <el-col :span="6" :xs="24" :offset="12">
  139. <el-form-item label="签名:" label-width="120px">
  140. <span class="auditor"> {{ form.managerUser ? form.managerUser.nickName : managerUser }} </span>
  141. </el-form-item>
  142. </el-col>
  143. <el-col :span="6">
  144. <el-form-item label="日期:" label-width="120px">
  145. <span> {{ form.managerTime ? form.managerTime : managerTime }} </span>
  146. </el-form-item>
  147. </el-col>
  148. </el-row>
  149. <!-- 归还确认 -->
  150. <el-divider></el-divider>
  151. <el-form-item label="需维修设备:" prop="state" label-width="120px">
  152. <el-select style="width: 100%;" v-model="form.repairDevices" filterable multiple placeholder="请选择"
  153. clearable :disabled="taskName != '归还确认'">
  154. <el-option v-for="item in modifyDeviceList" :key="item.deviceId" :label="item.name + '【' + (item.brand != null ? item.brand : '') + (item.series != null ? '-' + item.series + '】' : '')
  155. + (item.code != null ? '(设备编号:' + item.code + ')' : '') + '📍' + item.place" :value="item.deviceId">
  156. </el-option>
  157. </el-select>
  158. </el-form-item>
  159. <el-form-item label="备注:" prop="remark" label-width="120px">
  160. <el-input type="textarea" :rows="3" placeholder="请输入备注" v-model="form.remark"
  161. :disabled="taskName != '归还确认'">
  162. </el-input>
  163. </el-form-item>
  164. <el-form-item label="归还日期:" style="margin-left:20px" prop="returnDate">
  165. <el-date-picker style="width:170px;" v-model="form.returnDate" value-format="yyyy-MM-dd" type="date"
  166. placeholder="选择日期" :disabled="taskName != '归还确认'">
  167. </el-date-picker>
  168. </el-form-item>
  169. </el-form>
  170. <el-row style="text-align: center;" v-if="taskName == '设备申请'">
  171. <el-button type="primary" @click="submit">提交申请</el-button>
  172. </el-row>
  173. <el-row style="text-align: center;" v-else>
  174. <el-button type="warning" @click="saves()">保存</el-button>
  175. <el-button type="primary" @click="completeApply()" v-if="taskName">完成审批</el-button>
  176. </el-row>
  177. </div>
  178. </el-card>
  179. </el-col>
  180. <el-col :span="6" :xs="24" v-if="flowDisabled">
  181. <el-card>
  182. <h2 style="text-align: center;">流程进度</h2>
  183. <div>
  184. <flow :flowData="flowData" />
  185. </div>
  186. </el-card>
  187. </el-col>
  188. </el-row>
  189. <el-dialog title="选择项目" :visible.sync="openProject" width="70%" append-to-body>
  190. <project-choose @chooseProject="confirmProject"></project-choose>
  191. </el-dialog>
  192. <el-dialog title="选择仪器" :visible.sync="openDevice" width="70%" append-to-body>
  193. <choose-device :multiple="multiple" @chooseList="confirmDevice"></choose-device>
  194. </el-dialog>
  195. </div>
  196. </template>
  197. <script>
  198. import { parseTime } from "@/utils/ruoyi";
  199. import { listProject, getProject } from "@/api/oa/project/project";
  200. import { listDevice, getDevice } from "@/api/oa/device/device";
  201. import { listDeviceApproval, getDeviceApproval, updateDeviceApproval, submitDeviceApproval, modifyDeviceApproval } from '@/api/oa/device/deviceApproval'
  202. import {
  203. complete, rejectTask, returnList, returnTask, getNextFlowNode, delegate, flowTaskForm,
  204. } from "@/api/flowable/todo";
  205. import { getUsersManageLeader } from '@/api/system/post.js'
  206. import flow from '@/views/flowable/task/todo/detail/flow'
  207. import { flowXmlAndNode } from "@/api/flowable/definition";
  208. import { getUserByRole } from "@/api/system/role";
  209. import projectChoose from '@/views/flowable/form/components/chooseProject.vue';
  210. import ChooseDevice from '../budget/components/chooseDevice.vue';
  211. export default {
  212. components: {
  213. flow,
  214. projectChoose,
  215. ChooseDevice
  216. },
  217. props:
  218. {
  219. taskName: {
  220. type: String,
  221. required: true
  222. },
  223. taskForm: {
  224. type: Object,
  225. required: true
  226. },
  227. flowDisabled: {
  228. type: Boolean,
  229. default: true
  230. }
  231. },
  232. watch: {
  233. 'taskForm.formId'() {
  234. this.initForm();
  235. }
  236. },
  237. created() {
  238. if (this.taskName == '分管审核') {
  239. this.managerUser = this.$store.getters.name;
  240. this.managerTime = parseTime(new Date(), '{y}-{m}-{d}')
  241. }
  242. if (this.taskName == '安排设备') {
  243. this.dispatchUser = this.$store.getters.name;
  244. this.dispatchTime = parseTime(new Date(), '{y}-{m}-{d}')
  245. }
  246. this.form.user.nickName = this.$store.getters.name;
  247. this.form.dept.deptName = this.$store.getters.deptName;
  248. this.getProjectList();
  249. // this.getDeviceList();
  250. if (this.flowDisabled)
  251. flowXmlAndNode({ procInsId: this.taskForm.procInsId, deployId: this.taskForm.deployId }).then(res => {
  252. this.flowData = res.data;
  253. })
  254. },
  255. data() {
  256. return {
  257. managerUser: '',
  258. dispatchUser: '',
  259. managerTime: undefined,
  260. dispatchTime: undefined,
  261. form: {
  262. user: {
  263. nickName: '',
  264. },
  265. dept: {
  266. deptName: '',
  267. },
  268. applyDate: new Date(),
  269. days: "",
  270. devices: [],
  271. modifyDevices: [],
  272. },
  273. projectList: [],
  274. chooseProject: {},
  275. flowData: {},
  276. isSelect: false,
  277. openProject: false,
  278. openDevice: false,
  279. rules: {
  280. },
  281. deviceList: [],
  282. grantDeviceList: [],
  283. modifyDeviceList: [],
  284. formTotal: 0,
  285. clicDevice: {},
  286. clickRowIndex: 0,
  287. multiple: true,
  288. }
  289. },
  290. mounted() {
  291. this.initRules();
  292. this.initForm();
  293. },
  294. methods: {
  295. initRules() {
  296. if (this.taskName == '设备申请') {
  297. this.rules = {
  298. projectId: [
  299. { required: true, message: '请选择项目', trigger: 'blur' },
  300. ],
  301. devices: [
  302. { required: true, message: '请选择申请设备', trigger: 'change' },
  303. ],
  304. beginDate: [
  305. { required: true, message: '请选择开始日期', trigger: 'change' },
  306. ],
  307. endDate: [
  308. { required: true, message: '请选择结束日期', trigger: 'change' },
  309. ],
  310. applyReason: [
  311. { required: true, message: '请输入申领理由', trigger: 'blur' },
  312. ],
  313. devices: [
  314. { required: true, message: '请选择设备', trigger: 'blur' },
  315. ]
  316. }
  317. } else if (this.taskName == '分管审核') {
  318. this.rules = {
  319. managerComment: [
  320. { required: true, message: '请输入分管领导审核意见', trigger: 'blur' }
  321. ]
  322. }
  323. } else if (this.taskName == '安排设备') {
  324. this.rules = {
  325. dispatchComment: [
  326. { required: true, message: '请输入安排设备意见', trigger: 'blur' }
  327. ]
  328. }
  329. } else if (this.taskName == '归还确认') {
  330. this.rules = {
  331. returnDate: [
  332. { required: true, message: '请选择归还日期', trigger: 'change' }
  333. ]
  334. }
  335. }
  336. },
  337. // 初始化表单
  338. initForm() {
  339. getDeviceApproval(this.taskForm.formId).then(res => {
  340. if (this.isEmptyObject(res.data)) {
  341. this.formTotal = 0;
  342. this.form.user.nickName = this.$store.getters.name;
  343. this.form.applier = this.$store.getters.userId;
  344. this.form.dept.deptName = this.$store.getters.deptName;
  345. this.form.applyDate = new Date();
  346. } else {
  347. this.formTotal = 1;
  348. let data = res.data;
  349. if (res.data.devices == null || res.data.devices == undefined || res.data.devices == "") {
  350. data.devices = []
  351. } else {
  352. data.devices = data.devices.split(',');
  353. let arr = []
  354. this.deviceList = []
  355. for (let d of data.devices) {
  356. arr.push(parseInt(d));
  357. getDevice(d).then(result => {
  358. this.deviceList.push(result.data);
  359. })
  360. }
  361. data.devices = arr;
  362. }
  363. if (res.data.modifyDevices == null || res.data.modifyDevices == undefined || res.data.modifyDevices == "") {
  364. data.modifyDevices = []
  365. this.modifyDeviceList = this.deviceList
  366. } else {
  367. data.modifyDevices = data.modifyDevices.split(',');
  368. let arr = []
  369. this.modifyDeviceList = []
  370. for (let d of data.modifyDevices) {
  371. arr.push(parseInt(d));
  372. getDevice(d).then(result => {
  373. this.modifyDeviceList.push(result.data);
  374. })
  375. }
  376. data.modifyDevices = arr;
  377. }
  378. this.form = data;
  379. if (data.projectId) {
  380. getProject(data.projectId).then(response => {
  381. this.chooseProject = response.data;
  382. this.isSelect = true
  383. })
  384. }
  385. }
  386. })
  387. },
  388. submit() {
  389. this.$refs['deviceForm'].validate((valid) => {
  390. if (valid) {
  391. this.form.formId = this.taskForm.formId;
  392. let formData = new FormData();
  393. let jsonForm = JSON.stringify(this.form);
  394. formData.append("form", jsonForm);
  395. const params = { taskId: this.taskForm.taskId };
  396. if (this.formTotal != 0) {
  397. modifyDeviceApproval(formData);
  398. } else {
  399. submitDeviceApproval(formData);
  400. }
  401. // 获取下一个流程节点
  402. getNextFlowNode(params).then(res => {
  403. const data = res.data;
  404. this.taskForm.formData = formData;
  405. this.getNextFlowNodeApproval();
  406. })
  407. } else {
  408. this.$message.error('必填项未填写完毕')
  409. }
  410. })
  411. },
  412. saves() {
  413. this.$refs['deviceForm'].validate((valid) => {
  414. if (valid) {
  415. this.form.formId = this.taskForm.formId;
  416. this.form.deviceApplyId = this.taskForm.formId;
  417. let formData = new FormData();
  418. let jsonForm = JSON.stringify(this.form);
  419. formData.append("form", jsonForm);
  420. if (this.formTotal != 0) {
  421. modifyDeviceApproval(formData).then(res => {
  422. this.$message.success('保存成功')
  423. });
  424. }
  425. } else {
  426. this.$message.error('必填项未填写完毕')
  427. }
  428. })
  429. },
  430. completeApply() {
  431. this.$refs['deviceForm'].validate((valid) => {
  432. if (valid) {
  433. this.form.formId = this.taskForm.formId;
  434. this.form.deviceApplyId = this.taskForm.formId;
  435. let formData = new FormData();
  436. let jsonForm = JSON.stringify(this.form);
  437. formData.append("form", jsonForm);
  438. modifyDeviceApproval(formData);
  439. const params = { taskId: this.taskForm.taskId };
  440. // 获取下一个流程节点
  441. getNextFlowNode(params).then(res => {
  442. const data = res.data;
  443. this.taskForm.formData = formData;
  444. this.getNextFlowNodeApproval();
  445. })
  446. } else {
  447. this.$message.error('必填项未填写完毕')
  448. }
  449. })
  450. },
  451. // 获取下一个审批人
  452. getNextFlowNodeApproval() {
  453. if (this.taskName == '设备申请') {
  454. getUserByRole({ roleId: 4 }).then(result => {
  455. this.$set(this.taskForm.variables, "approval", result.data[0]);
  456. complete(this.taskForm).then(response => {
  457. this.$modal.msgSuccess(response.msg);
  458. this.$emit('goBack')
  459. });
  460. });
  461. } else if (this.taskName == '安排设备') {
  462. getUsersManageLeader({ userId: this.form.applier }).then(res => {
  463. let userId = [];
  464. res.data.forEach(user => {
  465. userId.push(user.userId)
  466. })
  467. this.$set(this.taskForm.variables, "approvalList", userId);
  468. complete(this.taskForm).then(response => {
  469. this.$modal.msgSuccess(response.msg);
  470. this.$emit('goBack')
  471. });
  472. })
  473. } else if (this.taskName == '分管审核') {
  474. getUserByRole({ roleId: 4 }).then(result => {
  475. this.$set(this.taskForm.variables, "approval", result.data[0]);
  476. complete(this.taskForm).then(response => {
  477. this.$modal.msgSuccess(response.msg);
  478. this.$emit('goBack')
  479. });
  480. });
  481. } else {
  482. complete(this.taskForm).then(response => {
  483. this.$modal.msgSuccess(response.msg);
  484. this.$emit('goBack')
  485. });
  486. }
  487. },
  488. // 查询项目列表
  489. getProjectList() {
  490. this.loading = true
  491. listProject({
  492. pageNum: 1,
  493. pageSize: 99999999
  494. }).then(response => {
  495. this.projectList = response.rows;
  496. })
  497. },
  498. // 选择项目
  499. handleSelectProject(val) {
  500. if (val != "" && val != undefined && val != null) {
  501. getProject(val).then(res => {
  502. this.chooseProject = res.data;
  503. this.isSelect = true
  504. })
  505. } else {
  506. this.isSelect = false
  507. }
  508. },
  509. // 获取设备列表
  510. getDeviceList() {
  511. listDevice({
  512. pageNum: 1,
  513. pageSize: 99999999,
  514. type: '仪器设备'
  515. }).then(res => {
  516. this.deviceList = res.rows
  517. })
  518. },
  519. // 计算天数
  520. calculateDay() {
  521. if (this.form.beginDate && this.form.endDate) {
  522. let y1 = new Date(this.form.beginDate);
  523. let y2 = new Date(this.form.endDate);
  524. if (y2 < y1) {
  525. this.form.days = '';
  526. return
  527. }
  528. let sub = Math.abs(y2 - y1);
  529. let days = Math.floor(sub / (1000 * 60 * 60 * 24)) + 1;
  530. this.form.days = days;
  531. } else {
  532. this.form.days = '';
  533. }
  534. },
  535. isEmptyObject(obj) {
  536. for (var key in obj) {
  537. if (obj.hasOwnProperty(key)) {
  538. return false;
  539. }
  540. }
  541. return true;
  542. },
  543. showFormItem(name) {
  544. let isShow = false;
  545. if (name == '分管审核')
  546. isShow = (this.taskName == '设备申请' || this.taskName == '安排设备' || this.taskName == '分管审核') || (this.taskName == '归还确认' && this.form.managerUserId != null);
  547. else if (name == '分管审核签名')
  548. isShow = this.taskName == '分管审核' || ((this.taskName == '安排设备' || this.taskName == '归还确认') && this.form.managerUserId != null);
  549. return isShow;
  550. },
  551. confirmProject(val) {
  552. if (val.length > 1) {
  553. this.$message.error('请选择一个项目');
  554. return
  555. } else if (val.length == 1) {
  556. this.chooseProject = val[0]
  557. this.isSelect = true
  558. this.$set(this.form, 'projectId', val[0].projectId);
  559. this.$refs.deviceForm.validateField('projectId');
  560. }
  561. this.openProject = false
  562. },
  563. confirmDevice(val) {
  564. if (val) {
  565. let list = []
  566. if (this.taskName == '设备申请') {
  567. for (let v of val) {
  568. list.push(v.deviceId)
  569. }
  570. this.$set(this.form, 'devices', list);
  571. this.$refs.deviceForm.validateField('devices');
  572. this.deviceList = val;
  573. } else if (this.taskName == '安排设备') {
  574. if (!this.multiple) {
  575. this.$set(this.modifyDeviceList, this.clickRowIndex, val);
  576. } else {
  577. for (let i of val) {
  578. this.modifyDeviceList.push(i);
  579. }
  580. }
  581. for (let j of this.modifyDeviceList) {
  582. list.push(j.deviceId)
  583. }
  584. this.form.modifyDevices = list;
  585. }
  586. }
  587. this.openDevice = false;
  588. },
  589. replaceRowData(row, rowIndex) {
  590. this.openDevice = true;
  591. this.clicDevice = row;
  592. this.clickRowIndex = rowIndex;
  593. this.multiple = false;
  594. },
  595. deleteRowData(row, rowIndex) {
  596. let list = [];
  597. this.modifyDeviceList = this.modifyDeviceList.slice(0, rowIndex).concat(this.modifyDeviceList.slice(rowIndex + 1));
  598. for (let j of this.modifyDeviceList) {
  599. list.push(j.deviceId)
  600. }
  601. this.form.modifyDevices = list;
  602. },
  603. addRowdata() {
  604. this.openDevice = true;
  605. this.multiple = true;
  606. }
  607. },
  608. }
  609. </script>
  610. <style lang="scss" scoped>
  611. @import "@/assets/styles/element-reset.scss";
  612. ::v-deep .el-input.is-disabled .el-input__inner {
  613. color: #121212 !important;
  614. }
  615. ::v-deep .el-textarea.is-disabled .el-textarea__inner {
  616. color: #121212 !important;
  617. }
  618. </style>