device.vue 41 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327
  1. <template>
  2. <div style="height: 94%;">
  3. <div class="hanson-bar">
  4. <span
  5. style="width:20px;float:left;display:block;height:20px;cursor: pointer;"
  6. @click="changeAssetsFalg"
  7. >
  8. <i class="el-icon-fa el-icon-fa-compass"></i>
  9. </span>
  10. <span>当前筛选条件下共{{page.total || '--'}}设备</span>
  11. <div style="float:right;overflow:hidden;">
  12. <el-button size="small" style='width: 80px;' @click="download" icon="iconfont icon-xiazai">下载</el-button>
  13. <el-button size="small" style='width: 80px;' @click="addDevice" icon="iconfont icon-tianjia">添加设备</el-button>
  14. <el-button size="small" style='width: 80px;' @click="reset" icon="iconfont icon-shuaxin">刷新</el-button>
  15. <el-button size="small" style='width: 80px;' @click="undo" icon="iconfont icon-undo">撤销</el-button>
  16. </div>
  17. <div style="width:200px;color:gray;float:right;font-size:12px;">
  18. <span v-if="!onlyRead">隐藏自动填充的信息点:</span>
  19. <el-tooltip v-if="!onlyRead" :content="'' + (isWatch ? '隐藏' : '不隐藏')" placement="top">
  20. <el-switch
  21. @change="changeWatch"
  22. v-model="isWatch"
  23. active-color="#13ce66"
  24. inactive-color="gray"
  25. ></el-switch>
  26. </el-tooltip>
  27. <span v-if="onlyRead">只看要采集的信息</span>
  28. <el-tooltip v-if="onlyRead" :content="'' + (allMess ? '部分' : '全集')" placement="top">
  29. <el-switch
  30. @change="changeWatch"
  31. v-model="allMess"
  32. active-color="#13ce66"
  33. inactive-color="gray"
  34. ></el-switch>
  35. </el-tooltip>
  36. </div>
  37. <div
  38. style="width:90px;cursor: pointer;color:gray;float:right; font-size:10px;"
  39. >
  40. <p v-if="onlyRead" @click="changeRead">
  41. <i class="iconfont icon-yulan"></i>
  42. <span>只读模式</span>
  43. </p>
  44. <p v-else @click="changeRead">
  45. <i class="iconfont icon-yulan"></i>
  46. <span>编辑模式</span>
  47. </p>
  48. </div>
  49. </div>
  50. <!-- 二维码弹窗 -->
  51. <qrcode :dialog="dialog" :qrcodeUrl="qrcodeUrl" :addBody="true" ref="qrcode"></qrcode>
  52. <!-- 型号弹窗 -->
  53. <firm :mess="{deviceId: deviceType.code}" ref="firm" @changeFirm="firmChange" :dialog="dialog"></firm>
  54. <!-- 供应商合同弹窗 -->
  55. <supply-dialog ref="supply" @change="supplyChange" :id="id" :dialog="dialog"></supply-dialog>
  56. <!-- 供应商弹窗 -->
  57. <supplier-dialog ref="supplier" @changeSupplier="supplierChange" :dialog="dialog"></supplier-dialog>
  58. <guarantee-dialog :id="id" ref="guarantee" @change="guaranteeChange" :dialog="dialog"></guarantee-dialog>
  59. <upload-files-dialog
  60. :read="onlyRead ? true : false"
  61. ref="upload"
  62. @changeFile="fileChange"
  63. :keysArr="filesArr"
  64. :dialog="dialog"
  65. ></upload-files-dialog>
  66. <upload-img-dialog
  67. :read="onlyRead ? true : false"
  68. @changeFile="imgChange"
  69. :keysArr="imgsArr"
  70. :dialog="dialog"
  71. ></upload-img-dialog>
  72. <maintainer-dialog @changeMaintainer="changeMaintainer" ref="maintainer" :dialog="dialog"></maintainer-dialog>
  73. <insurer-dialog @changeInsurer="changeInsurer" ref="insurer" :dialog="dialog"></insurer-dialog>
  74. <pic-dialog
  75. :read="onlyRead ? true : false"
  76. :dialog="dialog"
  77. :keysArr="picsArr"
  78. @change="changePics"
  79. ></pic-dialog>
  80. <div class=" middle_sty" style="height: 91%; text-align:center" v-show="!mess.deviceId && (!main || !main.length)">
  81. <p><i class="iconwushuju iconfont"></i>
  82. 请选择设备族</p>
  83. </div>
  84. <div class="center middle_sty" style="height: 91%" v-show="mess.deviceId && (!main || !main.length)">
  85. <p>
  86. <i class="iconwushuju iconfont"></i>
  87. 暂无数据
  88. </p>
  89. </div>
  90. <system-type :infos="systemId" :graphyId="graphyId" :dialog="dialog"></system-type>
  91. <!-- <div
  92. v-show="!main || !main.length"
  93. style="width:100%;text-align:center;font-size:30px;color:gray;"
  94. >{{ mess.deviceId ? '请选择设备族' : '无设备'}}</div> -->
  95. <!-- <div
  96. v-show="!mess.deviceId && (!main || !main.length)"
  97. style="width:100%;text-align:center;font-size:30px;color:gray;"
  98. >请选择设备族</div> -->
  99. <div v-show="mess.deviceId && main && main.length" v-loading="loading" id="handsontable" ref="handsontable"></div>
  100. <div v-show="mess.deviceId && main && main.length" class="right">
  101. <my-pagination @change="getMain" :page="page"></my-pagination>
  102. </div>
  103. <dialog-assets
  104. @close="getClose"
  105. :graphyId="graphyId"
  106. :assetType="[this.mess.deviceId]"
  107. ref="assets"
  108. :dialog="dialog"
  109. ></dialog-assets>
  110. <details-dialog :iframeSrc="iframeSrc" v-if="dialog.details" :dialog="dialog"></details-dialog>
  111. <change-rea @close="reset" :dialog="dialog" :category="category"></change-rea>
  112. <look-pic :dialog="dialog" :keysArr="picsArr"></look-pic>
  113. </div>
  114. </template>
  115. <script>
  116. import { getTableHeader, getSpaceFloor, getEquipmentFamily, getBillEquipList, BeatchQueryParam, delBatchList, updateBusiness } from "@/api/scan/request";
  117. import tools from "@/utils/scan/tools";
  118. import handsonUtils from "@/utils/hasontableUtils"
  119. import showTools from "@/utils/handsontable/notShow"
  120. import text from "@/utils/handsontable/mainText"
  121. import qrcode from "@/components/ledger/lib/qrcode";
  122. import firm from "@/components/dialogs/list/firm";
  123. import supplyDialog from "@/components/dialogs/list/supplyDialog";
  124. import supplierDialog from "@/components/dialogs/list/supplierDialog";
  125. import maintainerDialog from "@/components/dialogs/list/maintainerDialog";
  126. import insurerDialog from "@/components/dialogs/list/insurerDialog";
  127. import guaranteeDialog from "@/components/dialogs/list/guaranteeDialog";
  128. import uploadFilesDialog from "@/components/dialogs/list/filesDialog";
  129. import uploadImgDialog from "@/components/dialogs/list/uploadImgDialog";
  130. import picDialog from "@/components/dialogs/list/picDialog"
  131. import systemType from "@/components/dialogs/list/systemType"
  132. import myPagination from "@/components/ledger/lib/myPagination";
  133. import dialogAssets from "@/components/dialogs/addDialog/dialogDevice";
  134. import detailsDialog from "@/components/ledger/lib/detailsDia"
  135. import changeRea from "@/components/dialogs/changeRea"
  136. //图片查看
  137. import lookPic from "@/components/ledger/lib/lookImages"
  138. //下拉插件
  139. import "@/assets/js/chosen.jquery.min";
  140. import "@/assets/js/handsontable-chosen-editor";
  141. import {mapGetters, mapActions} from "vuex";
  142. import Handsontable from "handsontable-pro"
  143. import 'handsontable-pro/dist/handsontable.full.css'
  144. import zhCN from 'handsontable-pro/languages/zh-CN';
  145. export default {
  146. props: ["myParam"],
  147. components: {
  148. qrcode, //二维码页面
  149. firm, //
  150. supplyDialog,
  151. supplierDialog,
  152. guaranteeDialog,
  153. uploadFilesDialog,
  154. maintainerDialog,
  155. insurerDialog,
  156. uploadImgDialog,
  157. picDialog,
  158. myPagination,
  159. dialogAssets,
  160. systemType,
  161. detailsDialog,
  162. changeRea,
  163. lookPic
  164. },
  165. data() {
  166. return {
  167. main: [],
  168. mess: {},
  169. headers: null,
  170. page: {
  171. size: 50,
  172. sizes: [10, 30, 50, 100, 150, 200],
  173. total: 0,
  174. currentPage: 1
  175. },
  176. dialog: {
  177. qrcode: false, //二维码弹窗
  178. firm: false, //厂商弹窗
  179. supply: false, //选择供应合同
  180. supplier: false, //供应商选择
  181. guarantee: false, //选择保单
  182. maintainer: false, //选择维修商
  183. insurer: false, //选择保险公司
  184. uploadFiles: false,//上传文件
  185. uploadImgs: false,//上传单个图片
  186. pic: false, //多个图片
  187. addDevice: false,
  188. systemType: false,
  189. details: false,//详情页
  190. changeRea: false,
  191. lookPic: false,//图片查看
  192. },
  193. row: null,//被修改的row
  194. filesArr: [],//保存临时的文件key
  195. messKey: null,
  196. imgsArr: [],//临时保存的图片key数组
  197. picsArr: [],//临时设备图片keys数组
  198. projId: "",
  199. copyMain: null,
  200. graphyId: null,
  201. systemId: null,
  202. assetGroupList: [],
  203. iframeSrc: "",
  204. id: 0,
  205. isWatch: true,
  206. category: {},
  207. onlyRead: true,
  208. allMess: true,
  209. linkNameFalg: false,
  210. qrcodeUrl: "",//二维码图片地址
  211. loading: false,
  212. EquipmentList: [],//资产族
  213. deviceType: {},
  214. floorData: []
  215. };
  216. },
  217. created() {
  218. this.getEquipmentFamilyList()
  219. this.getFloorData()
  220. },
  221. computed: {
  222. ...mapGetters("layout", [
  223. "projectId",
  224. "secret",
  225. "userId"
  226. ])
  227. },
  228. methods: {
  229. //获取楼层数据
  230. getFloorData() {
  231. let param = {
  232. ProjId: this.projectId,
  233. secret: this.secret
  234. }
  235. getSpaceFloor(param).then(res => {
  236. if (res.data.Result == 'success') {
  237. let data = this.changeArr(res.data.Content), floorData = []
  238. data.map(item => {
  239. if (!!item.children) {
  240. item.children.unshift({
  241. value: '',
  242. label: "未明确楼层"
  243. })
  244. }
  245. return item
  246. })
  247. data.map(item => {
  248. if (!!item.children && item.children.length) {
  249. item.children.map(child => {
  250. floorData.push({
  251. Code: item.value + "-" + child.value,
  252. Name: item.label + "-" + child.label
  253. })
  254. })
  255. }
  256. })
  257. this.floorData = floorData
  258. } else {
  259. this.$message.error(res.data.ResultMsg)
  260. }
  261. }).catch(() => {
  262. this.$message.error("请求出错")
  263. })
  264. },
  265. //将数组转换成optiosn格式
  266. changeArr(arr) {
  267. return arr.map(item => {
  268. if (item.floors && item.floors.length) {
  269. return {
  270. value: item.id,
  271. label: item.infos.BuildLocalName,
  272. children: item.floors.map(i => {
  273. return {
  274. value: i.id,
  275. label: i.infos.FloorLocalName || "未知",
  276. }
  277. })
  278. }
  279. } else {
  280. return {
  281. value: item.id,
  282. label: item.infos.BuildLocalName,
  283. children: null,
  284. isChilren: 1,
  285. }
  286. }
  287. })
  288. },
  289. changeRead() {
  290. this.onlyRead = !this.onlyRead
  291. this.getMain()
  292. },
  293. getEquipmentFamilyList() {
  294. getEquipmentFamily(res => {
  295. this.EquipmentList = res.Content
  296. })
  297. },
  298. //触发父组件change
  299. getClose(val) {
  300. this.$emit("close", val)
  301. },
  302. setGraphyId(graphyId, assetGroupList) {
  303. this.graphyId = graphyId
  304. this.assetGroupList = assetGroupList
  305. },
  306. //获取表头
  307. getHeaderData(code) {
  308. this.page.currentPage = 1
  309. this.mess = code
  310. this.changeCader()
  311. if(this.mess.deviceId){
  312. getTableHeader({
  313. code: this.mess.deviceId,
  314. ProjId: this.projectId
  315. }).then(res => {
  316. this.headers = res.data.Content;
  317. this.getMain()
  318. });
  319. }
  320. },
  321. //获取主体数据
  322. getMain() {
  323. let _this = this
  324. this.loading = true
  325. let param = {
  326. data: {
  327. customInfo: true,
  328. "limit": { // 分页查询, 选填.
  329. "skip": this.page.size * (this.page.currentPage - 1), // 跳过多少数据
  330. "count": this.page.size // 查询跳过300条数据之后的50条 (默认按照创建时间从大-->小排序)
  331. },
  332. id: "",
  333. type: [this.mess.deviceId]
  334. },
  335. secret: this.secret,
  336. ProjId: this.projectId
  337. }
  338. if (this.mess.buildId == "all") {
  339. param.data.id = this.mess.ProjId
  340. } else if (this.mess.buildId == "noKnow") {
  341. param.data.id = this.mess.ProjId
  342. param.data.direct = true
  343. } else if (this.mess.floorId == "noKnow") {
  344. param.data.id = this.mess.buildId
  345. param.data.direct = true
  346. } else if (this.mess.floorId && this.mess.floorId != "all") {
  347. param.data.id = this.mess.floorId
  348. } else if (this.mess.floorId == 'all') {
  349. param.data.id = this.mess.buildId
  350. } else {
  351. param.data.id = this.mess.ProjId
  352. }
  353. //type存在发送请求
  354. if (!!this.mess.deviceId) {
  355. getBillEquipList(param, res => {
  356. if (res.Result == "success") {
  357. this.loading = false
  358. res.Content = res.Content.map(item => {
  359. item.linkName = item.linkEquipLocalName || item.linkEquipName
  360. if (!!item.linkFamily) {
  361. this.assetGroupList.map(child => {
  362. if (item.linkFamily == child.code) {
  363. item.linkFamily = child.name
  364. }
  365. })
  366. }
  367. if (!!item.infos.DPManufacturerID) {
  368. item.infos.DPManufacturerID = item.infos.DPManufacturerID + "-" + item.infos.Brand + "/" + item.infos.Specification
  369. }
  370. if (!!item.infos.DPSupplierID) {
  371. item.infos.DPSupplierID = item.infos.DPSupplierID + "-" + item.infos.Supplier
  372. }
  373. if (!!item.infos.DPMaintainerID) {
  374. item.infos.DPMaintainerID = item.infos.DPMaintainerID + "-" + item.infos.Maintainer
  375. }
  376. if (!!item.infos.DPInsurerID) {
  377. item.infos.DPInsurerID = item.infos.DPInsurerID + "-" + item.infos.Insurer
  378. }
  379. return item
  380. })
  381. if (_this.onlyRead) {
  382. this.getBatch(res.Content)
  383. }
  384. _this.main = res.Content
  385. _this.copyMain = tools.deepCopy(res.Content)
  386. _this.page.total = res.TotalCount
  387. if (!!_this.hot) {
  388. _this.hot.destroy();
  389. _this.hot = null;
  390. }
  391. if (!!res.Content && res.Content.length) {
  392. _this.initHot();
  393. }
  394. } else {
  395. this.loading = false
  396. this.$message.error("请求错误:" + res.ResultMsg)
  397. }
  398. })
  399. }
  400. },
  401. //获取动态参数
  402. getBatch(data) {
  403. let param = {
  404. secret: this.secret,
  405. ProjId: this.projectId,
  406. data: {
  407. criterias: []
  408. }
  409. }
  410. if (!!data && data.length) {
  411. //一级遍历list
  412. data.map(item => {
  413. if (!!item.infos) {
  414. // 二级遍历对象infos
  415. for (let key in item.infos) {
  416. //判断是否是设定参数和动态参数
  417. if (!!item.infos[key]) {
  418. this.headers.map(child => {
  419. //如果一级标签为动态参数或者设定参数放入数据等待请求
  420. if (key == child.InfoPointCode && (child.InputMode == "L" || child.InputMode == "L1" || child.InputMode == "L2")) {
  421. param.data.criterias.push({
  422. id: item.id,
  423. code: key
  424. })
  425. }
  426. })
  427. }
  428. }
  429. }
  430. })
  431. if (param.data.criterias.length) {
  432. BeatchQueryParam(param, res => {
  433. if (!this.onlyRead) {
  434. return false
  435. }
  436. this.main = data.map(item => {
  437. res.Content.map(child => {
  438. if (item.id == child.id) {
  439. if (!!child.data || child.data == 0) {
  440. item.infos[child.code] = child.data
  441. } else {
  442. item.infos[child.code] = child.error ? "表号功能号格式错误" : "表号功能号不存在"
  443. }
  444. }
  445. })
  446. return item
  447. })
  448. this.hot.loadData(this.main)
  449. })
  450. }
  451. }
  452. },
  453. changeAssetsFalg() {
  454. if (this.linkNameFalg) {
  455. this.linkNameFalg = false
  456. } else {
  457. this.$confirm('<p>真的要在这里修改设备关联的资产么?</p><p>真的能通过列表信息找到想关联的资产么?</p><p>在这里修改关联的资产一定是因为之前关联错了要修改么?</p>', '提示', {
  458. dangerouslyUseHTMLString: true,
  459. confirmButtonText: '没错!我要改关联的资产',
  460. cancelButtonText: '我就点开看看',
  461. confirmButtonClass: 'cancelButtonClass',
  462. cancelButtonClass: 'cancelButtonClass'
  463. }).then(_ => {
  464. this.linkNameFalg = true
  465. }).catch(_ => {
  466. this.$message("取消")
  467. })
  468. }
  469. },
  470. //switch改变
  471. changeWatch() {
  472. this.reset()
  473. },
  474. //撤回
  475. undo() {
  476. this.hot.undo();
  477. },
  478. //刷新
  479. reset() {
  480. this.getMain();
  481. },
  482. //添加设备
  483. addDevice() {
  484. this.dialog.addDevice = true
  485. this.$nextTick(() => {
  486. this.$refs.assets.step(0)
  487. })
  488. },
  489. //下载
  490. download() {
  491. if (!this.onlyRead) {
  492. if (!!this.hot) {
  493. let fileName = this.mess.name + "-页数:" + this.page.currentPage + "-个数:" + this.main.length + "-总个数:" + this.page.total
  494. this.hot.getPlugin('exportFile').downloadFile("csv", { filename: fileName, columnHeaders: true, exportHiddenRows: true, exportHiddenColumns: true, rowHeaders: true })
  495. } else {
  496. this.$message("请确定存在表格")
  497. }
  498. } else {
  499. this.$message("下载需在编辑状态下")
  500. }
  501. },
  502. /**
  503. * 表头文案处理函数
  504. * @param list header数组数据
  505. *
  506. * @return 处理好的文案
  507. */
  508. delHeader(list) {
  509. let arr = tools.copyArr(list)
  510. // 如果不是只读状态,添加四大厂商选择
  511. if (!this.onlyRead) {
  512. // arr = showTools.arrToArr(arr)
  513. }
  514. let readArr = ["A1", "A2", "B1", "C5", "D1", "D2", "X", "L", "L1", "L2", "F1", "F2"]
  515. if (!this.onlyRead) {
  516. readArr.push("Own")
  517. }
  518. let data = showTools.changeHeader(arr, readArr, this.onlyRead, this.isWatch, this.allMess)
  519. data.unshift("操作", "当前关联的资产", "所属系统实例");
  520. return data;
  521. },
  522. /**
  523. * 表头数据处理函数
  524. * @param list header数组数据
  525. *
  526. * @return 处理好的数据格式
  527. */
  528. getType(list) {
  529. let arr = tools.copyArr(list)
  530. // 如果不是只读状态,添加四大厂商选择
  531. if (!this.onlyRead) {
  532. // arr = showTools.arrToArr(arr)
  533. }
  534. let data = showTools.showTypes(arr, this.onlyRead, this.isWatch, this.allMess)
  535. data.map(item => {
  536. if (
  537. item.data == "infos." + "Drawing" ||
  538. item.data == "infos." + "Pic" ||
  539. item.data == "infos." + "Nameplate" ||
  540. item.data == "infos." + "InstallPic" ||
  541. item.data == "infos." + "InstallDrawing"
  542. ) {
  543. item.renderer = text.picType
  544. }
  545. if (item.data == "infos." + "Archive" ||
  546. item.data == "infos." + "CheckReport" ||
  547. item.data == "infos." + "InsuranceFile") {
  548. item.renderer = text.fileType
  549. }
  550. })
  551. data.unshift(
  552. {
  553. data: "caozuo",
  554. renderer: tools.lookDetails,
  555. readOnly: true
  556. },
  557. {
  558. data: "linkName",
  559. readOnly: true
  560. }, {
  561. data: "linkSystem",
  562. renderer: text.systemList,
  563. readOnly: true
  564. }
  565. );
  566. // data.splice(1, 0, {
  567. // data: "flowBuild",
  568. // renderer: tools.customDropdownRenderer,
  569. // editor: "chosen",
  570. // chosenOptions: {
  571. // // multiple: true,//多选
  572. // data: this.floorData
  573. // }
  574. // })
  575. if (!!this.onlyRead) {
  576. data.map(item => {
  577. item.readOnly = true
  578. })
  579. }
  580. return data;
  581. },
  582. messShow(item) {
  583. //二维码
  584. if (item.infopoint_code == "EquipQRCode") {
  585. return {
  586. data: "infos." + item.infopoint_code,
  587. renderer: text.lookQRCode,
  588. readOnly: true
  589. }
  590. }
  591. if (item.collection_cmpt_code == "Enum") {
  592. return {
  593. data: "infos." + item.infopoint_code,
  594. renderer: this.customDropdownRenderer,
  595. editor: "chosen",
  596. chosenOptions: {
  597. // multiple: true,//多选
  598. data: item.dataSource || ""
  599. }
  600. };
  601. } else if (item.collection_cmpt_code == "Num") {
  602. return {
  603. data: "infos." + item.infopoint_code,
  604. type: "numeric",
  605. numericFormat: {
  606. pattern: "0,0.00"
  607. // culture: 'de-DE' // use this for EUR (German),
  608. // more cultures available on http://numbrojs.com/languages.html
  609. }
  610. };
  611. } else if (item.collection_cmpt_code == "Time") {
  612. return {
  613. data: "infos." + item.infopoint_code,
  614. type: "date",
  615. dateFormat: "YYYY-MM-DD",
  616. correctFormat: true
  617. };
  618. } else if (item.collection_cmpt_code == "text") {
  619. return {
  620. data: "infos." + item.infopoint_code
  621. };
  622. } else if (
  623. (item.info_point_code == "设备ID" ||
  624. item.info_point_code == "设备名称")
  625. ) {
  626. return {
  627. data: "infos." + item.infopoint_code,
  628. readOnly: true
  629. };
  630. } else if (item.collection_cmpt_code == "checkBox") {
  631. return {
  632. data: "infos." + item.infopoint_code,
  633. renderer: this.customDropdownRenderer,
  634. editor: "chosen",
  635. chosenOptions: {
  636. multiple: true,//多选
  637. data: item.dataSource || ""
  638. }
  639. };
  640. } else {
  641. return {
  642. data: "infos." + item.infopoint_code,
  643. }
  644. }
  645. },
  646. changeItem(item) {
  647. //二维码
  648. if (item.infopoint_code == "EquipQRCode" && item.visible) {
  649. return {
  650. data: "infos." + item.infopoint_code,
  651. renderer: text.lookQRCode,
  652. readOnly: true
  653. }
  654. }
  655. //厂商选择
  656. // if ((item.infopoint_code == "Brand" || item.infopoint_code == "Specification") && item.visible) {
  657. // return {
  658. // data: "infos." + item.infopoint_code,
  659. // renderer: tools.lookDetails,
  660. // readOnly: true
  661. // }
  662. // }
  663. // if (item.infopoint_code == "SupplierContractID" && item.visible) {
  664. // return {
  665. // data: "infos." + item.infopoint_code,
  666. // renderer: tools.lookDetails,
  667. // readOnly: true
  668. // }
  669. // }
  670. if (item.infopoint_code == "InsuranceNum" && item.visible) {
  671. //选择保单
  672. return {
  673. data: "infos." + item.infopoint_code,
  674. renderer: tools.lookDetails,
  675. readOnly: true
  676. }
  677. }
  678. if ((item.infopoint_code == "InsuranceFile" || item.infopoint_code == "Archive") && item.visible) {
  679. return {
  680. data: "infos." + item.infopoint_code,
  681. renderer: tools.lookDetails,
  682. readOnly: true
  683. }
  684. }
  685. if (
  686. (
  687. item.infopoint_code == "InstallPic" ||
  688. item.infopoint_code == "InstallDrawing" ||
  689. item.infopoint_code == "Nameplate" ||
  690. item.infopoint_code == "Pic" ||
  691. item.infopoint_code == "Drawing"
  692. ) && item.visible
  693. ) {
  694. return {
  695. data: "infos." + item.infopoint_code,
  696. renderer: tools.lookDetails,
  697. readOnly: true
  698. }
  699. }
  700. if (
  701. (
  702. item.infopoint_code == "Maintainer" ||
  703. item.infopoint_code == "Supplier" ||
  704. item.infopoint_code == "Insurer" ||
  705. item.infopoint_code == "InsurerContactor"
  706. )
  707. && item.visible
  708. ) {
  709. return {
  710. data: "infos." + item.infopoint_code,
  711. }
  712. }
  713. if (item.collection_cmpt_code == "Enum" && item.visible) {
  714. return {
  715. data: "infos." + item.infopoint_code,
  716. renderer: this.customDropdownRenderer,
  717. editor: "chosen",
  718. chosenOptions: {
  719. // multiple: true,//多选
  720. data: item.dataSource || ""
  721. }
  722. };
  723. } else if (item.collection_cmpt_code == "Num" && item.visible) {
  724. return {
  725. data: "infos." + item.infopoint_code,
  726. type: "numeric",
  727. numericFormat: {
  728. pattern: "0,0.00"
  729. // culture: 'de-DE' // use this for EUR (German),
  730. // more cultures available on http://numbrojs.com/languages.html
  731. }
  732. };
  733. } else if (item.collection_cmpt_code == "Time" && item.visible) {
  734. return {
  735. data: "infos." + item.infopoint_code,
  736. type: "date",
  737. dateFormat: "YYYY-MM-DD",
  738. correctFormat: true
  739. };
  740. } else if (item.collection_cmpt_code == "text" && item.visible) {
  741. return {
  742. data: "infos." + item.infopoint_code
  743. };
  744. } else if (
  745. (item.info_point_code == "设备ID" ||
  746. item.info_point_code == "设备名称") && item.visible
  747. ) {
  748. return {
  749. data: "infos." + item.infopoint_code,
  750. readOnly: true
  751. };
  752. } else if (item.collection_cmpt_code == "checkBox" && item.visible) {
  753. return {
  754. data: "infos." + item.infopoint_code,
  755. renderer: this.customDropdownRenderer,
  756. editor: "chosen",
  757. chosenOptions: {
  758. multiple: true,//多选
  759. data: item.dataSource || ""
  760. }
  761. };
  762. } else if (item.collection_cmpt_code == "Own" && item.visible) {
  763. return {
  764. data: "infos." + item.infopoint_code,
  765. renderer: text.idType,
  766. }
  767. } else {
  768. return undefined
  769. }
  770. },
  771. //初始化插件
  772. initHot() {
  773. var container = document.getElementById("handsontable");
  774. let winHeight = document.documentElement.clientHeight;
  775. this.hot = new Handsontable(container, {
  776. data: this.main,
  777. fixedColumnsLeft: 5,
  778. colHeaders: this.delHeader(this.headers), //表头文案
  779. columns: this.getType(this.headers), //数据显示格式
  780. filters: true,
  781. maxRows: this.main.length,
  782. height: winHeight - 100 - 50 - 200,
  783. columnSorting: true, //添加排序
  784. sortIndicator: true, //添加排序
  785. renderAllRows: true,
  786. // colWidths: 200,
  787. autoColumnSize: true,
  788. language: "zh-CN",
  789. manualColumnResize: true,
  790. manualColumnMove: true,
  791. dropdownMenu: [
  792. "filter_by_condition",
  793. "filter_by_value",
  794. "filter_action_bar"
  795. ],
  796. contextMenu: {
  797. items: {
  798. remove_row: {
  799. name: "删除选中设备"
  800. }
  801. }
  802. },
  803. // 事件
  804. afterChange: this.tdChange, //修改后
  805. afterFilter: this.trimmedRows, //排序前
  806. afterRemoveRow: this.romoveFm, //右键删除
  807. afterOnCellMouseDown: this.eventClick //鼠标点击
  808. });
  809. let pro = document.getElementById("hot-display-license-info");
  810. if (!!pro) {
  811. pro.parentNode.removeChild(pro);
  812. }
  813. this.isLoading = false;
  814. },
  815. //表格中的点击
  816. eventClick(el, rowArr) {
  817. //点击的是表头
  818. if (rowArr.row < 0) {
  819. return;
  820. }
  821. //被筛选过后的数组
  822. let trimmedArr = this.trimmedRows();
  823. //是否启用了排序
  824. let isSort = this.hot.getPlugin("columnSorting").isSorted();
  825. if (trimmedArr.length && isSort) {
  826. let sortArr = this.myHotArr.getPlugin("columnSorting").rowsMapper
  827. .__arrayMap;
  828. let infos = this.main[trimmedArr[sortArr[rowArr.row]]];
  829. this.getInfors(infos, { row: sortArr[rowArr.row], col: rowArr.col });
  830. } else if (isSort) {
  831. //排序后的数组
  832. let sortArr = this.hot.getPlugin("columnSorting").rowsMapper.__arrayMap;
  833. let infos = this.main[sortArr[rowArr.row]];
  834. this.getInfors(infos, { row: sortArr[rowArr.row], col: rowArr.col });
  835. } else if (trimmedArr.length) {
  836. let infos = this.main[trimmedArr[rowArr.row]];
  837. this.getInfors(infos, { row: trimmedArr[rowArr.row], col: rowArr.col });
  838. } else {
  839. let infos = this.main[rowArr.row];
  840. this.getInfors(infos, rowArr);
  841. }
  842. },
  843. tdChange(changeData, source) {
  844. if (!this.onlyRead) {
  845. if (changeData) {
  846. let trimmedArr = this.trimmedRows();
  847. let param = handsonUtils.getParam(changeData, source, this.hot, trimmedArr);
  848. let data = [];
  849. for (let i = 0; i < param.length; i++) {
  850. data.push(param[i]);
  851. }
  852. //如果data中包含/且data长度为1,将其转换成.
  853. if (changeData.length == 1 && changeData[0][1].indexOf("/") > 0) {
  854. changeData[0][1] = changeData[0][1].split("/").join(".")
  855. }
  856. //存在data进行修改请求
  857. if (data && data.length) {
  858. this.updateBusiness(data, changeData);
  859. }
  860. }
  861. }
  862. },
  863. //删除资产
  864. romoveFm() {
  865. let params = tools.differenceArr(this.main, this.copyMain)
  866. let _this = this
  867. if (params.length < 1) {
  868. return
  869. }
  870. let param = {
  871. secret: this.mess.secret,
  872. ProjId: this.mess.ProjId,
  873. data: {
  874. "criterias": []
  875. }
  876. }
  877. params.map(item => {
  878. param.data.criterias.push({ id: item.id })
  879. })
  880. this.$confirm("此操作将删除设备,是否继续?", "提示", {
  881. confirmButtonText: '确定',
  882. cancelButtonText: '取消',
  883. type: 'warning'
  884. }).then(() => {
  885. this.removeSys(param)
  886. }).catch(() => {
  887. this.reset()
  888. this.$message("取消删除")
  889. })
  890. // delProperty(param, res => {
  891. // _this.$message.success("删除成功")
  892. // _this.getMain()
  893. // })
  894. },
  895. async removeSys(param) {
  896. await delBatchList(param, res => {
  897. this.$message.success("删除成功")
  898. this.getMain()
  899. })
  900. },
  901. // 修改
  902. updateBusiness(data, change) {
  903. // data.map(item => {
  904. // if (!!item.flowBuild) {
  905. // item.building_id = item.flowBuild.split("-")[0]
  906. // item.floor_id = item.flowBuild.split("-")[1] || null
  907. // //不存在floor字段去除floor
  908. // if (!item.floor_id) {
  909. // delete item.floor_id
  910. // }
  911. // delete item.flowBuild
  912. // }
  913. // })
  914. let param = {
  915. ProjId: this.mess.ProjId,
  916. secret: this.mess.secret,
  917. data: {
  918. criterias: []
  919. }
  920. };
  921. //生成对应修改数据
  922. data.map((item, index) => {
  923. let arr = change[index][1].split(".");
  924. let info = {};
  925. info[arr[1]] = [{ value: item[arr[0]][arr[1]] != "" ? item[arr[0]][arr[1]] : null }];
  926. param.data.criterias.push({
  927. id: item.id,
  928. infos: info
  929. });
  930. });
  931. //对五大厂商进行特殊处理
  932. param.data.criterias.map(item => {
  933. if (!!item.infos.DPSupplierID) {
  934. item.infos.DPSupplierID[0].value = item.infos.DPSupplierID[0].value.split("-")[0]
  935. }
  936. if (!!item.infos.DPManufacturerID) {
  937. item.infos.DPManufacturerID[0].value = item.infos.DPManufacturerID[0].value.split("-")[0]
  938. }
  939. if (!!item.infos.DPInsurerID) {
  940. item.infos.DPInsurerID[0].value = item.infos.DPInsurerID[0].value.split("-")[0]
  941. }
  942. if (!!item.infos.DPMaintainerID) {
  943. item.infos.DPMaintainerID[0].value = item.infos.DPMaintainerID[0].value.split("-")[0]
  944. }
  945. if (!!item.infos.DPSpecificationID) {
  946. item.infos.DPSpecificationID[0].value = item.infos.DPSpecificationID[0].value.split("-")[0]
  947. }
  948. return item
  949. })
  950. updateBusiness(param).then(res => {
  951. });
  952. },
  953. //修改设备类型
  954. changeCader() {
  955. this.EquipmentList.map(item => {
  956. if (!!item.content && item.content.length) {
  957. item.content.map(child => {
  958. if (child.code == this.mess.deviceId) {
  959. this.deviceType.assetType = item.code
  960. this.deviceType.assetName = item.name
  961. }
  962. })
  963. }
  964. })
  965. },
  966. //获取到了正确的信息
  967. getInfors(infos, row) {
  968. //其他的开始判断
  969. let val = this.hot.colToProp(row.col);
  970. this.row = row.row
  971. this.messKey = val
  972. this.systemId = infos.id
  973. if (val == "caozuo") {
  974. window.open(`
  975. http://47.94.89.44:8058/spread?id=${infos.id}&pid=${this.projectId}`,"_blank")
  976. // this.iframeSrc =
  977. // process.env.BASE_URL +
  978. // ":8889/#/details?perjectId=" +
  979. // this.projectId +
  980. // "&secret=" +
  981. // this.secret +
  982. // "&FmId=" +
  983. // infos.id +
  984. // "&type=1&code=" +
  985. // infos.category.substring(2, 6);
  986. // this.dialog.details = true
  987. }
  988. //图片弹窗
  989. if (
  990. val == "infos.InstallPic" ||
  991. val == "infos.InstallDrawing" ||
  992. val == "infos.Nameplate" ||
  993. val == "infos.Drawing"
  994. ) {
  995. if (this.onlyRead) {
  996. this.dialog.lookPic = true
  997. this.picsArr = this.main[row.row].infos ? (this.main[row.row].infos[val.split(".")[1]] ? this.main[row.row].infos[val.split(".")[1]] : []) : []
  998. } else {
  999. this.imgsArr = this.main[row.row].infos ? (this.main[row.row].infos[val.split(".")[1]] ? this.main[row.row].infos[val.split(".")[1]] : []) : []
  1000. this.dialog.uploadImgs = true
  1001. }
  1002. }
  1003. if (val == "linkSystem") {
  1004. this.dialog.systemType = true
  1005. }
  1006. if (val == "infos.Pic") {
  1007. this.picsArr = this.main[row.row].infos ? (this.main[row.row].infos[val.split(".")[1]] ? this.main[row.row].infos[val.split(".")[1]] : []) : []
  1008. if (this.onlyRead) {
  1009. this.dialog.lookPic = true
  1010. } else {
  1011. this.dialog.pic = true
  1012. }
  1013. }
  1014. if (val == "infos.InsuranceFile" || val == "infos.Archive" || val == "infos.CheckReport") {
  1015. this.filesArr = this.main[row.row].infos ? (this.main[row.row].infos[val.split(".")[1]] ? this.main[row.row].infos[val.split(".")[1]] : []) : []
  1016. this.dialog.uploadFiles = true
  1017. }
  1018. if (val == "linkName" && this.linkNameFalg) {
  1019. this.category = this.main[row.row]
  1020. this.dialog.changeRea = true
  1021. }
  1022. if (val == "infos.EquipQRCode") {
  1023. this.qrcodeUrl = this.main[row.row].infos.EquipQRCode
  1024. if (!!this.qrcodeUrl) {
  1025. this.dialog.qrcode = true;
  1026. } else {
  1027. this.$message("此设备没有设备二维码")
  1028. }
  1029. }
  1030. if (this.onlyRead) {
  1031. return
  1032. }
  1033. if (val == "infos.DPManufacturerID") {
  1034. this.dialog.firm = true;
  1035. }
  1036. if (val == "infos.SupplierContractID") {
  1037. let falg = null
  1038. if (!!this.main[row.row].infos) {
  1039. if (!!this.main[row.row].infos.DPSupplierID) {
  1040. falg = this.main[row.row].infos.DPSupplierID.split("-")[0]
  1041. }
  1042. }
  1043. if (!!falg) {
  1044. this.id = falg
  1045. this.dialog.supply = true;
  1046. } else {
  1047. this.$message("请先选择供应商")
  1048. }
  1049. }
  1050. if (val == "infos.InsuranceNum") {
  1051. //选择保单
  1052. let falg = null
  1053. if (!!this.main[row.row].infos) {
  1054. if (!!this.main[row.row].infos.DPInsurerID) {
  1055. falg = this.main[row.row].infos.DPInsurerID.split("-")[0]
  1056. }
  1057. }
  1058. if (!!falg) {
  1059. this.id = falg
  1060. this.dialog.guarantee = true;
  1061. } else {
  1062. this.$message("请先选择保险商")
  1063. }
  1064. }
  1065. if (
  1066. val == "infos.DPSupplierID"
  1067. ) {
  1068. if (!!infos.linkId) {
  1069. this.dialog.supplier = true;
  1070. } else {
  1071. this.$message("该设备无关联资产")
  1072. }
  1073. }
  1074. if (val == "infos.DPMaintainerID") {
  1075. if (!!infos.linkId) {
  1076. this.dialog.maintainer = true;
  1077. } else {
  1078. this.$message("该设备无关联资产")
  1079. }
  1080. }
  1081. if (
  1082. val == "infos.DPInsurerID") {
  1083. if (!!infos.linkId) {
  1084. this.dialog.insurer = true;
  1085. } else {
  1086. this.$message("该设备无关联资产")
  1087. }
  1088. }
  1089. },
  1090. //获取被筛选掉的行号
  1091. trimmedRows() {
  1092. // var plugin = hot.getPlugin('trimRows').trimmedRows;//获取被筛选掉的行号
  1093. var plugin = this.hot.getPlugin("trimRows").trimmedRows;
  1094. let dataLength = this.main.length;
  1095. let dataArr = new Array();
  1096. for (let i = 0; i < dataLength; i++) {
  1097. dataArr.push(i);
  1098. }
  1099. if (plugin.length <= 0) {
  1100. dataArr = undefined;
  1101. } else {
  1102. dataArr = this.array_diff(dataArr, plugin);
  1103. }
  1104. return dataArr || [];
  1105. // var DataArray = new Array();
  1106. // for (var i = 0; i < plugin.length; i++) {
  1107. // // 通过行号获取数据
  1108. // DataArray.push(this.hot.getSourceDataAtRow(plugin[i]));
  1109. // }
  1110. },
  1111. //去除数组中相同的元素
  1112. array_diff(a, b) {
  1113. for (var i = 0; i < b.length; i++) {
  1114. for (var j = 0; j < a.length; j++) {
  1115. if (a[j] == b[i]) {
  1116. a.splice(j, 1);
  1117. j = j - 1;
  1118. }
  1119. }
  1120. }
  1121. return a;
  1122. },
  1123. //如果选择供应商之后
  1124. supplierChange(data) {
  1125. for (let key in data) {
  1126. if (key == "venderId") {
  1127. data[key] = data[key] + "-" + data.name
  1128. this.utilToKey(key, "venderId", data, "DPSupplierID")
  1129. }
  1130. }
  1131. // tools.setItem(this.deviceType.code, this.main)
  1132. },
  1133. supplyChange(data) {
  1134. let changeData = { id: data }
  1135. this.utilToKey("id", "id", changeData, "SupplierContractID")
  1136. // tools.setItem(this.deviceType.code, this.main)
  1137. },
  1138. //保险合同
  1139. guaranteeChange(data) {
  1140. for (let key in data) {
  1141. this.utilToKey(key, "insuranceNo", data, "InsuranceNum")
  1142. if (key == "contractFile") {
  1143. if (!!data[key]) {
  1144. data[key] = [data[key]]
  1145. }
  1146. }
  1147. this.utilToKey(key, "contractFile", data, "InsuranceFile")
  1148. }
  1149. // tools.setItem(this.deviceType.code, this.main)
  1150. },
  1151. //选择型号修改
  1152. firmChange(data) {
  1153. for (let key in data) {
  1154. // this.utilToKey(key, "name", data, "Supplier")
  1155. // this.utilToKey(key, "email", data, "SupplierEmail")
  1156. // this.utilToKey(key, "website", data, "SupplierWeb")
  1157. // this.utilToKey(key, "phone", data, "SupplierPhone")
  1158. // this.utilToKey(key, "fox", data, "SupplierFax")
  1159. // this.utilToKey(key, "man", data, "SupplierContactor")
  1160. if (key == "venderId") {
  1161. data[key] = data[key] + "-" + data.name + "/" + data.brand
  1162. this.utilToKey(key, "venderId", data, "DPManufacturerID")
  1163. }
  1164. this.utilToKey(key, "specificationId", data, "DPSpecificationID")
  1165. }
  1166. },
  1167. //保险商变更
  1168. changeInsurer(data) {
  1169. for (let key in data) {
  1170. // this.utilToKey(key, "name", data, "Insurer")
  1171. // this.utilToKey(key, "email", data, "InsurerEmail")
  1172. // this.utilToKey(key, "website", data, "InsurerWeb")
  1173. // this.utilToKey(key, "phone", data, "InsurerFax")
  1174. // this.utilToKey(key, "man", data, "InsurerContactor")
  1175. if (key == "venderId") {
  1176. data[key] = data[key] + "-" + data.name
  1177. this.utilToKey(key, "venderId", data, "DPInsurerID")
  1178. }
  1179. }
  1180. // tools.setItem(this.deviceType.code, this.main)
  1181. },
  1182. //维修商变更
  1183. changeMaintainer(data) {
  1184. for (let key in data) {
  1185. // this.utilToKey(key, "name", data, "Maintainer")
  1186. // this.utilToKey(key, "email", data, "MaintainerEmail")
  1187. // this.utilToKey(key, "website", data, "MaintainerWeb")
  1188. // this.utilToKey(key, "phone", data, "MaintainerPhone")
  1189. // this.utilToKey(key, "fox", data, "MaintainerFax")
  1190. // this.utilToKey(key, "man", data, "MaintainerContactor")
  1191. if (key == "venderId") {
  1192. data[key] = data[key] + "-" + data.name
  1193. this.utilToKey(key, "venderId", data, "DPMaintainerID")
  1194. }
  1195. }
  1196. // tools.setItem(this.deviceType.code, this.main)
  1197. },
  1198. //上传文件弹窗触发事件
  1199. fileChange(keys) {
  1200. this.setDataToMain(keys, this.messKey.split(".")[1], this.row)
  1201. // tools.setItem(this.deviceType.code, this.main)
  1202. },
  1203. //上传图片弹窗触发事件
  1204. imgChange(keys) {
  1205. this.setDataToMain(keys, this.messKey.split(".")[1], this.row)
  1206. // tools.setItem(this.deviceType.code, this.main)
  1207. },
  1208. //设备图片弹窗改变事件
  1209. changePics(keys) {
  1210. this.setDataToMain(keys, this.messKey.split(".")[1], this.row)
  1211. // tools.setItem(this.deviceType.code, this.main)
  1212. },
  1213. utilToKey(key, name, data, messName) {
  1214. if (key == name) {
  1215. this.setDataToMain(data[key], messName, this.row)
  1216. }
  1217. },
  1218. //判断是否有值,有值赋值
  1219. setDataToMain(data, key, row) {
  1220. if (!!data && data != '--') {
  1221. if (!!this.main[row].infos) {
  1222. //falg确定每个的是否有值
  1223. this.main[row].infos[key] = data
  1224. this.updateBusiness([this.main[row]], [[0, "infos." + key, null, data]])
  1225. } else {
  1226. this.main[row].infos = {}
  1227. this.main[row].infos[key] = data
  1228. }
  1229. } else {
  1230. this.main[row].infos[key] = ''
  1231. }
  1232. }
  1233. },
  1234. watch: {
  1235. projectId(){
  1236. this.main = []
  1237. this.mess.deviceId = null
  1238. this.page.total = 0
  1239. }
  1240. }
  1241. };
  1242. </script>
  1243. <style lang="less">
  1244. .hanson-bar {
  1245. height: 40px;
  1246. padding: 5px;
  1247. font-size: 14px;
  1248. overflow: hidden;
  1249. margin-top: 10px;
  1250. line-height: 40px;
  1251. .iconfont {
  1252. font-size: 12px;
  1253. }
  1254. .el-button {
  1255. // margin-right: 10px;
  1256. }
  1257. }
  1258. .cancelButtonClass {
  1259. width: 180px;
  1260. }
  1261. </style>