equipmentBoard.vue 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739
  1. <template>
  2. <div class="content">
  3. <dv-full-screen-container>
  4. <!-- 头部内容 -->
  5. <div class="header">
  6. <dv-decoration-8 class="left" />
  7. <dv-decoration-5 class="center" />
  8. <dv-decoration-8 class="right" :reverse="true" />
  9. <div class="title">{{ titleName }}</div>
  10. <div class="time">
  11. <span>月份:</span>
  12. <el-date-picker v-model="month" type="month" value-format="yyyy-MM" format="yyyy-MM" placeholder="日期选择" style="width: 120px" :readonly="false" :editable="true" :clearable="false" @change="updateAll" />
  13. </div>
  14. <div class="back" @click.prevent="goBack()">
  15. <dv-border-box-8>返回</dv-border-box-8>
  16. </div>
  17. </div>
  18. <dv-border-box-1 v-if="MiddleLeftPieViewList.data.length" style="width: 100%;height:88%;margin: 0 auto;box-sizing: border-box;overflow: hidden;">
  19. <!-- 顶部数据 -->
  20. <div class="topCard">
  21. <top-bar v-if="topBarData.length" :info="topBarData" />
  22. </div>
  23. <dv-decoration-10 style="height:1%;width: 96%;display:flex;margin: 0 auto;" />
  24. <div class="middleCard">
  25. <div style="width:100%;height: 100%;overflow: hidden;box-sizing: border-box;">
  26. <!-- <div class="middleCardLeft">
  27. <middleCard v-if="MiddleLeftPieViewList.data.length" :info="MiddleLeftPieViewList" ref="middleCardLeft" />
  28. </div> -->
  29. <!-- <dv-decoration-2 v-if="MiddleLeftPieViewList.data.length" :reverse="true" style="width:2%;height:100%;overflow: hidden;box-sizing: border-box;" /> -->
  30. <div class="middleCardCenter">
  31. <middleCard v-if="eBgRateData.data.length" :info="eBgRateData" ref="middleCardCenter" />
  32. </div>
  33. <dv-decoration-2 v-if="eBgRateData.data.length" :reverse="true" style="width:2%;height:100%;overflow: hidden;box-sizing: border-box;" />
  34. <div class="middleCardRight1">
  35. <CarouselTabl v-if="shiyonglvConfig.data.length" :info="shiyonglvConfig" title="设备使用记录" />
  36. </div>
  37. <dv-decoration-2 v-if="eBgRateData.data.length" :reverse="true" style="width:2%;height:100%;overflow: hidden;box-sizing: border-box;" />
  38. <div class="middleCardRight" v-if="eBgRateData.data.length">
  39. <CarouselTabl v-if="config.data.length" :info="config" title="设备报废记录" />
  40. </div>
  41. </div>
  42. <dv-decoration-10 v-if="MiddleLeftPieViewList.data.length" style="height: 5%;" />
  43. </div>
  44. <dv-decoration-10 style="height:1%;width: 96%;display:flex;margin: 0 auto; " />
  45. <div class="bottomCard">
  46. <div style="width:25%">
  47. <zhuzhuangtu v-if="sheBeiData.data.length" :info="sheBeiData" ref="sheBeiDataDataref" />
  48. </div>
  49. <dv-decoration-2 v-if="bottomData.data.length" :reverse="true" style="width:2%;height:100%;" />
  50. <div style="width:24%;display:flex;overflow: hidden;">
  51. <div class="bottomCardLeft0">
  52. <middleCard v-if="weiHuSheBeiDataShow" :info="weiHuSheBeiData" ref="sheBeiWeiHuRef" />
  53. </div>
  54. <!-- <dv-decoration-2 v-if="weiHuSheBeiData.data.length" :reverse="true" style="width:3%;height:330px;margin: 0 10px;" /> -->
  55. <!-- <div style="width:37%">
  56. <zhuzhuangtu v-if="sheBeiweiHuData.data.length" :info="sheBeiweiHuData" ref="sheBeiWeiHuDataref" />
  57. </div> -->
  58. </div>
  59. <dv-decoration-2 v-if="bottomData.data.length" :reverse="true" style="width:2%;height:100%;" />
  60. <div style="width:24%;display:flex;overflow: hidden;">
  61. <!-- <div style="width:40%">
  62. <zhuzhuangtu v-if="zhuantaiEData.data.length" :info="zhuantaiEData" ref="zhuantaiEDataref" />
  63. </div> -->
  64. <!-- <dv-decoration-2 v-if="jianDingjiaoZhunSheBeiData.data.length" :reverse="true" style="width:4%;height:100%;" /> -->
  65. <div class="bottomCardright">
  66. <middleCard v-if="jianDingjiaoZhunSheBeiDataShow" :info="jianDingjiaoZhunSheBeiData" ref="jiandingRef" />
  67. </div>
  68. </div>
  69. <dv-decoration-2 v-if="sheBeiHeChaDataShow" :reverse="true" style="width:2%;height:100%;" />
  70. <div style="width:25%;display:flex;overflow: hidden;">
  71. <div class="bottomCardLeft">
  72. <middleCard v-if="sheBeiHeChaDataShow" :info="sheBeiHeChaData" ref="sheBeiHeChaRef" />
  73. </div>
  74. <!-- <dv-decoration-2 v-if="sheBeiHeChaData.data.length" :reverse="true" style="width:2%;height:100%;" /> -->
  75. <!-- <div style="width:100%">
  76. <zhuzhuangtu v-if="bottomData.data.length" :info="bottomData" ref="bottomCardLeft" />
  77. </div> -->
  78. </div>
  79. </div>
  80. </dv-border-box-1>
  81. </dv-full-screen-container>
  82. </div>
  83. </template>
  84. <script>
  85. import screenfull from "screenfull";
  86. import curdPost from "@/business/platform/form/utils/custom/joinCURD.js";
  87. import { color } from "echarts/lib/export";
  88. // import { config } from 'public/lib/UEditor/third-party/zeroclipboard/ZeroClipboard';
  89. // import { acceptList } from "./data.js";
  90. // import { number } from 'echarts/lib/export';
  91. export default {
  92. name: "checkBoard",
  93. components: {
  94. topBar: () => import("./component/equipment/equipmentBoardTopcard"),
  95. middleCard: () => import("./component/equipment/getPieView"),
  96. zhuzhuangtu: () => import("./component/equipment/zhuzhuangtu"),
  97. CarouselTabl: () => import("./component/equipment/CarouselTabl"),
  98. },
  99. data() {
  100. const d = new Date();
  101. return {
  102. titleName: "设备管理看板",
  103. year: d.toJSON().slice(0, 4),
  104. month: d.toJSON().slice(0, 7),
  105. today: d.toJSON().slice(0, 10),
  106. topBarData: [],
  107. timer: null,
  108. MiddleLeftPieViewList: {
  109. data: [],
  110. config: { idSelector: "main" }, //{name:,value}
  111. color: [],
  112. },
  113. eBgRateData: {
  114. data: [],
  115. config: {},
  116. },
  117. sheBeiHeChaData: {
  118. data: [],
  119. config: {},
  120. },
  121. sheBeiHeChaDataShow:false,
  122. jianDingjiaoZhunSheBeiData: {
  123. data: [],
  124. config: {},
  125. },
  126. weiHuSheBeiData: {
  127. data: [],
  128. config: {},
  129. },
  130. weiHuSheBeiDataShow:false,
  131. jianDingjiaoZhunSheBeiDataShow:false,
  132. bottomData: { xData: [], data: [], config: { idSelector: "" } },
  133. zhuantaiEData: { xData: [], data: [], config: { idSelector: "" } },
  134. sheBeiData: { xData: [], data: [], config: { idSelector: "" } },
  135. sheBeiweiHuData: { xData: [], data: [], config: { idSelector: "" } },
  136. config: {
  137. header: ["设备名称", "编号", "状态"],
  138. data: [],
  139. columnWidth: ["160", "110", "85"],
  140. rowNum: 6,
  141. },
  142. shiyonglvConfig: {
  143. header: ["设备名称", "使用时间", "使人","存放位置","状态", "频率"],
  144. data: [],
  145. columnWidth: ["175", "110", "80", "140","100", "60"],
  146. rowNum: 6,
  147. },
  148. zichan: 0,
  149. loading: true,
  150. };
  151. },
  152. created() {
  153. if (screenfull.isEnabled && !screenfull.isFullscreen) {
  154. this.allView();
  155. }
  156. this.updateAll();
  157. },
  158. beforeDestroy() {
  159. if (screenfull.isFullscreen) {
  160. screenfull.toggle();
  161. }
  162. },
  163. methods: {
  164. allView() {
  165. // 默认显示全屏
  166. screenfull.request();
  167. },
  168. goBack() {
  169. this.$router.back(-1);
  170. },
  171. createAll() {
  172. this.getCarouselShiYonglvTable();
  173. this.getTopBarData();
  174. this.getCarouselTable();
  175. },
  176. updateAll(e) {
  177. // this.getSheBeiMony();
  178. this.getCarouselShiYonglvTable();
  179. this.getTopBarData();
  180. // this.getMiddleLeftPieView();
  181. this.getCarouselTable();
  182. this.$forceUpdate();
  183. // location.reload()
  184. // this.getbottomData();
  185. },
  186. async getTopBarData() {
  187. let this_ = this;
  188. this_.sheBeiHeChaDataShow = false;
  189. this_.weiHuSheBeiDataShow = false;
  190. this_.jianDingjiaoZhunSheBeiDataShow = false;
  191. let sql1 = `select fei_yong_ as feiyong from t_mjsbxzqrb where shi_fou_guo_shen_ ='1'`;
  192. let zichan;
  193. await curdPost("sql", sql1).then((res) => {
  194. const data = res.variables.data;
  195. zichan = this_.getAllMonyInt(data);
  196. });
  197. let sql2 = `select yu_suan_ as feiyong from t_mjyqsbwxsqb where shi_fou_guo_shen_ ='1'`;
  198. let shenqinngfeiyong;
  199. await curdPost("sql", sql1).then((res) => {
  200. const data = res.variables.data;
  201. shenqinngfeiyong = this_.getAllMonyInt(data);
  202. });
  203. let sql3 = `select shi_ji_zhi_chu_ as feiyong from t_mjsbwxqrb where shi_fou_guo_shen_ ='1'`;
  204. let querennfeiyong;
  205. await curdPost("sql", sql1).then((res) => {
  206. const data = res.variables.data;
  207. querennfeiyong = this_.getAllMonyInt(data);
  208. });
  209. // let weixiufeiyongbi = shenqinngfeiyong / querennfeiyong;
  210. let sql = `select a.Equipments,a1.mony,b.addEquipments,c.testEquipments,c1.testNoEquipments,d.checkEquipments,
  211. d1.checkNoEquipments,e.goodEquipments,f.scrapEquipments,g.limitedEquipments,h.weiHuNoEquipments,h1.weiHuEquipments
  212. from
  213. (select count(*) as Equipments from t_sbdj) as a,
  214. (select bei_zhu_ as mony FROM t_sbdj) as a1,
  215. (select count(*) as addEquipments from t_sbdj where gou_jin_ri_qi_ LIKE '${this_.month}%') as b,
  216. (select count(*) as testEquipments from t_mjsbxzqrb where shi_fou_guo_shen_ ='1') as c,
  217. (select count(*) as testNoEquipments from t_mjsbjdxzjhzb where create_time_ LIKE '${this_.month}%') as c1,
  218. (select count(*) as checkEquipments from t_mjyqsbwxsqb where create_time_ LIKE '${this_.month}%') as d,
  219. (select count(*) as checkNoEquipments from t_mjsbwxqrb where create_time_ LIKE '${this_.month}%' and shi_fou_guo_shen_ ='1') as d1,
  220. (select count(*) as goodEquipments from t_sbdj where she_bei_zhuang_ta ='正常使用' ) as e,
  221. (select count(*) as scrapEquipments from t_sbdj where she_bei_zhuang_ta ='禁止使用' or she_bei_zhuang_ta ='报废/停用') as f,
  222. (select count(*) as limitedEquipments from t_sbdj where she_bei_zhuang_ta ='限制使用') as g,
  223. (select count(*) as weiHuNoEquipments from t_mjsbwhjhzb where create_time_ LIKE '${this_.month}%') as h,
  224. (select count(*) as weiHuEquipments from t_mjsbwhbyjlby where create_time_ LIKE '${this_.month}%' and shi_fou_guo_shen_ ='1') as h1`;
  225. await curdPost("sql", sql)
  226. .then((res) => {
  227. const data = res.variables.data;
  228. // if(data.length <=0){
  229. // this.eBgRateData.data.push([])
  230. // this.sheBeiHeChaData.data.push([]);
  231. // this.jianDingjiaoZhunSheBeiData.push([]);
  232. // this.weiHuSheBeiData.data.push([]);
  233. // return
  234. // }
  235. // let zichan = '待确认';
  236. let eIntactnessRate = Number(((data[0].goodEquipments / data[0].Equipments).toFixed(3) + "").slice(2, 4));
  237. this_.MiddleLeftPieViewList.data = [];
  238. let eBadRate = 100 - eIntactnessRate;
  239. let obj = {};
  240. obj.value = data[0].goodEquipments;
  241. obj.name = "正常设备数";
  242. this_.MiddleLeftPieViewList.data.push(obj);
  243. obj = {};
  244. obj.value = data[0].scrapEquipments;
  245. obj.name = "停用/报废设备数";
  246. this_.MiddleLeftPieViewList.data.push(obj);
  247. obj = {};
  248. obj.value = data[0].limitedEquipments;
  249. obj.name = "受限设备数";
  250. this_.MiddleLeftPieViewList.data.push(obj);
  251. // this_.MiddleLeftPieViewList.data.push(obj);
  252. this_.MiddleLeftPieViewList.color = ["#339933", "#FFFF66", "#FF0033"];
  253. this_.MiddleLeftPieViewList.config.title = "设备状态工作分布率";
  254. this_.MiddleLeftPieViewList.config.idSelector = "main2";
  255. // this_.$nextTick(() => {
  256. // setTimeout(() => {
  257. // this_.$refs.middleCardLeft.getMiddleLeft(); // hhhh xxxx
  258. // }, 1000);
  259. // });
  260. obj = {};
  261. let result = [
  262. {
  263. title: "",
  264. children: [
  265. {
  266. label: "设备总数",
  267. value: data[0].Equipments,
  268. danwei: "",
  269. },
  270. {
  271. label: "新增数",
  272. value: data[0].addEquipments,
  273. danwei: "",
  274. },
  275. {
  276. label: "良好数",
  277. value: data[0].goodEquipments,
  278. danwei: "",
  279. },
  280. {
  281. label: "受限数",
  282. value: data[0].limitedEquipments,
  283. danwei: "",
  284. },
  285. {
  286. label: "报废/停用数",
  287. value: data[0].scrapEquipments,
  288. danwei: "",
  289. },
  290. ],
  291. },
  292. {
  293. title: "",
  294. children: [
  295. {
  296. label: "计划维护数",
  297. value: data[0].weiHuNoEquipments,
  298. danwei: "",
  299. },
  300. {
  301. label: "已维护数",
  302. value: data[0].weiHuEquipments,
  303. danwei: "",
  304. },
  305. ],
  306. },
  307. {
  308. title: "",
  309. children: [
  310. {
  311. label: "计划检定/校准数",
  312. value: data[0].testNoEquipments,
  313. danwei: "",
  314. },
  315. {
  316. label: "已检定/校准数",
  317. value: data[0].testEquipments,
  318. danwei: "",
  319. },
  320. {
  321. label: `检定校准费用`,
  322. value: zichan,
  323. danwei: "元",
  324. },
  325. ],
  326. },
  327. {
  328. title: "",
  329. children: [
  330. {
  331. label: "申请维修数",
  332. value: data[0].checkNoEquipments,
  333. danwei: "",
  334. },
  335. {
  336. label: "完成维修数",
  337. value: data[0].checkEquipments,
  338. danwei: "",
  339. },
  340. // {
  341. // label: "费用比",
  342. // value: weixiufeiyongbi || 0,
  343. // danwei: "%",
  344. // },
  345. ],
  346. },
  347. {
  348. title: "",
  349. children: [
  350. {
  351. label: "设备完好率",
  352. value: eIntactnessRate,
  353. danwei: "%",
  354. },
  355. {
  356. label: "设备故障率",
  357. value: eBadRate,
  358. danwei: "%",
  359. },
  360. // {
  361. // label: '设备总值',
  362. // value:zichan,
  363. // danwei:'元'
  364. // },
  365. ],
  366. },
  367. ];
  368. //设备数量统计
  369. this_.sheBeiData.xData = [
  370. "设备总数",
  371. "新增数",
  372. "良好数",
  373. "受限数",
  374. "报废停用数",
  375. ];
  376. this_.sheBeiData.data.push(data[0].Equipments);
  377. this_.sheBeiData.data.push(data[0].addEquipments);
  378. this_.sheBeiData.data.push(data[0].goodEquipments);
  379. this_.sheBeiData.data.push(data[0].limitedEquipments);
  380. this_.sheBeiData.data.push(data[0].scrapEquipments);
  381. this_.sheBeiData.config.title = "设备各工作状态数量统计";
  382. this_.sheBeiData.config.idSelector = "main8";
  383. this_.bottomData.data=[];
  384. this_.bottomData.xData = ["计划核查数", "本月已核查数"];
  385. this_.bottomData.data.push(data[0].checkNoEquipments);
  386. this_.bottomData.data.push(data[0].checkEquipments);
  387. this_.bottomData.config.title = "期间核查设备完成图";
  388. this_.bottomData.config.idSelector = "main4";
  389. this_.zhuantaiEData.xData = ["计划检定/校准数", "已完成检定/校准数"];
  390. this_.zhuantaiEData.data.push(data[0].testNoEquipments);
  391. this_.zhuantaiEData.data.push(data[0].testEquipments);
  392. this_.zhuantaiEData.config.title = "设备检定/校准设备完成图";
  393. this_.zhuantaiEData.config.idSelector = "main3";
  394. //维护设备柱状图
  395. this_.sheBeiweiHuData.xData = ["计划维护数", "已完成数"];
  396. this_.sheBeiweiHuData.data.push(data[0].weiHuNoEquipments);
  397. this_.sheBeiweiHuData.data.push(data[0].weiHuEquipments);
  398. this_.sheBeiweiHuData.config.title = "设备维护柱状图";
  399. this_.sheBeiweiHuData.config.idSelector = "mainWeiHuZ";
  400. // this_.$nextTick(() => {
  401. // setTimeout(() => {
  402. // this_.$refs.zhuantaiEDataref.getMiddleLeft
  403. // ? this_.$refs.zhuantaiEDataref.getMiddleLeft()
  404. // : ""; // hhhh xxxx
  405. // this_.$refs.bottomCardLeft.getMiddleLeft
  406. // ? this_.$refs.bottomCardLeft.getMiddleLeft()
  407. // : ""; // hhhh xxxx
  408. // this_.$refs.sheBeiWeiHuDataref.getMiddleLeft
  409. // ? this_.$refs.sheBeiWeiHuDataref.getMiddleLeft()
  410. // : "";
  411. // }, 1000);
  412. // });
  413. let objRate = {};
  414. objRate.name = "完好率";
  415. objRate.value = eIntactnessRate;
  416. this_.eBgRateData.data.push(objRate);
  417. objRate = {};
  418. objRate.value = eBadRate;
  419. objRate.name = "故障率";
  420. this_.eBgRateData.data.push(objRate);
  421. this_.eBgRateData.color = ["#339933", "#FF0033"];
  422. this_.eBgRateData.config.title = "设备完好情况";
  423. this_.eBgRateData.config.idSelector = "main1";
  424. //设备维护
  425. let objweihu = {};
  426. this_.weiHuSheBeiData.data = [];
  427. objweihu.name = "计划维护数";
  428. objweihu.value = data[0].weiHuNoEquipments;
  429. this_.weiHuSheBeiData.data.push(objweihu);
  430. objweihu = {};
  431. objweihu.value = data[0].weiHuEquipments;
  432. objweihu.name = "已维护数";
  433. this_.weiHuSheBeiData.data.push(objweihu);
  434. this_.weiHuSheBeiData.color = ["#5470c6", "#38a838"];
  435. this_.weiHuSheBeiData.config.title = "设备维护完成情况";
  436. this_.weiHuSheBeiData.config.idSelector = "mainWeiHu";
  437. this_.weiHuSheBeiDataShow = true;
  438. //设备核查
  439. let objHeCha = {}; //核查改维修
  440. this_.sheBeiHeChaData.data =[];
  441. objHeCha.name = "维修申请数";
  442. objHeCha.value = data[0].checkNoEquipments;
  443. this_.sheBeiHeChaData.data.push(objHeCha);
  444. objHeCha = {};
  445. objHeCha.value = data[0].checkEquipments;
  446. objHeCha.name = "已完成数";
  447. this_.sheBeiHeChaData.data.push(objHeCha);
  448. this_.sheBeiHeChaData.color = ["#5470c6", "#38a838"];
  449. this_.sheBeiHeChaData.config.title = "设备维修情况";
  450. this_.sheBeiHeChaData.config.idSelector = "mainHeCha";
  451. this_.sheBeiHeChaDataShow = true;
  452. //设备检定校准
  453. let objJianding = {};
  454. this_.jianDingjiaoZhunSheBeiData.data =[];
  455. objJianding.name = "计划检定/校准数";
  456. objJianding.value = data[0].testNoEquipments;
  457. this_.jianDingjiaoZhunSheBeiData.data.push(objJianding);
  458. objJianding = {};
  459. objJianding.value = data[0].testEquipments;
  460. objJianding.name = "已完成数";
  461. this_.jianDingjiaoZhunSheBeiData.data.push(objJianding);
  462. this_.jianDingjiaoZhunSheBeiData.color = ["#5470c6", "#38a838"];
  463. this_.jianDingjiaoZhunSheBeiData.config.title = "设备检定/校准完成情况";
  464. this_.jianDingjiaoZhunSheBeiData.config.idSelector = "mainJianDing";
  465. this_.jianDingjiaoZhunSheBeiDataShow = true;
  466. // setTimeout(() => {
  467. // this_.$refs.middleCardCenter.getMiddleLeft
  468. // ? this_.$refs.middleCardCenter.getMiddleLeft()
  469. // : ""; // hhhh xxxx
  470. // this_.$refs.sheBeiHeChaRef.getMiddleLeft
  471. // ? this_.$refs.sheBeiHeChaRef.getMiddleLeft()
  472. // : ""; //
  473. // this_.$refs.jiandingRef.getMiddleLeft
  474. // ? this_.$refs.jiandingRef.getMiddleLeft()
  475. // : "";
  476. // }, 1000);
  477. objRate = {};
  478. this_.topBarData = result;
  479. })
  480. .catch((err) => {
  481. console.log(err);
  482. });
  483. },
  484. // getMiddleLeftPieView() {
  485. // // [ { value: 1048, name: 'Search Engine' },]
  486. // console.log(1);
  487. // },
  488. async getCarouselTable() {
  489. let this_ = this;
  490. const sql =
  491. "select * from t_sbdj where she_bei_zhuang_ta ='禁止使用' or she_bei_zhuang_ta ='报废/停用'";
  492. let data1 = [];
  493. await curdPost("sql", sql)
  494. .then((res) => {
  495. const result = res.variables.data;
  496. result.forEach((item) => {
  497. data1 = [];
  498. data1.push(item.she_bei_ming_cheng_);
  499. data1.push(item.she_bei_shi_bie_h);
  500. // data1.push(item.gui_ge_xing_hao_);
  501. data1.push(item.she_bei_zhuang_ta);
  502. this_.config.data.push(data1);
  503. });
  504. })
  505. .catch((err) => {
  506. console.log(err);
  507. });
  508. },
  509. async getCarouselShiYonglvTable() {
  510. let this_ = this;
  511. const sql = `select b.name_,c.cun_fang_di_dian_, a.she_bei_ming_chen,a.she_bei_bian_hao_ ,a.create_time_,a.she_bei_zhuang_ku,a.shi_yong_ren_,COUNT(*) AS pinlv FROM t_mjsbsy AS a JOIN ibps_party_employee AS b ON a.shi_yong_ren_ = b.id_ JOIN t_sbdj AS c ON a.she_bei_bian_hao_ = c.id_ GROUP BY create_time_ HAVING create_time_ LIKE '${this.month}%' ORDER BY pinlv DESC`;
  512. let data1 = [];
  513. let res1 = [];
  514. this.shiyonglvConfig.data = [];
  515. await curdPost("sql", sql)
  516. .then((res) => {
  517. const result = res.variables.data;
  518. if (result.length > 0) {
  519. result.forEach((item) => {
  520. data1 = [];
  521. data1.push(item.she_bei_ming_chen);
  522. data1.push(this_.timestampToTime(item.create_time_ / 1000));
  523. data1.push(item.name_);
  524. data1.push(item.cun_fang_di_dian_);
  525. data1.push(item.she_bei_zhuang_ku);
  526. data1.push(item.pinlv);
  527. this_.shiyonglvConfig.data.push(data1);
  528. // this_.$forceUpdate()
  529. });
  530. }else{
  531. this_.shiyonglvConfig.data.push(["无数据"])
  532. }
  533. // console.log(this_.shiyonglvConfig.data);
  534. })
  535. .catch((err) => {
  536. console.log(err);
  537. });
  538. },
  539. timestampToTime(timestamp) {
  540. var date = new Date(timestamp * 1000);
  541. var Y = date.getFullYear() + "-";
  542. var M =
  543. (date.getMonth() + 1 < 10
  544. ? "0" + (date.getMonth() + 1)
  545. : date.getMonth() + 1) + "-";
  546. var D =
  547. (date.getDate() < 10 ? "0" + date.getDate() : date.getDate()) + " ";
  548. var h = date.getHours() + ":";
  549. var m = date.getMinutes() + ":";
  550. var s = date.getSeconds();
  551. return Y + M + D;
  552. },
  553. getAllMonyInt(monyArr) {
  554. let mony = 0;
  555. let filterMony = 0;
  556. monyArr.forEach((item) => {
  557. filterMony = item.feiyong * 1;
  558. mony += filterMony;
  559. });
  560. return mony;
  561. },
  562. },
  563. };
  564. </script>
  565. <style lang="scss" scoped>
  566. .content {
  567. width: 100%;
  568. height: 100%;
  569. background-color: #030409;
  570. position: absolute;
  571. color: #fff;
  572. z-index: 999;
  573. #dv-full-screen-container {
  574. background-image: url("./img/bg.png");
  575. background-size: 100% 100%;
  576. box-shadow: 0 0 3px blue;
  577. display: flex;
  578. flex-direction: column;
  579. }
  580. .main-content {
  581. flex: 1;
  582. display: flex;
  583. flex-direction: column;
  584. }
  585. .block-left-right-content {
  586. flex: 1;
  587. display: flex;
  588. margin-top: 0.8%;
  589. }
  590. .block-top-bottom-content {
  591. flex: 1;
  592. display: flex;
  593. flex-direction: column;
  594. box-sizing: border-box;
  595. padding-left: 0.8%;
  596. }
  597. .block-top-content {
  598. height: 55%;
  599. display: flex;
  600. flex-grow: 0;
  601. box-sizing: border-box;
  602. padding-bottom: 0.8%;
  603. }
  604. .header {
  605. position: relative;
  606. width: 100%;
  607. height: 10%;
  608. display: flex;
  609. justify-content: space-between;
  610. flex-shrink: 0;
  611. box-sizing: border-box;
  612. overflow: hidden;
  613. .left,
  614. .right {
  615. width: 25%;
  616. height: 60px;
  617. }
  618. .center {
  619. width: 40%;
  620. height: 60px;
  621. margin-top: 30px;
  622. }
  623. .title {
  624. position: absolute;
  625. font-size: 30px;
  626. font-weight: bold;
  627. left: 50%;
  628. top: 15px;
  629. transform: translateX(-50%);
  630. }
  631. .time,
  632. .back {
  633. width: 8%;
  634. cursor: pointer;
  635. height: 2.825rem;
  636. line-height: 2.825rem;
  637. text-align: center;
  638. margin-top: 2.5%;
  639. flex: 1;
  640. position: absolute;
  641. color: #ffffff;
  642. }
  643. .time {
  644. display: flex;
  645. justify-content: flex-end;
  646. width: 20%;
  647. right: 75%;
  648. }
  649. .back {
  650. left: 75%;
  651. }
  652. }
  653. .topCard {
  654. width: 100%;
  655. height: 16%;
  656. box-sizing: border-box;
  657. overflow: hidden;
  658. }
  659. .bottomCard {
  660. height: 39%;
  661. overflow: hidden;
  662. box-sizing: border-box;
  663. }
  664. .middleCard {
  665. height: 40%;
  666. overflow: hidden;
  667. box-sizing: border-box;
  668. }
  669. .middleCard,
  670. .bottomCard {
  671. width: 96%;
  672. // margin-left: 18px;
  673. // margin-top: 30px;
  674. margin: 0 auto;
  675. overflow: hidden;
  676. box-sizing: border-box;
  677. div {
  678. display: inline-block;
  679. }
  680. .middleCardLeft {
  681. width: 28%;
  682. height: 100%;
  683. overflow: hidden;
  684. box-sizing: border-box;
  685. }
  686. .middleCardCenter {
  687. width: 24%;
  688. height: 100%;
  689. overflow: hidden;
  690. box-sizing: border-box;
  691. }
  692. .middleCardRight {
  693. width: 24%;
  694. height: 100%;
  695. overflow: hidden;
  696. box-sizing: border-box;
  697. }
  698. .middleCardRight1 {
  699. height: 100%;
  700. width: 48%;
  701. overflow: hidden;
  702. box-sizing: border-box;
  703. }
  704. padding: 2px 0px;
  705. }
  706. .bottomCard {
  707. display: flex;
  708. div {
  709. display: inline-block;
  710. }
  711. .bottomCardLeft0 {
  712. width: 100%;
  713. }
  714. .bottomCardLeft {
  715. width: 100%;
  716. }
  717. .bottomCardright {
  718. width: 100%;
  719. }
  720. }
  721. }
  722. .dv-decoration-10 {
  723. width: 92%;
  724. margin: 7px 0 0;
  725. height: 5px;
  726. }
  727. </style>