MenuCard.vue 42 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181
  1. <template>
  2. <!-- 外边框 -->
  3. <div
  4. ref="menuCard"
  5. v-loading="dataInitLoading"
  6. element-loading-spinner="el-icon-loading"
  7. element-loading-background="rgba(0, 0, 0, 0.8)"
  8. :class="$ifLeftMenu(menuData.title != undefined ? menuData.title : '') ? 'menuMainBoxA' : 'menuMainBox'"
  9. :style="{
  10. width: menuData.boxWidth ? menuData.boxWidth + 'px' : '410px',
  11. height: menuData.boxHeight ? menuData.boxHeight + 'px' : 'auto',
  12. border: menuData.type !== 'chart' && menuData.type !== 'legend' ? '' : '1px solid #2FB8FF',
  13. background: menuData.boxBackground ? menuData.boxBackground : ''
  14. }"
  15. @click="changeMenu()"
  16. >
  17. <!-- 头部 -->
  18. <div class="menuMainBox_top" v-if="menuData.type !== 'chart' && menuData.type !== 'legend'">
  19. <!-- 头部左侧 -->
  20. <div
  21. class="menuMainBox_top_left"
  22. :style="{
  23. width: menuData.titleWidth ? menuData.titleWidth + '%' : '50%'
  24. }"
  25. >
  26. <!-- 左侧箭头图标 -->
  27. <div class="menuMainBox_top_left_iconS" v-if="menuData.type !== 'imageMenu'"></div>
  28. <div class="menuMainBox_top_left_iconR" v-if="menuData.type === 'imageMenu'">
  29. <div
  30. class="menuMainBox_top_left_iconR_active"
  31. v-if="$ifLeftMenu(menuData.index != undefined ? menuData.title : '')"
  32. ></div>
  33. </div>
  34. <!-- 标题 -->
  35. <div class="menuMainBox_top_left_title">
  36. {{ (menuData.beforeTitle ? $store.state[menuData.beforeTitle] : "") + menuData.title }}
  37. </div>
  38. <!-- 右侧倾斜图标1 -->
  39. <div class="menuMainBox_top_left_iconE menuMainBox_top_left_iconE1"></div>
  40. <!-- 右侧倾斜图标2 -->
  41. <div class="menuMainBox_top_left_iconE menuMainBox_top_left_iconE2"></div>
  42. </div>
  43. <!-- 右侧两个倾斜方框 -->
  44. <div
  45. class="menuMainBox_top_right"
  46. :style="{
  47. width: menuData.titleWidth ? 110 - menuData.titleWidth + '%' : '60%'
  48. }"
  49. >
  50. <!-- 方块1 -->
  51. <div class="menuMainBox_top_right_d1"></div>
  52. <!-- 方块2 -->
  53. <div class="menuMainBox_top_right_d2"></div>
  54. </div>
  55. <!-- 右上角三个点(蓝橙蓝) -->
  56. <div class="menuMainBox_top_topRight">
  57. <div></div>
  58. <div></div>
  59. <div></div>
  60. </div>
  61. </div>
  62. <!-- 头部下的折线 -->
  63. <div
  64. class="menuMainBox_topBottom"
  65. v-if="menuData.type !== 'chart' && menuData.type !== 'legend'"
  66. :style="{
  67. left: menuData.titleWidth
  68. ? (menuData.titleWidth <= 40 ? menuData.titleWidth - 39 : menuData.titleWidth - 40) + '%'
  69. : '10%'
  70. }"
  71. >
  72. <!-- 折线右上角圆球 -->
  73. <div></div>
  74. </div>
  75. <div class="menuMainBox_topChart" v-if="menuData.type === 'chart' || menuData.type === 'legend'">
  76. <div class="menuMainBox_topChart_title">
  77. {{ menuData.title }}
  78. </div>
  79. </div>
  80. <!-- -------------------------------------------------主题------------------------------------------ -->
  81. <div class="menuMainBox_main" v-if="menuData.type === 'card'">
  82. <!-- 上部 -->
  83. <div class="menuMainBox_main_top" v-if="!menuData.topSolt">
  84. <slot name="top"> </slot>
  85. <TopCard v-if="menuData.commonName == 'TOP'" :dataList="menuData.topData" :columnName="menuData.field" />
  86. </div>
  87. <div class="menuMainBox_main_top" v-if="menuData.topSolt">
  88. <TagTableCard
  89. v-if="menuData.topSolt.commonName == 'TagTableCard'"
  90. :echartData="menuData.topSolt.commonData"
  91. @changeMousemoveIndex="changeMousemoveIndex"
  92. />
  93. <div
  94. class="menuCardFlex"
  95. v-if="menuData.topSolt.commonName == 'TagCard' || menuData.topSolt.commonName == 'ALLLIST'"
  96. :style="{
  97. justifyContent: menuData.topSolt.commonData.length > 1 ? 'space-between' : 'center'
  98. }"
  99. >
  100. <TagCard
  101. v-for="(item, index) in menuData.topSolt.commonData"
  102. :data="item"
  103. :index="index"
  104. :chartCardDataIndex="chartCardDataIndex"
  105. :key="item.title"
  106. @changeMousemoveIndex="changeMousemoveIndex"
  107. />
  108. </div>
  109. </div>
  110. <!-- 下部 -->
  111. <div class="menuMainBox_main_bottom" v-if="!menuData.bottomSolt">
  112. <slot name="bottom"></slot>
  113. </div>
  114. <div class="menuMainBox_main_bottom" v-if="menuData.bottomSolt">
  115. <ChartCard
  116. v-if="menuData.bottomSolt.commonName == 'ChartCard'"
  117. :title="menuData.topSolt.commonData[chartCardDataIndex].title"
  118. :categoryData="menuData.topSolt.commonData[chartCardDataIndex].categoryData"
  119. :valueData="menuData.topSolt.commonData[chartCardDataIndex].valueData"
  120. :unit="menuData.topSolt.commonData[chartCardDataIndex].unit"
  121. />
  122. </div>
  123. </div>
  124. <div class="menuMainBox_main" v-if="menuData.type === 'chart' || menuData.type === 'legend'">
  125. <div class="menuMainBox_main_all" v-if="!menuData.topSolt && !menuData.bottomSolt">
  126. <slot></slot>
  127. </div>
  128. </div>
  129. <div class="menuMainBox_main_image" v-if="menuData.type === 'imageMenu'">
  130. <div class="menuMainBox_main_image_box" :style="returnImageUrl(menuData.imageUrl, menuData.boxHeight)"></div>
  131. </div>
  132. <!-- 图例属性显示区域 -->
  133. <div v-if="menuData.type === 'legend'" class="legend"></div>
  134. </div>
  135. </template>
  136. <script>
  137. /**
  138. * 模块通用组件(首页和其他页面都有用到,由于综合功能和适配场景较多,配置组合可以联系开发人员:LiuMengxiang)
  139. * @author: LiuMengxiang
  140. * @Date: 2022年11月14-18日
  141. */
  142. import TagTableCard from "@/components/common/TagTableCard.vue";
  143. import ChartCard from "@/components/common/ChartCard.vue";
  144. import TagCard from "@/components/common/TagCard.vue";
  145. import TopCard from "@/components/common/TopCard.vue";
  146. export default {
  147. name: "menuCard",
  148. components: { TagTableCard, ChartCard, TagCard, TopCard },
  149. data() {
  150. return {
  151. dataInitLoading: false,
  152. resData: [],
  153. chartCardDataIndex: 0
  154. };
  155. },
  156. mounted() {
  157. this.$nextTick(() => {
  158. if (this.menuData && this.menuData.topSolt && this.menuData.topSolt.commonDataGetUrl) {
  159. this.dataInitLoading = true;
  160. this.$Get("/static/json/home/" + this.menuData.topSolt.commonDataGetUrl).then(
  161. res => {
  162. let listMap = {};
  163. let tableData = res;
  164. tableData.forEach(item => {
  165. if (!listMap[item.name]) {
  166. // type,data
  167. let listMap2 = {};
  168. if (item.data) {
  169. item.data.forEach(item2 => {
  170. if (listMap2[item2.type]) {
  171. listMap2[item2.type]["categoryData"].push(item2.year);
  172. listMap2[item2.type]["valueData"].push(item2.area);
  173. } else {
  174. let listMapItem = {};
  175. listMapItem["categoryData"] = [item2.year];
  176. listMapItem["valueData"] = [item2.area];
  177. listMap2[item2.type] = listMapItem;
  178. }
  179. });
  180. }
  181. listMap[item.name] = listMap2;
  182. } else {
  183. console.error("json文件内容重复,重复街镇:", item.name);
  184. }
  185. });
  186. if (listMap) {
  187. let categoryData = [];
  188. for (let listMapKeys in listMap) {
  189. // type,data
  190. categoryData = listMap[listMapKeys];
  191. if (categoryData) {
  192. if (!listMap["全部"]) {
  193. listMap["全部"] = {};
  194. }
  195. for (let categoryDataKeys in categoryData) {
  196. if (categoryData[categoryDataKeys]) {
  197. let categoryDataItemData = categoryData[categoryDataKeys];
  198. if (listMap["全部"][categoryDataKeys]) {
  199. categoryDataItemData.valueData.forEach((valueIndexItem, index) => {
  200. if (listMap["全部"][categoryDataKeys].valueData[index]) {
  201. listMap["全部"][categoryDataKeys].valueData[index] += Number(valueIndexItem);
  202. } else {
  203. listMap["全部"][categoryDataKeys].valueData[index] = Number(valueIndexItem);
  204. }
  205. });
  206. } else {
  207. listMap["全部"][categoryDataKeys] = categoryDataItemData;
  208. }
  209. }
  210. }
  211. }
  212. }
  213. }
  214. this.resData = listMap;
  215. if (this.resData["全部"]) {
  216. let _index = 0;
  217. let sum = 0;
  218. for (let keys in this.resData["全部"]) {
  219. this.menuData.topSolt.commonData[_index].title = keys;
  220. this.menuData.topSolt.commonData[_index].categoryData = this.resData["全部"][keys].categoryData;
  221. this.menuData.topSolt.commonData[_index].valueData = this.resData["全部"][keys].valueData;
  222. this.menuData.topSolt.commonData[_index].value =
  223. this.resData["全部"][keys].valueData[this.resData["全部"][keys].valueData.length - 1];
  224. sum += this.menuData.topSolt.commonData[_index].value;
  225. _index++;
  226. }
  227. if (this.menuData.topSolt.commonData[4]) {
  228. this.menuData.topSolt.commonData[4].valueData = [sum];
  229. }
  230. }
  231. this.dataInitLoading = false;
  232. },
  233. error => {
  234. console.log("error:", error, this.menuData);
  235. this.dataInitLoading = false;
  236. }
  237. );
  238. } else if (
  239. this.menuData &&
  240. this.menuData.columnId &&
  241. this.menuData.commonName !== "SUM" &&
  242. this.menuData.commonName !== "ALLLIST"
  243. ) {
  244. this.dataInitLoading = true;
  245. let params = new FormData();
  246. params.append("columnId", this.menuData.columnId);
  247. if (this.menuData.field) {
  248. params.append("field", this.menuData.field);
  249. }
  250. params.append("states", "2,3");
  251. params.append("pageSize", this.menuData.pageSize ? this.menuData.pageSize : 999);
  252. params.append("page", 0);
  253. if (this.menuData.paramJson) {
  254. params.append("paramJson", JSON.stringify(this.menuData.paramJson));
  255. }
  256. if (this.menuData.sortField) {
  257. let sortparam = [
  258. {
  259. field: this.menuData.sortField.field,
  260. orderByType: this.menuData.sortField.orderByType
  261. }
  262. ];
  263. params.append("orderBy", JSON.stringify(sortparam));
  264. }
  265. this.$Post(this.menuData.getUrl ? this.menuData.getUrl : this.urlsCollection.selectContentList, params).then(
  266. res => {
  267. if (this.menuData.commonName && this.menuData.commonName === "TOP" && res.code === 200 && res.content.length > 0) {
  268. res.content.forEach((item, index) => {
  269. if (this.menuData.pageSize > index) {
  270. this.resData[index] = item;
  271. }
  272. });
  273. this.changeHomeSpecialTown();
  274. } else if (res.code === 200 && res.content.data && res.content.data.length > 0) {
  275. let listMap = {};
  276. let tableData = res.content.data;
  277. tableData.forEach(item => {
  278. if (listMap[item.street]) {
  279. listMap[item.street]["categoryData"].push(item.c_years);
  280. listMap[item.street]["valueData"].push((item.c_float_num / 10000).toFixed(2));
  281. } else {
  282. let listMapItem = {};
  283. listMapItem["categoryData"] = [item.c_years];
  284. listMapItem["valueData"] = [(item.c_float_num / 10000).toFixed(2)];
  285. listMap[item.street] = listMapItem;
  286. }
  287. });
  288. if (listMap) {
  289. let categoryData = [];
  290. for (let listMapKeys in listMap) {
  291. categoryData = listMap[listMapKeys].categoryData;
  292. if (listMap[listMapKeys].valueData) {
  293. if (!listMap["全部"]) {
  294. listMap["全部"] = { valueData: [], categoryData: [] };
  295. }
  296. listMap[listMapKeys].valueData.forEach((valueIndexItem, index) => {
  297. if (listMap["全部"].valueData[index]) {
  298. listMap["全部"].valueData[index] += Number(valueIndexItem);
  299. } else {
  300. listMap["全部"].valueData[index] = Number(valueIndexItem);
  301. }
  302. });
  303. }
  304. }
  305. if (listMap["全部"].categoryData.length == 0 && categoryData.length > 0) {
  306. listMap["全部"].categoryData = categoryData;
  307. }
  308. }
  309. if (listMap["全部"] && listMap["全部"].valueData) {
  310. listMap["全部"].valueData.forEach((item, index) => {
  311. listMap["全部"].valueData[index] = item.toFixed(2);
  312. });
  313. }
  314. this.resData = listMap;
  315. this.changeHomeSpecialTown();
  316. } else {
  317. this.resData = [];
  318. this.changeHomeSpecialTown();
  319. }
  320. this.dataInitLoading = false;
  321. },
  322. error => {
  323. this.resData = [];
  324. this.changeHomeSpecialTown();
  325. console.log("error:", error, this.menuData);
  326. this.dataInitLoading = false;
  327. }
  328. );
  329. } else if (this.menuData.commonName && this.menuData.commonName === "TOP") {
  330. this.topData(this.$store.state.homeSpecialTown);
  331. } else if (this.menuData.commonName && this.menuData.commonName === "ALLLIST") {
  332. this.allListData(this.$store.state.homeSpecialTown);
  333. } else if (this.menuData.commonName && this.menuData.commonName === "SUM") {
  334. this.sumData(this.$store.state.homeSpecialTown);
  335. }
  336. // 只有第一次创建该页面,或刷新页面时。
  337. if (this.menuData.menuIndex) {
  338. if (this.$ifMenu(this.menuData.menuIndex, this.menuData.subMenuIndex)) {
  339. // 立即修改display为block
  340. this.$refs.menuCard.style.display = "block";
  341. setTimeout(() => {
  342. this.$refs.menuCard.style.transform = "translate(0,0)";
  343. this.$refs.menuCard.style.opacity = "0.9";
  344. });
  345. } else {
  346. // 如果不符合,页面创建时就直接隐藏
  347. this.$refs.menuCard.style.display = "none";
  348. }
  349. }
  350. // 当容器创建完成时,监听窗口改变大小时间
  351. this.$bus.$off("windowOnresize");
  352. this.$bus.$on("windowOnresize", this.windowOnresize);
  353. });
  354. },
  355. destroy() {
  356. // 当容器销毁时,需要停止监听该事件
  357. this.$bus.$off("windowOnresize");
  358. },
  359. /**
  360. * 公共card组件,接收参数如下:
  361. * menuData =>
  362. * type: 类型【card:卡片;chart:echart组件;imageMenu:图片菜单;legend:图例】(必填)
  363. * title: 标题(必填)
  364. *
  365. * getUrl: DMS数据请求路径
  366. * columnId:DMS数据请求columnId
  367. * pageSize:DMS数据请求个数
  368. * field:DMS数据请求field
  369. * sortField=>:DMS数据请求排序配置
  370. * field:排序字段
  371. * orderByType:排序类型【1:正序,2:倒序】
  372. *
  373. * index: 子菜单index(只有当type为imageMenu时有效)(只有type为imageMenu时为必填)
  374. * imageUrl: 菜单图片地址(只有当type为imageMenu时有效)(只有type为imageMenu时为必填)
  375. *
  376. * menuIndex: 显示头部菜单对应index(显示隐藏优化,组合属性)
  377. * subMenuIndex: 显示头部菜单对应subIndex(显示隐藏优化,组合属性)
  378. * minDomWidth: 最小屏幕宽度自动隐藏【单位:Number】(显示隐藏优化,组合属性)
  379. * position: 动画位置【left\right\top\bottom】(显示隐藏优化,组合属性)
  380. *
  381. * boxWidth: 宽,默认为410px【单位:Number】(非必填)
  382. * boxHeight: 高,默认为auto【单位:Number】(非必填)
  383. * boxBackground: 背景色,默认为渐变蓝色【支持#\rgba】(非必填)
  384. * titleWidth: 标题宽度,默认为50【单位:%】(非必填)
  385. * gotoPageInfo: 动态跳转页面信息(非必填)=>{index:要跳转的菜单index,subIndex:要跳转的子菜单index,name:菜单名称}
  386. *
  387. * topSolt: 头部替换插槽组件信息(非必填)=>{commonName:组件名称,commonData:组件支撑数据,commonDataGetUrl:本地静态数据文件名,columnId:DMS远程数据columnId}
  388. * bottomSolt: 底部替换插槽组件信息(非必填)=>{commonName:组件名称,commonData:组件支撑数据}
  389. *
  390. */
  391. props: ["menuData"],
  392. methods: {
  393. sumData(homeSpecialTown) {
  394. if (this.menuData.paramJson && this.menuData.categoryData) {
  395. this.resData = [];
  396. this.dataInitLoading = true;
  397. this.menuData.topSolt.commonData[0].categoryData = [];
  398. this.menuData.topSolt.commonData[0].valueData = [];
  399. let _categoryData = this.menuData.categoryData;
  400. let _valueData = [];
  401. this.menuData.categoryData.forEach(item => {
  402. _valueData.push(0);
  403. });
  404. this.menuData.categoryData.forEach((item, _index) => {
  405. let params = new FormData();
  406. params.append("columnId", this.menuData.columnId);
  407. if (this.menuData.field) {
  408. params.append("field", this.menuData.field);
  409. }
  410. params.append("states", "2,3");
  411. params.append("pageSize", this.menuData.pageSize ? this.menuData.pageSize : 999);
  412. params.append("page", 0);
  413. let pramJson = {};
  414. pramJson.c_new_date = item;
  415. pramJson.sj_select = this.menuData.paramJson.sj_select;
  416. if (homeSpecialTown !== "全部") {
  417. let associatedItems = this.$store.state.selectSelectDataMap.associatedItems;
  418. if (associatedItems.length > 0) {
  419. associatedItems.forEach(item => {
  420. if (item.name === homeSpecialTown) {
  421. pramJson.bsjz = item.index + "";
  422. }
  423. });
  424. }
  425. }
  426. params.append("paramJson", JSON.stringify(pramJson));
  427. if (this.menuData.sortField) {
  428. let sortparam = [
  429. {
  430. field: this.menuData.sortField.field,
  431. orderByType: this.menuData.sortField.orderByType
  432. }
  433. ];
  434. params.append("orderBy", JSON.stringify(sortparam));
  435. }
  436. this.$Post(this.menuData.getUrl ? this.menuData.getUrl : this.urlsCollection.selectContentList, params).then(
  437. res => {
  438. let sumField = 0;
  439. if (res.code === 200 && res.content !== "数据为空" && res.content.length > 0) {
  440. res.content.forEach(contentItem => {
  441. sumField += Number(contentItem.number);
  442. });
  443. }
  444. _valueData[Number(_index)] = sumField;
  445. this.menuData.topSolt.commonData[0].categoryData = _categoryData;
  446. this.menuData.topSolt.commonData[0].valueData = _valueData;
  447. this.menuData.topSolt.commonData[0].value = _valueData[_valueData.length - 1];
  448. this.dataInitLoading = false;
  449. },
  450. error => {
  451. console.log("error:", error, this.menuData);
  452. }
  453. );
  454. });
  455. }
  456. },
  457. topData(homeSpecialTown) {
  458. this.dataInitLoading = true;
  459. let params = new FormData();
  460. params.append("columnId", this.menuData.columnId);
  461. if (this.menuData.field) {
  462. params.append("field", this.menuData.field);
  463. }
  464. params.append("states", "2,3");
  465. params.append("pageSize", this.menuData.pageSize ? this.menuData.pageSize : 999);
  466. params.append("page", 0);
  467. if (this.menuData.paramJson) {
  468. let pramJson = {};
  469. if (this.menuData.paramJson.sj_select) {
  470. pramJson.sj_select = this.menuData.paramJson.sj_select;
  471. }
  472. if (homeSpecialTown !== "全部") {
  473. let associatedItems = this.$store.state.selectSelectDataMap.associatedItems;
  474. if (associatedItems.length > 0) {
  475. associatedItems.forEach(item => {
  476. if (item.name === homeSpecialTown) {
  477. pramJson.bsjz = item.index + "";
  478. }
  479. });
  480. }
  481. }
  482. params.append("paramJson", JSON.stringify(pramJson));
  483. }
  484. if (this.menuData.sortField) {
  485. let sortparam = [
  486. {
  487. field: this.menuData.sortField.field,
  488. orderByType: this.menuData.sortField.orderByType
  489. }
  490. ];
  491. params.append("orderBy", JSON.stringify(sortparam));
  492. }
  493. this.$Post(this.menuData.getUrl ? this.menuData.getUrl : this.urlsCollection.selectContentList, params).then(
  494. res => {
  495. this.resData = [];
  496. if (res.code === 200 && res.content.length > 0) {
  497. res.content.forEach((item, index) => {
  498. if (this.menuData.pageSize > index) {
  499. this.resData.push(item);
  500. }
  501. });
  502. this.menuData.topData = this.resData;
  503. } else {
  504. this.resData = [];
  505. this.menuData.topData = this.resData;
  506. }
  507. this.dataInitLoading = false;
  508. },
  509. error => {
  510. this.resData = [];
  511. this.menuData.topData = this.resData;
  512. console.log("error:", error, this.menuData);
  513. this.dataInitLoading = false;
  514. }
  515. );
  516. },
  517. allListData(homeSpecialTown) {
  518. this.dataInitLoading = true;
  519. if (this.menuData.paramJson) {
  520. this.menuData.paramJson.sj_select.forEach((paramSjItem, paramSjIndex) => {
  521. let params = new FormData();
  522. params.append("columnId", this.menuData.columnId);
  523. if (this.menuData.field) {
  524. params.append("field", this.menuData.field);
  525. }
  526. params.append("states", "2,3");
  527. params.append("pageSize", this.menuData.pageSize ? this.menuData.pageSize : 999);
  528. params.append("page", 0);
  529. let pramJson = {};
  530. pramJson.sj_select = paramSjItem;
  531. if (homeSpecialTown !== "全部") {
  532. let associatedItems = this.$store.state.selectSelectDataMap.associatedItems;
  533. if (associatedItems.length > 0) {
  534. associatedItems.forEach(item => {
  535. if (item.name === homeSpecialTown) {
  536. pramJson.bsjz = item.index + "";
  537. }
  538. });
  539. }
  540. }
  541. params.append("paramJson", JSON.stringify(pramJson));
  542. if (this.menuData.sortField) {
  543. let sortparam = [
  544. {
  545. field: this.menuData.sortField.field,
  546. orderByType: this.menuData.sortField.orderByType
  547. }
  548. ];
  549. params.append("orderBy", JSON.stringify(sortparam));
  550. }
  551. this.$Post(this.menuData.getUrl ? this.menuData.getUrl : this.urlsCollection.selectContentList, params).then(
  552. res => {
  553. this.resData = [];
  554. let allSum = 0;
  555. if (res.code === 200 && res.content.length > 0) {
  556. res.content.forEach(item => {
  557. allSum += item.number;
  558. });
  559. }
  560. this.menuData.topSolt.commonData[paramSjIndex].value = allSum;
  561. this.dataInitLoading = false;
  562. },
  563. error => {
  564. this.menuData.topSolt.commonData[paramSjIndex].value = "--";
  565. console.log("error:", error, this.menuData);
  566. this.dataInitLoading = false;
  567. }
  568. );
  569. });
  570. }
  571. },
  572. // 切换街镇时
  573. changeHomeSpecialTown() {
  574. if (this.resData[this.$store.state.homeSpecialTown] && this.menuData.topSolt.commonData) {
  575. if (this.resData[this.$store.state.homeSpecialTown].categoryData) {
  576. this.menuData.topSolt.commonData[0].categoryData = this.resData[this.$store.state.homeSpecialTown].categoryData;
  577. this.menuData.topSolt.commonData[0].valueData = this.resData[this.$store.state.homeSpecialTown].valueData;
  578. } else {
  579. let _index = 0;
  580. let sum = 0;
  581. for (let keys in this.resData["全部"]) {
  582. this.menuData.topSolt.commonData[_index].title = keys;
  583. this.menuData.topSolt.commonData[_index].categoryData =
  584. this.resData[this.$store.state.homeSpecialTown][keys].categoryData;
  585. this.menuData.topSolt.commonData[_index].valueData =
  586. this.resData[this.$store.state.homeSpecialTown][keys].valueData;
  587. this.menuData.topSolt.commonData[_index].value =
  588. this.resData[this.$store.state.homeSpecialTown][keys].valueData[
  589. this.resData[this.$store.state.homeSpecialTown][keys].valueData.length - 1
  590. ];
  591. sum += this.menuData.topSolt.commonData[_index].value;
  592. _index++;
  593. }
  594. if (this.menuData.topSolt.commonData[4]) {
  595. this.menuData.topSolt.commonData[4].valueData = [sum];
  596. }
  597. }
  598. } else if (this.menuData && this.menuData.commonName && this.menuData.commonName === "TOP") {
  599. this.topData(this.$store.state.homeSpecialTown);
  600. } else if (this.menuData && this.menuData.commonName && this.menuData.commonName === "SUM") {
  601. this.sumData(this.$store.state.homeSpecialTown);
  602. } else if (this.menuData && this.menuData.commonName && this.menuData.commonName === "ALLLIST") {
  603. this.allListData(this.$store.state.homeSpecialTown);
  604. } else if (this.menuData && this.menuData.topSolt && this.menuData.topSolt.commonData) {
  605. this.menuData.topSolt.commonData.forEach((item, index) => {
  606. this.menuData.topSolt.commonData[index].categoryData = [];
  607. this.menuData.topSolt.commonData[index].valueData = [];
  608. if (this.menuData.topSolt.commonData[index].valueData) {
  609. this.menuData.topSolt.commonData[index].valueData = 0;
  610. }
  611. if (this.menuData.topSolt.commonData[index].value) {
  612. this.menuData.topSolt.commonData[index].value = 0;
  613. }
  614. });
  615. }
  616. },
  617. // 当用户使用光标切换交互组件时触发
  618. changeMousemoveIndex(index) {
  619. if (this.chartCardDataIndex != index) {
  620. this.chartCardDataIndex = index;
  621. }
  622. },
  623. // 用户点击菜单标题时,调用全局函数,根据全局暂存对象
  624. changeMenu() {
  625. if (this.menuData != undefined && this.menuData.index != undefined && this.menuData.title != undefined) {
  626. this.$store.commit("changeLeftMenuTitle", this.menuData.title);
  627. if (this.menuData.menuIndex != undefined && this.menuData.subMenuIndex != undefined) {
  628. this.$store.commit("changeBackMenu", {
  629. index: this.menuData.menuIndex,
  630. subIndex: this.menuData.subMenuIndex,
  631. name: this.menuData.menuName ? this.menuData.menuName : ""
  632. });
  633. }
  634. }
  635. if (this.menuData != undefined && this.menuData.gotoPageInfo != undefined) {
  636. this.$store.commit("changeNavSelect", this.menuData.gotoPageInfo);
  637. }
  638. },
  639. // 根据菜单imageURL和boxHeight对象自动生成元素的样式(背景以及高度)
  640. returnImageUrl(imageUrl, boxHeight) {
  641. let returnStyle = "";
  642. if (boxHeight) {
  643. returnStyle += "heihgt:" + (boxHeight - 36) + "px;";
  644. }
  645. returnStyle += "background-image: url('" + imageUrl + "');";
  646. return returnStyle;
  647. },
  648. // 组件显示隐藏时,动画样式返回。
  649. showChange() {
  650. if (this.menuData != undefined && this.menuData.menuIndex != undefined) {
  651. if (this.$ifMenu(this.menuData.menuIndex, this.menuData.subMenuIndex)) {
  652. // 立即修改display为block
  653. this.$refs.menuCard.style.display = "block";
  654. this.$refs.menuCard.style.opacity = "0";
  655. setTimeout(() => {
  656. this.$refs.menuCard.style.transform = "translate(0,0)";
  657. this.$refs.menuCard.style.opacity = "0.9";
  658. }, 300);
  659. } else {
  660. // 延迟0.3s后修改display为none
  661. this.$refs.menuCard.style.transform = this.positionTotransform();
  662. this.$refs.menuCard.style.opacity = "0";
  663. setTimeout(() => {
  664. this.$refs.menuCard.style.display = "none";
  665. }, 300);
  666. }
  667. }
  668. },
  669. // 根据组件定位,返回不同的显示隐藏动画位置
  670. positionTotransform() {
  671. switch (this.menuData.position) {
  672. case "left":
  673. return "translate(-50%,0)";
  674. case "right":
  675. return "translate(50%,0)";
  676. case "top":
  677. return "translate(0,-50%)";
  678. case "bottom":
  679. return "translate(0,50%)";
  680. default:
  681. return "translate(0,0)";
  682. }
  683. },
  684. windowOnresize(windowClient) {
  685. try {
  686. if (
  687. windowClient.windowsWidth != undefined &&
  688. this.$ifMenu(this.menuData.menuIndex, this.menuData.subMenuIndex) &&
  689. this.menuData.minDomWidth != null
  690. ) {
  691. if (
  692. this.menuData.minDomWidth < windowClient.windowsWidth &&
  693. this.$refs.menuCard != undefined &&
  694. this.$refs.menuCard.style.display == "none"
  695. ) {
  696. // 立即修改display为block
  697. this.$refs.menuCard.style.display = "block";
  698. setTimeout(() => {
  699. this.$refs.menuCard.style.transform = "translate(0,0)";
  700. this.$refs.menuCard.style.opacity = "0.9";
  701. }, 300);
  702. } else if (
  703. this.menuData.minDomWidth > windowClient.windowsWidth &&
  704. this.$refs.menuCard != undefined &&
  705. this.$refs.menuCard.style.display == "block"
  706. ) {
  707. // 延迟0.3s后修改display为none
  708. this.$refs.menuCard.style.transform = this.positionTotransform();
  709. this.$refs.menuCard.style.opacity = "0";
  710. setTimeout(() => {
  711. this.$refs.menuCard.style.display = "none";
  712. }, 300);
  713. }
  714. }
  715. } catch (error) {
  716. console.error("MenuCard组件出现异常:", error);
  717. }
  718. }
  719. },
  720. watch: {
  721. "$store.state.navSelect": {
  722. handler() {
  723. this.$nextTick(() => {
  724. this.showChange();
  725. });
  726. },
  727. deep: true
  728. },
  729. "$store.state.homeSpecialTown": {
  730. handler() {
  731. this.$nextTick(() => {
  732. this.changeHomeSpecialTown();
  733. });
  734. },
  735. deep: true
  736. }
  737. }
  738. };
  739. </script>
  740. <style lang="less" scoped>
  741. @borderColor: #00aaff;
  742. @borderColor32: #00aaff32;
  743. @borderColor64: #00aaff64;
  744. @topTitleBgLeft: #002645;
  745. @topTitleMinLeft: #002f56;
  746. @lightColor: #74ffff;
  747. .menuMainBox,
  748. .menuMainBoxA {
  749. transition: all 0.3s;
  750. }
  751. .menuMainBox {
  752. position: relative;
  753. z-index: 999;
  754. margin: 10px 5px;
  755. min-height: 60px;
  756. border: 2px solid transparent;
  757. border-image: --webkit-linear-gradient(to top, @borderColor, transparent) 1;
  758. border-image: --moz-linear-gradient(to top, @borderColor, transparent) 1;
  759. border-image: linear-gradient(to top, @borderColor, transparent) 1;
  760. &:hover {
  761. border-image: --webkit-linear-gradient(to top, @lightColor, transparent) 1;
  762. border-image: --moz-linear-gradient(to top, @lightColor, transparent) 1;
  763. border-image: linear-gradient(to top, @lightColor, transparent) 1;
  764. .menuMainBox_top {
  765. background-color: @lightColor;
  766. &_left {
  767. background-image: --webkit-linear-gradient(to left, @lightColor, #007dff);
  768. background-image: --moz-linear-gradient(to left, @lightColor, #007dff);
  769. background-image: linear-gradient(to left, @lightColor, #007dff);
  770. }
  771. }
  772. }
  773. cursor: pointer;
  774. -moz-user-select: none;
  775. -webkit-user-select: none;
  776. -ms-user-select: none;
  777. -khtml-user-select: none;
  778. user-select: none;
  779. // type !== chart
  780. &_top {
  781. position: relative;
  782. width: 100%;
  783. height: 36px;
  784. display: flex;
  785. align-items: center;
  786. flex-wrap: nowrap;
  787. align-content: center;
  788. overflow: hidden;
  789. background-color: @topTitleMinLeft;
  790. &_left {
  791. position: relative;
  792. display: flex;
  793. align-items: center;
  794. flex-wrap: nowrap;
  795. align-content: center;
  796. height: 100%;
  797. background-image: --webkit-linear-gradient(to left, @topTitleMinLeft, @borderColor, @topTitleMinLeft);
  798. background-image: --moz-linear-gradient(to left, @topTitleMinLeft, @borderColor, @topTitleMinLeft);
  799. background-image: linear-gradient(to left, @topTitleMinLeft, @borderColor, @topTitleMinLeft);
  800. border-bottom: 2px solid @borderColor;
  801. &_iconS {
  802. margin: 10px;
  803. width: 20px;
  804. height: 20px;
  805. background-image: linear-gradient(to top, #0071b2, #1deef5);
  806. clip-path: polygon(0 0, 100% 50%, 0 100%, 30% 50%, 0 0);
  807. }
  808. &_iconR {
  809. position: relative;
  810. margin: 15px;
  811. width: 10px;
  812. height: 10px;
  813. background-image: transparent;
  814. border: 1px solid #1deef5;
  815. border-radius: 20px;
  816. &_active {
  817. position: absolute;
  818. transform: translate(-50%, -50%);
  819. top: 50%;
  820. left: 50%;
  821. width: 5px;
  822. height: 5px;
  823. background-color: #1deef5;
  824. border-radius: 20px;
  825. }
  826. }
  827. &_title {
  828. font-size: 28px;
  829. font-family: YouSheBiaoTiHei;
  830. font-weight: 400;
  831. color: #ffffff;
  832. }
  833. &_iconE {
  834. position: absolute;
  835. margin-left: 10px;
  836. width: 15px;
  837. height: 30px;
  838. background-image: linear-gradient(to bottom, transparent, transparent, #00a6c0);
  839. transform: skew(-45deg);
  840. }
  841. &_iconE1 {
  842. right: 27px;
  843. }
  844. &_iconE2 {
  845. right: 7px;
  846. }
  847. }
  848. &_right {
  849. position: absolute;
  850. right: -10%;
  851. height: 100%;
  852. border-top: 2px solid @borderColor;
  853. border-left: 2px solid @borderColor;
  854. transform: skew(-45deg);
  855. background-color: @topTitleBgLeft;
  856. border-image: --webkit-linear-gradient(to right, @borderColor, @topTitleBgLeft) 1;
  857. border-image: --moz-linear-gradient(to right, @borderColor, @topTitleBgLeft) 1;
  858. border-image: linear-gradient(to right, @borderColor, @topTitleBgLeft) 1;
  859. &_d1 {
  860. position: absolute;
  861. left: 10px;
  862. width: 50px;
  863. height: 20px;
  864. background-color: @borderColor64;
  865. }
  866. &_d2 {
  867. position: absolute;
  868. left: 70px;
  869. width: 80px;
  870. height: 10px;
  871. background-color: @borderColor32;
  872. }
  873. }
  874. &_topRight {
  875. position: absolute;
  876. top: 0;
  877. right: 0;
  878. display: flex;
  879. div:nth-child(1) {
  880. width: 5px;
  881. height: 2px;
  882. background-color: @borderColor;
  883. }
  884. div:nth-child(2) {
  885. margin: 0 1px;
  886. width: 5px;
  887. height: 2px;
  888. background-color: #f19b56;
  889. }
  890. div:nth-child(3) {
  891. width: 5px;
  892. height: 2px;
  893. background-color: @borderColor;
  894. }
  895. }
  896. }
  897. &:hover {
  898. .menuMainBox_main_image_box {
  899. background-size: 110% 220px;
  900. }
  901. }
  902. }
  903. // 选中后的样式
  904. .menuMainBoxA {
  905. position: relative;
  906. z-index: 999;
  907. margin: 10px 5px;
  908. min-height: 60px;
  909. border: 2px solid transparent;
  910. border-image: --webkit-linear-gradient(to top, @lightColor, transparent) 1;
  911. border-image: --moz-linear-gradient(to top, @lightColor, transparent) 1;
  912. border-image: linear-gradient(to top, @lightColor, transparent) 1;
  913. cursor: pointer;
  914. -moz-user-select: none;
  915. -webkit-user-select: none;
  916. -ms-user-select: none;
  917. -khtml-user-select: none;
  918. user-select: none;
  919. // type !== chart
  920. .menuMainBox_top {
  921. position: relative;
  922. width: 100%;
  923. height: 36px;
  924. display: flex;
  925. align-items: center;
  926. flex-wrap: nowrap;
  927. align-content: center;
  928. overflow: hidden;
  929. background-color: @lightColor;
  930. &_left {
  931. position: relative;
  932. display: flex;
  933. align-items: center;
  934. flex-wrap: nowrap;
  935. align-content: center;
  936. height: 100%;
  937. border-bottom: 2px solid @borderColor;
  938. background-image: --webkit-linear-gradient(to left, @lightColor, #007dff);
  939. background-image: --moz-linear-gradient(to left, @lightColor, #007dff);
  940. background-image: linear-gradient(to left, @lightColor, #007dff);
  941. &_iconS {
  942. margin: 10px;
  943. width: 20px;
  944. height: 20px;
  945. background-image: linear-gradient(to top, #0071b2, #1deef5);
  946. clip-path: polygon(0 0, 100% 50%, 0 100%, 30% 50%, 0 0);
  947. }
  948. &_iconR {
  949. position: relative;
  950. margin: 15px;
  951. width: 10px;
  952. height: 10px;
  953. background-image: transparent;
  954. border: 1px solid #1deef5;
  955. border-radius: 20px;
  956. &_active {
  957. position: absolute;
  958. transform: translate(-50%, -50%);
  959. top: 50%;
  960. left: 50%;
  961. width: 5px;
  962. height: 5px;
  963. background-color: #1deef5;
  964. border-radius: 20px;
  965. }
  966. }
  967. &_title {
  968. font-size: 28px;
  969. font-family: YouSheBiaoTiHei;
  970. font-weight: 400;
  971. color: #ffffff;
  972. }
  973. &_iconE {
  974. position: absolute;
  975. margin-left: 10px;
  976. width: 15px;
  977. height: 30px;
  978. background-image: linear-gradient(to bottom, transparent, transparent, #00a6c0);
  979. transform: skew(-45deg);
  980. }
  981. &_iconE1 {
  982. right: 27px;
  983. }
  984. &_iconE2 {
  985. right: 7px;
  986. }
  987. }
  988. &_right {
  989. position: absolute;
  990. right: -10%;
  991. height: 100%;
  992. border-top: 2px solid @borderColor;
  993. border-left: 2px solid @borderColor;
  994. transform: skew(-45deg);
  995. background-color: @topTitleBgLeft;
  996. border-image: --webkit-linear-gradient(to right, @borderColor, @topTitleBgLeft) 1;
  997. border-image: --moz-linear-gradient(to right, @borderColor, @topTitleBgLeft) 1;
  998. border-image: linear-gradient(to right, @borderColor, @topTitleBgLeft) 1;
  999. &_d1 {
  1000. position: absolute;
  1001. left: 10px;
  1002. width: 50px;
  1003. height: 20px;
  1004. background-color: @borderColor64;
  1005. }
  1006. &_d2 {
  1007. position: absolute;
  1008. left: 70px;
  1009. width: 80px;
  1010. height: 10px;
  1011. background-color: @borderColor32;
  1012. }
  1013. }
  1014. &_topRight {
  1015. position: absolute;
  1016. top: 0;
  1017. right: 0;
  1018. display: flex;
  1019. div:nth-child(1) {
  1020. width: 5px;
  1021. height: 2px;
  1022. background-color: @borderColor;
  1023. }
  1024. div:nth-child(2) {
  1025. margin: 0 1px;
  1026. width: 5px;
  1027. height: 2px;
  1028. background-color: #f19b56;
  1029. }
  1030. div:nth-child(3) {
  1031. width: 5px;
  1032. height: 2px;
  1033. background-color: @borderColor;
  1034. }
  1035. }
  1036. }
  1037. &:hover {
  1038. .menuMainBox_main_image_box {
  1039. background-size: 110% 220px;
  1040. }
  1041. }
  1042. }
  1043. // 公共样式
  1044. .menuMainBox_topBottom {
  1045. position: absolute;
  1046. top: 20px;
  1047. width: 38%;
  1048. height: 20px;
  1049. border-bottom: 2px solid @borderColor;
  1050. border-right: 2px solid @borderColor;
  1051. transform: skew(-45deg);
  1052. border-image: --webkit-linear-gradient(to left, @borderColor, transparent) 1;
  1053. border-image: --moz-linear-gradient(to left, @borderColor, transparent) 1;
  1054. border-image: linear-gradient(to left, @borderColor, transparent) 1;
  1055. z-index: 9999;
  1056. div {
  1057. position: absolute;
  1058. top: -2px;
  1059. right: -2px;
  1060. width: 4px;
  1061. height: 4px;
  1062. border-radius: 4px;
  1063. background-color: @borderColor;
  1064. transform: skew(45deg);
  1065. }
  1066. }
  1067. // type === chart
  1068. .menuMainBox_topChart {
  1069. width: 100%;
  1070. height: 30px;
  1071. position: relative;
  1072. display: flex;
  1073. align-items: center;
  1074. flex-wrap: nowrap;
  1075. justify-content: center;
  1076. align-content: center;
  1077. background-image: --webkit-linear-gradient(to left, @topTitleMinLeft, @borderColor, @topTitleMinLeft);
  1078. background-image: --moz-linear-gradient(to left, @topTitleMinLeft, @borderColor, @topTitleMinLeft);
  1079. background-image: linear-gradient(to left, @topTitleMinLeft, @borderColor, @topTitleMinLeft);
  1080. &_title {
  1081. font-size: 18px;
  1082. font-family: PingFang SC;
  1083. font-weight: 300;
  1084. color: #e6e6e6;
  1085. line-height: 60px;
  1086. }
  1087. }
  1088. // 卡片主题
  1089. .menuMainBox_main {
  1090. position: relative;
  1091. padding-top: 10px;
  1092. width: 100%;
  1093. height: calc(100% - 30px);
  1094. background-image: --webkit-linear-gradient(to top, @topTitleMinLeft, @topTitleBgLeft);
  1095. background-image: --moz-linear-gradient(to top, @topTitleMinLeft, @topTitleBgLeft);
  1096. background-image: linear-gradient(to top, @topTitleMinLeft, @topTitleBgLeft);
  1097. box-sizing: border-box;
  1098. overflow-x: hidden;
  1099. overflow-y: auto;
  1100. scrollbar-width: none; /* Firefox */
  1101. -ms-overflow-style: none; /* IE 10+ */
  1102. &::-webkit-scrollbar {
  1103. display: none; /* Chrome Safari */
  1104. }
  1105. &_top {
  1106. margin: 0 10px;
  1107. width: calc(100% - 20px);
  1108. }
  1109. &_bottom {
  1110. margin: 0 10px;
  1111. width: calc(100% - 20px);
  1112. }
  1113. &_all {
  1114. margin: 0 10px;
  1115. width: calc(100% - 20px);
  1116. height: calc(100% - 10px);
  1117. }
  1118. &_image {
  1119. margin: 0px 10px;
  1120. width: calc(100% - 20px);
  1121. height: 210px;
  1122. background-size: 100% 200px;
  1123. background-repeat: no-repeat;
  1124. }
  1125. }
  1126. // 卡片主题
  1127. .menuMainBox_main_image {
  1128. position: relative;
  1129. margin: 0;
  1130. width: 100%;
  1131. height: calc(100% - 30px);
  1132. &_box {
  1133. width: 100%;
  1134. height: 200px;
  1135. background-size: 100% 200px;
  1136. background-repeat: no-repeat;
  1137. transition: all 0.3s;
  1138. }
  1139. }
  1140. // 图例上部图片
  1141. .legend {
  1142. position: absolute;
  1143. left: -2px;
  1144. top: -13px;
  1145. width: 104px;
  1146. height: 20px;
  1147. background: url("../../assets/home/legend_line.png") no-repeat center;
  1148. }
  1149. // tagcard
  1150. .menuCardFlex {
  1151. display: flex;
  1152. align-content: center;
  1153. align-items: center;
  1154. justify-content: space-between;
  1155. flex-wrap: nowrap;
  1156. position: relative;
  1157. .borders {
  1158. position: absolute;
  1159. left: 50%;
  1160. top: 50%;
  1161. transform: translate(-50%, -50%) rotate(45deg);
  1162. width: 110px;
  1163. height: 100px;
  1164. background: linear-gradient(to left, @borderColor, @borderColor) left top no-repeat,
  1165. linear-gradient(to bottom, @borderColor, @borderColor) left top no-repeat,
  1166. linear-gradient(to left, @borderColor, @borderColor) right top no-repeat,
  1167. linear-gradient(to bottom, @borderColor, @borderColor) right top no-repeat,
  1168. linear-gradient(to left, @borderColor, @borderColor) left bottom no-repeat,
  1169. linear-gradient(to bottom, @borderColor, @borderColor) left bottom no-repeat,
  1170. linear-gradient(to left, @borderColor, @borderColor) right bottom no-repeat,
  1171. linear-gradient(to left, @borderColor, @borderColor) right bottom no-repeat;
  1172. background-size: 6px 6px, 6px 6px, 6px 6px, 6px 6px;
  1173. }
  1174. }
  1175. </style>