MenuCard.vue 43 KB

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