index.vue 32 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918
  1. <template>
  2. <div class="app-container">
  3. <el-row :gutter="10" >
  4. <!--部门数据-->
  5. <el-col :span="4" >
  6. <div style="background-color: #fff;padding: 10px;border-radius: 10px;">
  7. <p style="margin: 0; font-weight: 800;font-size: 16px;color: #343434;display: flex;align-items: center;margin-bottom: 20px;border-left: 6px solid #03BF8A;">
  8. <!-- <img src="../../../assets/images/icon_htgl_btzs.png" alt="" style="width: 16px;height: 20px;"> -->
  9. <span style="margin-left: 10px;">选择部门</span>
  10. </p>
  11. <div class=" infinite-list" style="overflow:auto;height: 93vh" >
  12. <div class="head-container">
  13. <el-input
  14. v-model="deptName"
  15. placeholder="请输入部门名称"
  16. clearable
  17. size="small"
  18. prefix-icon="el-icon-search"
  19. style="margin-bottom: 20px"
  20. />
  21. </div>
  22. <div class="head-container">
  23. <el-tree
  24. ref="tree"
  25. :data="deptOptions"
  26. :props="defaultProps"
  27. :expand-on-click-node="false"
  28. :filter-node-method="filterNode"
  29. default-expand-all
  30. :highlight-current="true"
  31. @node-click="handleNodeClick"
  32. class="custom-tree"
  33. >
  34. <el-tooltip
  35. :disabled="showTitle"
  36. effect="dark"
  37. :content="tooltipTitle"
  38. placement="left-start"
  39. slot-scope="{node,data}"
  40. >
  41. <span class="span-ellipsis"
  42. style="font-size: 14px; font-weight: 400;"
  43. @mouseover="onShowNameTipsMouseenter">
  44. {{node.label}}
  45. </span>
  46. </el-tooltip>
  47. </el-tree>
  48. <!-- <el-tree
  49. :data="deptOptions"
  50. :props="defaultProps"
  51. :expand-on-click-node="false"
  52. :filter-node-method="filterNode"
  53. ref="tree"
  54. default-expand-all
  55. highlight-current
  56. @node-click="handleNodeClick"
  57. /> -->
  58. </div>
  59. </div>
  60. </div>
  61. </el-col>
  62. <el-col :span=" ishsouetan == false? 20 : 14" >
  63. <div style="background-color: #fff;padding: 20px;border-radius: 10px; padding-bottom: 0; padding-top: 10px;">
  64. <p style="margin: 0; font-weight: 800;font-size: 16px;color: #343434;display: flex;align-items: center;margin-bottom: 20px;border-left: 6px solid #03BF8A;margin-left: -20px;">
  65. <!-- <img src="../../../assets/images/icon_htgl_btzs.png" alt="" style="width: 16px;height: 20px;"> -->
  66. <span style="margin-left: 10px;">搜索条件</span>
  67. </p>
  68. <div style="padding-bottom: 0;margin-bottom: 20px;">
  69. <el-form class="qucheu" :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="80px">
  70. <el-row>
  71. <el-col :span="ishsouetan == false? 7 : 10">
  72. <el-form-item label="设备名称" prop="equipmentName" style="display: flex;">
  73. <el-input
  74. style="width: 100%;"
  75. v-model="queryParams.equipmentName"
  76. placeholder="请输入设备名称"
  77. clearable
  78. @keyup.enter.native="handleQuery"
  79. />
  80. </el-form-item>
  81. </el-col>
  82. <!-- <el-col :span="6">
  83. <el-form-item label="运行状态" prop="runState" style="display: flex;">
  84. <el-select style="width: 120px;" v-model="queryParams.manualType" placeholder="请选择运行状态" clearable>
  85. <el-option
  86. v-for="dict in dict.type.sys_job_status"
  87. :key="dict.value"
  88. :label="dict.label"
  89. :value="dict.value"
  90. />
  91. </el-select>
  92. </el-form-item>
  93. </el-col> -->
  94. <el-col :span="4" class="bhhsbu">
  95. <div>
  96. <el-form-item class="butt" style="border: 0;display: flex; margin: 0;margin-top: 5px;">
  97. <el-button style="background-color: #03BF8A; border-color: #03BF8A;" type="primary" size="mini" @click="handleQuery">查询 </el-button>
  98. <el-button size="mini" @click="resetQuery">重置</el-button>
  99. </el-form-item>
  100. </div>
  101. </el-col>
  102. </el-row>
  103. </el-form>
  104. </div>
  105. </div>
  106. <el-row :gutter="10" class="mb8">
  107. <el-col :span="24">
  108. <div style="display: flex; justify-content: space-between;">
  109. <p style="margin: 0; font-weight: 800;font-size: 16px;color: #343434;display: flex;align-items: center;margin-bottom: 20px;border-left: 6px solid #03BF8A;">
  110. <!-- <img src="../../../assets/images/icon_htgl_btzs.png" alt="" style="width: 16px;height: 20px;"> -->
  111. <span style="margin-left: 10px;">设备列表</span>
  112. </p>
  113. <div>
  114. <el-button
  115. type="success"
  116. plain
  117. size="mini"
  118. @click="handleAdd"
  119. v-hasPermi="['manage:equipmentManage:add']"
  120. >新增</el-button>
  121. <el-button
  122. type="danger"
  123. plain
  124. size="mini"
  125. :disabled="singleg"
  126. @click="handleDeletej"
  127. v-hasPermi="['manage:equipmentManage:remove']"
  128. >删除</el-button>
  129. </div>
  130. </div>
  131. </el-col>
  132. <el-col :span="1.5">
  133. </el-col>
  134. <!-- <el-col :span="1.5">
  135. <el-button
  136. type="success"
  137. plain
  138. icon="el-icon-edit"
  139. size="mini"
  140. :disabled="single"
  141. @click="handleUpdate"
  142. v-hasPermi="['manage:equipmentManage:edit']"
  143. >修改</el-button>
  144. </el-col> -->
  145. <el-col :span="1.5">
  146. </el-col>
  147. </el-row>
  148. <div class=" infinite-list" :style="dynamicStyle" v-if="inhgeshwe">
  149. <div v-masonry :class=" ishsouetan == false? 'imghse hyeg' : 'hyeg'" style="display: flex;flex-wrap: wrap;justify-content: space-between; " >
  150. <div v-if="inhgeshwe" v-masonry-tile :class=" ishsouetan == false? 'box_3dr zuihsoue flex-col' : 'box_3dr flex-col'" :style=" item.equipmentImage ==null? ' height:240px; margin-bottom: 10px;' : 'margin-bottom: 10px;' " v-for="(item,index ) in equipmentManageList" :key="index" >
  151. <div class="box_4 flex-row" style="justify-content: space-between;margin: 0;">
  152. <div @click="handleSelectionChange(item)" style="display: flex;align-items: center; cursor: pointer;">
  153. <img
  154. class="thumbnail_21"
  155. referrerpolicy="no-referrer"
  156. src="../../../assets/images/icon_lby_gx_normal.png"
  157. v-show="!item.isnum && isgsow"
  158. />
  159. <img
  160. class="thumbnail_21"
  161. referrerpolicy="no-referrer"
  162. src="../../../assets/images/icon_lby_gx_selcted.png"
  163. v-show="item.isnum && isgsow"
  164. />
  165. <span class="text_19">{{item.equipmentName}}</span>
  166. </div>
  167. <div>
  168. <img
  169. class="image_1"
  170. referrerpolicy="no-referrer"
  171. @click="handleUpdate(item)"
  172. v-hasPermi="['manage:equipmentManage:edit']"
  173. src="../../../assets/images/icon_lby_gdtc_bj.png"
  174. />
  175. <img
  176. class="thumbnail_22"
  177. @click="handleDelete(item)"
  178. v-hasPermi="['manage:equipmentManage:remove']"
  179. referrerpolicy="no-referrer"
  180. src="../../../assets/images/icon_lby_gdtc_del.png"/>
  181. </div>
  182. </div>
  183. <div class="box_5 flex-col" v-if="item.equipmentImage != null">
  184. <image-preview :src="item.equipmentImage" :width="100 +'%'" :height="100 + '%'" style=""/>
  185. </div>
  186. <div style="padding: 10px;">
  187. <span class="text_20">设备编号:{{item.equipmentNum}}</span>
  188. <div class="box_6 flex-row " style="align-items: center;">
  189. <span class="text_21">设备类型: </span>
  190. <div style="margin-left: 12px;">
  191. <dict-tag :options="dict.type.shebie_type" :value="item.equipmentType"/>
  192. </div>
  193. </div>
  194. <div class="box_6 flex-row " style=" margin-bottom: 10px; align-items: center;">
  195. <span class="text_21">设备地址: </span>
  196. <el-tooltip class="item" effect="dark" :content="item.equipmentAddress" placement="top-start">
  197. <div style=" margin-left: 12px; font-weight: 500;font-size: 13px;color: #222327; white-space: nowrap;overflow: hidden;text-overflow: ellipsis;">
  198. {{item.equipmentAddress}}
  199. </div>
  200. </el-tooltip>
  201. </div>
  202. <!-- <span class="text_20">设备地址:192.168.1.1</span> -->
  203. <span class="text_20" >设备区域:{{item.equipmentRegion}}</span>
  204. <div style="margin-top: 10px;margin-bottom: 10px;">
  205. <span class="text_20">安装时间:{{item.equipmentTime}}</span>
  206. </div>
  207. <div class="box_6 flex-row " style="align-items: center;">
  208. <span class="text_21">设备状态: </span>
  209. <div style="margin-left: 12px;">
  210. <dict-tag :options="dict.type.sys_job_status" :value="item.runState"/>
  211. </div>
  212. </div>
  213. </div>
  214. </div>
  215. </div>
  216. <div v-if='equipmentManageList == 0'>
  217. <el-empty :image-size="200"></el-empty>
  218. </div>
  219. </div>
  220. <paginations
  221. v-show="total>0"
  222. :total="total"
  223. :page.sync="queryParams.pageNum"
  224. :limit.sync="queryParams.pageSize"
  225. @pagination="getList"
  226. />
  227. </el-col>
  228. <el-col :span="6" v-if="ishsouetan">
  229. <div style="background-color: #fff; border-radius: 4px;padding: 10px;" class="shenbfe">
  230. <p style="margin: 0; font-weight: 800;font-size: 16px;color: #343434;display: flex;align-items: center;margin-bottom: 20px;border-left: 6px solid #03BF8A;">
  231. <!-- <img src="../../../assets/images/icon_htgl_btzs.png" alt="" style="width: 16px;height: 20px;"> -->
  232. <span style="margin-left: 10px;">设备信息</span>
  233. </p>
  234. <el-form ref="form" :model="form" :rules="rules" label-width="80px">
  235. <el-row>
  236. <el-col :span="24">
  237. <el-form-item label="设备编号" prop="equipmentNum">
  238. <el-input v-model="form.equipmentNum" placeholder="请输入设备编号" />
  239. </el-form-item>
  240. </el-col>
  241. <el-col :span="24">
  242. <el-form-item label="设备名称" prop="equipmentName">
  243. <el-input v-model="form.equipmentName" placeholder="请输入设备名称" />
  244. </el-form-item>
  245. </el-col>
  246. <el-col :span="24">
  247. <el-form-item label="设备区域" prop="equipmentRegion">
  248. <el-input v-model="form.equipmentRegion" placeholder="请输入设备区域" />
  249. </el-form-item>
  250. </el-col>
  251. <el-col :span="24">
  252. <el-form-item label="设备地址" prop="equipmentAddress">
  253. <el-input v-model="form.equipmentAddress" placeholder="请输入设备地址" />
  254. </el-form-item>
  255. </el-col>
  256. <el-col :span="24">
  257. <el-form-item label="安装时间" prop="equipmentTime">
  258. <el-date-picker style="width: 100%;" clearable
  259. v-model="form.equipmentTime"
  260. type="date"
  261. value-format="yyyy-MM-dd"
  262. placeholder="请选择安装时间">
  263. </el-date-picker>
  264. </el-form-item>
  265. </el-col>
  266. <el-col :span="24">
  267. <el-form-item label="运行状态" prop="runState">
  268. <el-select style="width: 100%;" v-model="form.runState" placeholder="请选择运行状态" >
  269. <el-option
  270. v-for="dict in dict.type.sys_job_status"
  271. :key="dict.value"
  272. :label="dict.label"
  273. :value="dict.value"
  274. />
  275. </el-select>
  276. </el-form-item>
  277. </el-col>
  278. <el-col :span="24">
  279. <el-form-item label="设备类型" prop="equipmentType">
  280. <el-select style="width: 100%;" v-model="form.equipmentType" placeholder="请选择设备类型">
  281. <el-option
  282. v-for="dict in dict.type.shebie_type"
  283. :key="dict.value"
  284. :label="dict.label"
  285. :value="dict.value"
  286. ></el-option>
  287. </el-select>
  288. </el-form-item>
  289. </el-col>
  290. <el-col :span="24">
  291. <el-form-item label="设备ip" prop="equipmentIp">
  292. <el-input v-model="form.equipmentIp" placeholder="请输入内容" />
  293. </el-form-item>
  294. </el-col>
  295. <el-col :span="24">
  296. <el-form-item label="备注" prop="remark">
  297. <el-input v-model="form.remark" placeholder="请输入内容" />
  298. </el-form-item>
  299. </el-col>
  300. <el-col :span="24" class="shewsfimg">
  301. <el-form-item label="设备图片" prop="equipmentImage">
  302. <image-upload v-model="form.equipmentImage"/>
  303. </el-form-item>
  304. </el-col>
  305. </el-row>
  306. </el-form>
  307. <div slot="footer" class="dialog-footer" style="display: flex;justify-content: flex-end;">
  308. <el-button style="background-color:#03BF8A ; border-color: #03BF8A;" type="primary" @click="submitForm">确 定</el-button>
  309. <el-button style="background-color:#DDEBE7 ; border-color: #DDEBE7; color: #475669;" @click="cancel">取 消</el-button>
  310. </div>
  311. </div>
  312. </el-col>
  313. </el-row>
  314. </div>
  315. </template>
  316. <script>
  317. import { listEquipmentManage, getEquipmentManage, delEquipmentManage, addEquipmentManage, updateEquipmentManage } from "@/api/manage/equipmentManage"
  318. import { treeselect,listDept } from "@/api/system/dept";
  319. // import VueMasonry from 'vue-masonry';
  320. import Masonry from "masonry-layout";
  321. import Waterfall from 'vue-waterfall-plugin'
  322. import Treeselect from "@riophae/vue-treeselect";
  323. import "@riophae/vue-treeselect/dist/vue-treeselect.css";
  324. export default {
  325. name: "EquipmentManage",
  326. dicts: ['sys_job_status', 'sys_notice_type','shebie_type'],
  327. components: { Treeselect ,Waterfall},
  328. data() {
  329. return {
  330. // 遮罩层
  331. // 遮罩层
  332. loading: true,
  333. defaultProps: {
  334. children: "children",
  335. label: "deptName",
  336. value:'deptId'
  337. },
  338. tooltipTitle: "",
  339. showTitle: true,
  340. currentNodeId: "",
  341. singleg:true,
  342. // 选中数组
  343. ids: [],
  344. // 非单个禁用
  345. single: true,
  346. deptName:null,
  347. // 非多个禁用
  348. multiple: true,
  349. // 显示搜索条件
  350. showSearch: true,
  351. // 总条数
  352. total: 0,
  353. // 设备管理表格数据
  354. equipmentManageList: [],
  355. // 弹出层标题
  356. title: "",
  357. // 是否显示弹出层
  358. open: false,
  359. // 查询参数
  360. queryParams: {
  361. pageNum: 1,
  362. pageSize: 8,
  363. equipmentNum: null,
  364. equipmentName: null,
  365. equipmentType: null,
  366. equipmentAddress: null,
  367. equipmentRegion: null,
  368. equipmentTime: null,
  369. equipmentImage: null,
  370. runState: null,
  371. },
  372. // 表单参数
  373. form: {},
  374. // 表单校验
  375. rules: {
  376. equipmentNum: [
  377. { required: true, message: "不能为空", trigger: "blur" }
  378. ],
  379. equipmentName: [
  380. { required: true, message: "不能为空", trigger: "blur" }
  381. ],
  382. equipmentType: [
  383. { required: true, message: "不能为空", trigger: "blur" }
  384. ],
  385. equipmentIp: [
  386. { required: true, message: "不能为空", trigger: "blur" }
  387. ],
  388. equipmentAddress: [
  389. { required: true, message: "不能为空", trigger: "blur" }
  390. ],
  391. },
  392. tableMaxHeight:'480',
  393. ghwe:{},
  394. // 部门树选项
  395. deptOptions: undefined,
  396. ishsouetan:false,
  397. isgsow:true,
  398. manid:0,
  399. inhgeshwe:true
  400. }
  401. },
  402. created() {
  403. this.getList()
  404. this.getTreeselect()
  405. window.onresize = () => {
  406. this.changeTableMaxHeight()
  407. }
  408. this.changeTableMaxHeight()
  409. },
  410. computed: {
  411. dynamicStyle() {
  412. return {
  413. overflow:'auto',
  414. height: this.tableMaxHeight + 'px',
  415. }
  416. }
  417. },
  418. mounted() {
  419. window.onresize = () => {
  420. this.changeTableMaxHeight()
  421. }
  422. this.changeTableMaxHeight()
  423. },
  424. methods: {
  425. onShowNameTipsMouseenter(e){
  426. this.tooltipTitle = e.target.innerText;
  427. this.showTitle = false;
  428. },
  429. // 筛选节点
  430. filterNode(value, data) {
  431. if (!value) return true;
  432. return data.label.indexOf(value) !== -1;
  433. },
  434. /** 查询部门下拉树结构 */
  435. getTreeselect() {
  436. let qure={pageNum:1,pageSize:1000}
  437. listDept().then(response => {
  438. this.deptOptions = this.handleTree(response.data, "deptId")
  439. this.loading = false
  440. })
  441. },
  442. // 节点单击事件
  443. handleNodeClick(data) {
  444. this.queryParams.deptId = data.deptId;
  445. this.ghwe.deptName = data.deptName
  446. this.ghwe.deptId = data.deptId
  447. this.handleQuery();
  448. },
  449. /** 查询设备管理列表 */
  450. getList() {
  451. this.loading = true
  452. listEquipmentManage(this.queryParams).then(response => {
  453. this.equipmentManageList = response.rows
  454. this.equipmentManageList.filter(rou=>{
  455. rou.isnum = false
  456. })
  457. this.total = response.total
  458. this.loading = false
  459. this.inhgeshwe = true
  460. })
  461. },
  462. // 取消按钮
  463. cancel() {
  464. this.open = false
  465. this.ishsouetan = false
  466. this.inhgeshwe = false
  467. this.queryParams.pageSize = 9
  468. // this.created()
  469. this.getList()
  470. // this.inhgeshwe = true''
  471. this.reset()
  472. },
  473. // 获取当前时间
  474. gettime(){
  475. let nowDate = new Date()
  476. let date = {
  477. year: nowDate.getFullYear(),
  478. month: nowDate.getMonth() + 1,
  479. date: nowDate.getDate()
  480. }
  481. if (parseInt(date.month) < 10) {
  482. date.month = '0' + date.month
  483. }
  484. if (parseInt(date.date) < 10) {
  485. date.date = '0' + date.date
  486. }
  487. let nghe = date.year + '-' + date.month + '-' + date.date
  488. return nghe
  489. },
  490. // 表单重置
  491. reset() {
  492. this.form = {
  493. equipmentId: null,
  494. equipmentNum: null,
  495. equipmentName: null,
  496. equipmentType: null,
  497. equipmentAddress: null,
  498. equipmentRegion: null,
  499. equipmentTime: this.gettime(),
  500. equipmentImage: null,
  501. runState: '0',
  502. delFlag: null,
  503. createBy: null,
  504. createTime: null,
  505. updateBy: null,
  506. updateTime: null,
  507. remark: null,
  508. equipmentIp:null
  509. }
  510. this.resetForm("form")
  511. },
  512. /** 搜索按钮操作 */
  513. handleQuery() {
  514. this.queryParams.pageNum = 1
  515. this.getList()
  516. },
  517. /** 重置按钮操作 */
  518. resetQuery() {
  519. this.resetForm("queryForm")
  520. this.handleQuery()
  521. },
  522. // 多选框选中数据
  523. handleSelectionChange(selection) {
  524. // console.log(selection)
  525. this.isgsow = false
  526. selection.isnum = !selection.isnum
  527. this.isgsow = true
  528. let nhseg= []
  529. this.equipmentManageList.filter(rou=>{
  530. if(rou.isnum == true){
  531. nhseg.push(rou)
  532. }
  533. })
  534. console.log(nhseg)
  535. this.ids = nhseg.map(item => item.equipmentId)
  536. console.log(this.ids,nhseg)
  537. this.single = nhseg.length!==1
  538. this.multiple = !nhseg.length
  539. },
  540. /** 新增按钮操作 */
  541. handleAdd() {
  542. this.reset()
  543. console.log(this.ghwe)
  544. if(this.ghwe.deptId == undefined){
  545. this.$message.error('请先选择部门');
  546. // this.$modal.msgSuccess("请先选择部门")
  547. return
  548. }
  549. this.inhgeshwe = false
  550. this.queryParams.pageSize = 10
  551. this.getList()
  552. this.ishsouetan = true
  553. this.title = "添加设备管理"
  554. this.inhgeshwe = true
  555. },
  556. /** 修改按钮操作 */
  557. handleUpdate(row) {
  558. this.reset()
  559. const equipmentId = row.equipmentId || this.ids
  560. this.queryParams.pageSize = 10
  561. this.getList()
  562. this.inhgeshwe = false
  563. getEquipmentManage(equipmentId).then(response => {
  564. this.form = response.data
  565. this.title = "修改设备管理"
  566. this.ishsouetan = true
  567. this.inhgeshwe = true
  568. })
  569. },
  570. /** 提交按钮 */
  571. submitForm() {
  572. this.$refs["form"].validate(valid => {
  573. if (valid) {
  574. if (this.form.equipmentId != null) {
  575. updateEquipmentManage(this.form).then(response => {
  576. this.$modal.msgSuccess("修改成功")
  577. this.open = false
  578. this.queryParams.pageSize = 9
  579. this.getList()
  580. this.ishsouetan = false
  581. })
  582. } else {
  583. this.form.deptName = this.ghwe.deptName
  584. this.form.deptId = this.ghwe.deptId
  585. addEquipmentManage(this.form).then(response => {
  586. this.$modal.msgSuccess("新增成功")
  587. this.open = false
  588. this.queryParams.pageSize = 9
  589. this.getList()
  590. this.ishsouetan = false
  591. })
  592. }
  593. }
  594. })
  595. },
  596. handleStatusChange(row) {
  597. let text = row.status === "0" ? "启用" : "停用"
  598. updateEquipmentManage(row).then(response => {
  599. this.$modal.msgSuccess("操作成功")
  600. row.status = row.status === "0" ? "1" : "0"
  601. this.getList()
  602. })
  603. },
  604. handleDeletej(){
  605. delEquipmentManage(this.manid).then(response => {
  606. this.$modal.msgSuccess("操作成功")
  607. this.getList()
  608. })
  609. },
  610. /** 删除按钮操作 */
  611. handleDelete(row) {
  612. const equipmentIds = row.equipmentId || this.ids
  613. this.$modal.confirm('是否确认删除设备管理数据项?').then(function() {
  614. return delEquipmentManage(equipmentIds)
  615. }).then(() => {
  616. this.getList()
  617. this.$modal.msgSuccess("删除成功")
  618. }).catch(() => {})
  619. },
  620. handleExport() {
  621. this.download('manage/equipmentManage/export', {
  622. ...this.queryParams
  623. }, `equipmentManage_${new Date().getTime()}.xlsx`)
  624. },
  625. // 获取屏幕高度
  626. showFilterForm () {
  627. this.filterActive = !this.filterActive
  628. this.changeTableMaxHeight()
  629. },
  630. changeTableMaxHeight () {
  631. let height = document.body.offsetHeight // 网页可视区域高度
  632. // if (this.filterActive) {
  633. // this.tableMaxHeight = height - 320
  634. // } else {
  635. this.tableMaxHeight = height - 250
  636. // }
  637. console.log(height)
  638. }
  639. }
  640. }
  641. </script>
  642. <style lang="scss" >
  643. .bhhsbu{
  644. .el-form-item__content{
  645. display: flex;
  646. }
  647. }
  648. .shewsfimg{
  649. .el-upload--picture-card{
  650. width: 90px;
  651. height: 90px;
  652. line-height:88px;
  653. }
  654. .el-upload-list--picture-card .el-upload-list__item{
  655. width: 90px;
  656. height: 90px;
  657. }
  658. }
  659. .shenbfe{
  660. .el-form-item{
  661. margin-bottom: 12px;
  662. }
  663. }
  664. </style>
  665. <style scoped>
  666. .el-table .el-table__header-wrapper th, .el-table .el-table__fixed-header-wrapper th{
  667. background-color:#F5F6F8;
  668. }
  669. .el-checkbox__input.is-checked .el-checkbox__inner{
  670. background-color: #03BF8A;
  671. border-color: #03BF8A;
  672. }
  673. .el-checkbox__input.is-indeterminate .el-checkbox__inner{
  674. background-color: #03BF8A;
  675. border-color: #03BF8A;
  676. }
  677. .flex-col {
  678. display: flex;
  679. flex-direction: column;
  680. }
  681. .flex-row {
  682. display: flex;
  683. flex-direction: row;
  684. }
  685. .justify-between {
  686. display: flex;
  687. justify-content: space-between;
  688. }
  689. .box_3dr {
  690. background-color: rgba(255, 255, 255, 1);
  691. border-radius: 10px;
  692. position: relative;
  693. width: 49%;
  694. height: 100%;
  695. /* padding-bottom: 15px; */
  696. /* margin-left: 5px ;
  697. margin-right: 5px; */
  698. }
  699. .box_4 {
  700. width: 100%;
  701. /* height: 18px; */
  702. padding: 11px 10px 11px 10px;
  703. border-bottom: 1px solid #E6E6E6;
  704. }
  705. .thumbnail_21 {
  706. width: 18px;
  707. height: 18px;
  708. }
  709. .text_19 {
  710. /* width: 97px; */
  711. height: 13px;
  712. overflow-wrap: break-word;
  713. color: rgba(34, 35, 39, 1);
  714. font-size: 14px;
  715. font-family: PingFang-SC-Bold;
  716. font-weight: 700;
  717. text-align: left;
  718. white-space: nowrap;
  719. line-height: 13px;
  720. margin: 0 0 0 11px;
  721. }
  722. .image_1 {
  723. width:14px;
  724. height: 14px;
  725. /* margin-left: 51px; */
  726. }
  727. .thumbnail_22 {
  728. width: 14px;
  729. height: 14px;
  730. margin: 3px 0 0 10px;
  731. }
  732. .image_2 {
  733. width: 248px;
  734. height: 1px;
  735. margin-top: 9px;
  736. }
  737. .box_5 {
  738. background-color: rgba(255, 255, 255, 1);
  739. /* width: 220px; */
  740. height: 118px;
  741. padding: 10px;
  742. /* margin: 12px 0 0 14px; */
  743. }
  744. .text_20 {
  745. /* width: 139px; */
  746. height: 14px;
  747. overflow-wrap: break-word;
  748. color: rgba(34, 35, 39, 1);
  749. font-size: 14px;
  750. font-family: PingFang-SC-Medium;
  751. font-weight: 500;
  752. text-align: left;
  753. white-space: nowrap;
  754. line-height: 8px;
  755. margin: 0 0 14px 0;
  756. }
  757. .box_6 {
  758. /* width: 126px; */
  759. height: 24px;
  760. margin: 8px 0 0 0;
  761. }
  762. .text_21 {
  763. width: 60px;
  764. height: 14px;
  765. overflow-wrap: break-word;
  766. color: rgba(34, 35, 39, 1);
  767. font-size: 14px;
  768. font-family: PingFang-SC-Medium;
  769. font-weight: 500;
  770. text-align: left;
  771. white-space: nowrap;
  772. line-height: 8px;
  773. margin-top: 5px;
  774. }
  775. .text-wrapper_7 {
  776. background-color: rgba(255, 244, 235, 1);
  777. border-radius: 4px;
  778. height: 24px;
  779. border: 1px solid rgba(253, 127, 16, 1);
  780. width: 58px;
  781. }
  782. .text_22 {
  783. width: 42px;
  784. height: 13px;
  785. overflow-wrap: break-word;
  786. color: rgba(253, 127, 16, 1);
  787. font-size: 14px;
  788. font-family: PingFang-SC-Medium;
  789. font-weight: 500;
  790. text-align: left;
  791. white-space: nowrap;
  792. line-height: 46px;
  793. margin: 6px 0 0 8px;
  794. }
  795. .text_23 {
  796. width: 145px;
  797. height: 14px;
  798. overflow-wrap: break-word;
  799. color: rgba(34, 35, 39, 1);
  800. font-size: 14px;
  801. font-family: PingFang-SC-Medium;
  802. font-weight: 500;
  803. text-align: left;
  804. white-space: nowrap;
  805. line-height: 46px;
  806. margin: 8px 0 0 14px;
  807. }
  808. .text_24 {
  809. width: 152px;
  810. height: 14px;
  811. overflow-wrap: break-word;
  812. color: rgba(34, 35, 39, 1);
  813. font-size: 14px;
  814. font-family: PingFang-SC-Medium;
  815. font-weight: 500;
  816. text-align: left;
  817. white-space: nowrap;
  818. line-height: 46px;
  819. margin: 13px 0 0 14px;
  820. }
  821. .text_25 {
  822. width: 154px;
  823. height: 14px;
  824. overflow-wrap: break-word;
  825. color: rgba(34, 35, 39, 1);
  826. font-size: 14px;
  827. font-family: PingFang-SC-Medium;
  828. font-weight: 500;
  829. text-align: left;
  830. white-space: nowrap;
  831. line-height: 46px;
  832. margin: 13px 0 15px 15px;
  833. }
  834. .box_7 {
  835. box-shadow: 0px 0px 10px 0px rgba(209, 209, 209, 1);
  836. background-color: rgba(255, 255, 255, 1);
  837. border-radius: 8px;
  838. position: absolute;
  839. left: 159px;
  840. top: 35px;
  841. width: 88px;
  842. height: 70px;
  843. }
  844. .image-text_2 {
  845. width: 58px;
  846. height: 15px;
  847. margin: 13px 0 0 16px;
  848. }
  849. .thumbnail_23 {
  850. width: 15px;
  851. height: 15px;
  852. }
  853. .text-group_2 {
  854. width: 27px;
  855. height: 14px;
  856. overflow-wrap: break-word;
  857. color: rgba(61, 69, 91, 1);
  858. font-size: 14px;
  859. font-family: PingFang-SC-Medium;
  860. font-weight: 500;
  861. text-align: left;
  862. white-space: nowrap;
  863. line-height: 80px;
  864. margin-top: 1px;
  865. }
  866. .image-text_3 {
  867. width: 59px;
  868. height: 17px;
  869. margin: 11px 0 14px 15px;
  870. }
  871. .thumbnail_24 {
  872. width: 16px;
  873. height: 17px;
  874. }
  875. .text-group_3 {
  876. width: 27px;
  877. height: 14px;
  878. overflow-wrap: break-word;
  879. color: rgba(61, 69, 91, 1);
  880. font-size: 14px;
  881. font-family: PingFang-SC-Medium;
  882. font-weight: 500;
  883. text-align: left;
  884. white-space: nowrap;
  885. line-height: 80px;
  886. margin-top: 2px;
  887. }
  888. .zuihsoue{
  889. width: 32.2%;
  890. margin: 0 5px;
  891. justify-content: flex-start !important;
  892. }
  893. .imghse{
  894. justify-content: flex-start !important;
  895. }
  896. .hyeg{
  897. height: 100% !important;
  898. }
  899. </style>