GanttChart.vue 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811
  1. <!-- 事项甘特图 -->
  2. <template>
  3. <div class="gantt-chart">
  4. <div class="condition-legend-bar">
  5. <Select
  6. class="system-select"
  7. width="217"
  8. :isReadOnly="true"
  9. tipPlace="top"
  10. caption="系统名称:"
  11. v-model="systemId"
  12. :selectdata="systemList"
  13. :placeholder="'请选择'"
  14. @change="changeSystem"
  15. hideClear
  16. />
  17. <div class="legend-container">
  18. <div v-for="(item) in legends" :key="'key_' + item.id" class="item-legend">
  19. <div :style="{'background': item.backgroundColor, 'border-color': item.borderColor}"></div>
  20. <div>{{item.text}}</div>
  21. </div>
  22. <div>
  23. <el-radio-group v-model="timeType" @change="changeView">
  24. <el-radio style="line-height: 32px;margin-right: 16px;" label="month">月视图</el-radio>
  25. <el-radio style="line-height: 32px;" label="day">日视图</el-radio>
  26. </el-radio-group>
  27. </div>
  28. </div>
  29. </div>
  30. <div class="main-gantt-container">
  31. <div class="task-title">
  32. <div class="title">任务标题</div>
  33. <div>
  34. <Tree :data="treeData" @openNode="toggleNode" />
  35. </div>
  36. </div>
  37. <div class="chart-container" id="chartContainer" ref="chartContainer">
  38. <div id="ganttContainer"></div>
  39. </div>
  40. <el-dialog :title="ganttDetail.name" :visible.sync="showDetail" width="840px">
  41. <div class="dialog-container">
  42. <div class="row task-status">
  43. <div>
  44. <Task class="icon" />
  45. <div class="title">任务状态</div>
  46. </div>
  47. <div v-show="ganttDetail.status" :style="{'background': ganttDetail.color && ganttDetail.color[1]?ganttDetail.color[1] : '', 'color': ganttDetail.color && ganttDetail.color[0]?ganttDetail.color[0] : ''}">{{ganttDetail.status}}</div>
  48. </div>
  49. <div class="row">
  50. <div>
  51. <PlanTime class="icon" />
  52. <div class="title">计划时间</div>
  53. </div>
  54. <div class="info">{{ganttDetail.planTime}}</div>
  55. </div>
  56. <div class="row">
  57. <div>
  58. <RealTime class="icon" />
  59. <div class="title">实际执行时间</div>
  60. </div>
  61. <div class="info">{{ganttDetail.realTime}}</div>
  62. </div>
  63. <div class="row picture">
  64. <div>
  65. <Picture class="icon" />
  66. <div class="title">照片</div>
  67. </div>
  68. <div>
  69. <div>
  70. <div class="num">{{pictureList.length}}张</div>
  71. <div v-if="pictureList.length > 0" class="more" @click="() => showImgDetail = true">查看更多</div>
  72. </div>
  73. <div class="pictrue-container">
  74. <div v-for="(item) in pictures" :key="'id_' + item.id" @click="showImgContainer(item.id)" class="item">
  75. <img src="../../assets/imgs/analysis/picture.png" alt />
  76. <div class="info" :title="item.name">{{item.name}}</div>
  77. </div>
  78. </div>
  79. </div>
  80. </div>
  81. <div class="row picture">
  82. <div>
  83. <Report class="icon" />
  84. <div class="title">报告</div>
  85. </div>
  86. <div>
  87. <div>
  88. <div class="num">{{accessoryList.length}}张</div>
  89. </div>
  90. <div class="accessory-container" :style="{'max-height': accessoryIsExpand?'' : '115px'}">
  91. <a :href="item.url?item.url : 'javascript:void(0)'" target="_blank" v-for="(item) in accessoryList" :key="'id_' + item.id" class="item">
  92. <img src="../../assets/imgs/analysis/report_pdf.png" alt />
  93. <div class="info" :title="item.name">{{item.name}}</div>
  94. </a>
  95. <div v-if="accessoryList.length > 0" class="expand-more" @click="() => accessoryIsExpand = !accessoryIsExpand">
  96. <ExpandArrow :class="{'expand': accessoryIsExpand}"/>
  97. 展开更多
  98. </div>
  99. </div>
  100. </div>
  101. </div>
  102. <div class="row test-content">
  103. <div>
  104. <Menu class="icon" />
  105. <div class="title">检测内容</div>
  106. </div>
  107. <el-table :data="tableData" max-height="300">
  108. <el-table-column property="sbjc" label="设备简称"></el-table-column>
  109. <el-table-column property="sbjbm" label="设备编号"></el-table-column>
  110. <el-table-column property="cnt" label="设备数"></el-table-column>
  111. <el-table-column property="wzjc" width="300" label="空间位置"></el-table-column>
  112. </el-table>
  113. </div>
  114. </div>
  115. </el-dialog>
  116. <div class="img-detail-container">
  117. <el-dialog :title="'图片预览'" :visible.sync="showImgDetail" width="1260px">
  118. <div class="detail-container">
  119. <div class="pictures-menu">
  120. <div v-for="(item) in pictureList" :key="'id_' + item.id" class="item" @click="changeCurImg(item.id)" :class="{'active': item.isActive}">
  121. <img :src="item.url?item.url : ''" alt="">
  122. <div class="name" :title="item.name">{{item.name}}</div>
  123. </div>
  124. </div>
  125. <div class="cur-img-container">
  126. <img v-if="curImg && curImg.url" :src="curImg.url" alt="">
  127. </div>
  128. </div>
  129. </el-dialog>
  130. </div>
  131. </div>
  132. </div>
  133. </template>
  134. <script>
  135. import { queryGanttChart, queryGanttDetail } from "../../api/ganttChart";
  136. import { querySystemList, queryDetailData } from "../../api/coreDeviceReport";
  137. import { Tree } from "meri-design";
  138. import _ from "lodash";
  139. import moment from "moment";
  140. // import '../../utils/ganttChart/g.js';
  141. import { GanttChartDay } from "../../utils/ganttChart/GanttChart_day.js";
  142. import { GanttChartMonth } from "../../utils/ganttChart/GanttChart_month.js";
  143. import { parse } from "path";
  144. import Task from "../../assets/svg/task.svg";
  145. import PlanTime from "../../assets/svg/plan_time.svg";
  146. import RealTime from "../../assets/svg/real_time.svg";
  147. import Picture from "../../assets/svg/picture.svg";
  148. import Report from "../../assets/svg/report.svg";
  149. import Menu from "../../assets/svg/menu.svg";
  150. import ExpandArrow from "../../assets/svg/expand_arrow.svg";
  151. export default {
  152. data() {
  153. return {
  154. plazaId: 1000423, // 广场id
  155. // assetnum: null, // 设备台账编码
  156. systemList: [], // 系统列表
  157. systemId: "", // 系统名称
  158. legends: [
  159. {
  160. id: 1,
  161. text: "按时完成",
  162. backgroundColor: "#E7E9EA",
  163. borderColor: "#C3C7CB"
  164. },
  165. {
  166. id: 2,
  167. text: "未开始/进行中",
  168. backgroundColor: "rgba(91, 143, 249, 0.2)",
  169. borderColor: "#5B8FF9"
  170. },
  171. {
  172. id: 3,
  173. text: "逾期完成",
  174. backgroundColor: "#FBCE99",
  175. borderColor: "#F58300"
  176. },
  177. {
  178. id: 4,
  179. text: "逾期未完成",
  180. backgroundColor: "#FBB8B5",
  181. borderColor: "#F54E45"
  182. }
  183. ], // 图例
  184. timeType: "month", // 甘特图时间类型
  185. treeData: [], // 树结构数据
  186. startTime: null, // 甘特图开始时间
  187. endTime: null, // 甘特图结束时间
  188. // 弹窗相关
  189. showDetail: false, // 弹框显示状态
  190. // detailTitle: "", // 弹窗标题
  191. pictures: [
  192. // {
  193. // id: 1,
  194. // imgSrc: require("../../assets/imgs/analysis/picture.png"),
  195. // title: "2019年5月高压用具检测报告.jpg"
  196. // },
  197. // {
  198. // id: 2,
  199. // imgSrc: require("../../assets/imgs/analysis/picture.png"),
  200. // title: "2019年5月高压用具检测报告.jpg"
  201. // }
  202. ], // 照片
  203. ganttDetail: {}, // 甘特图明细
  204. tableData: [], // 表数据
  205. curTask: {}, // 当前查看的任务
  206. pictureList: [
  207. // {id: 1, url: require('../../assets/images/login_back.png'), name: '图层名称1.jpg', isActive: true},
  208. // {id: 2, url: require('../../assets/images/matter_pop3.png'), name: '图层名称2.jpg', isActive: false},
  209. // {id: 3, url: require('../../assets/images/login_back.png'), name: '图层名称3.jpg', isActive: false},
  210. ], // 图片
  211. curImg: {}, // 当前查看的图片
  212. accessoryList: [], // 附件
  213. accessoryIsExpand: false, // 附件是否展开
  214. showImgDetail: false, // 查看更多图片弹框显示状态
  215. };
  216. },
  217. components: {
  218. Task,
  219. PlanTime,
  220. RealTime,
  221. Picture,
  222. Report,
  223. Menu,
  224. ExpandArrow
  225. },
  226. computed: {},
  227. beforeMount() {
  228. let PLAZAID = localStorage.getItem('PLAZAID');
  229. this.plazaId = Number(PLAZAID) || 1000423;
  230. },
  231. mounted() {
  232. document.addEventListener('click', () => {
  233. setTimeout(() => {
  234. if (this.isClickAccessory) {
  235. this.isClickAccessory = false;
  236. return
  237. }
  238. this.showAccessory = false;
  239. }, 20)
  240. })
  241. this.initChartTime();
  242. this.getSystemList();
  243. },
  244. methods: {
  245. /**
  246. * 初始化甘特图请求时间
  247. */
  248. initChartTime() {
  249. let endTime = new Date().getTime(),
  250. startTime = endTime - 1000*60*60*24*365;
  251. this.startTime = moment.unix(startTime / 1000).format('YYYYMMDDHHmmss');
  252. this.endTime = moment.unix(endTime / 1000).format('YYYYMMDDHHmmss');
  253. },
  254. /**
  255. * 获取系统列表数据
  256. */
  257. getSystemList() {
  258. querySystemList().then(res => {
  259. if (res.result === "success") {
  260. let data = res.data;
  261. let newData = [];
  262. _.forEach(data, item => {
  263. newData.push({
  264. id: item.code,
  265. name: item.name
  266. });
  267. });
  268. this.systemList = newData;
  269. const { query } = this.$route;
  270. if (!_.isEmpty(query) && query.smsxt) {
  271. this.systemId = query.smsxt;
  272. } else {
  273. this.systemId = newData[0].id;
  274. }
  275. this.getGanttChartData();
  276. }
  277. });
  278. },
  279. /**
  280. * 处理请求数据的时间
  281. */
  282. disQueryTime() {
  283. let startTime, endTime;
  284. let curTime = new Date(),
  285. curYear = curTime.getFullYear(),
  286. curMonth = curTime.getMonth() + 1;
  287. if (this.timeType === "month") {
  288. startTime = `${curYear}0101000000`;
  289. endTime = `${curYear + 1}0101000000`;
  290. } else {
  291. startTime = `${curYear}${curMonth}01000000`;
  292. if (curMonth + 1 > 12) {
  293. endTime = `${curYear + 1}0101000000`;
  294. } else {
  295. endTime = `${curYear}${curMonth + 1}01000000`;
  296. }
  297. }
  298. return [startTime, endTime];
  299. },
  300. /**
  301. * 切换系统
  302. */
  303. changeSystem() {
  304. if (window.gc) {
  305. gc.gCanvas.destroy();
  306. window.gc = null;
  307. }
  308. this.getGanttChartData();
  309. },
  310. /**
  311. * 切换视图
  312. */
  313. changeView() {
  314. console.log('timeType', this.timeType)
  315. if (window.gc) {
  316. gc.gCanvas.destroy();
  317. window.gc = null;
  318. }
  319. this.getGanttChartData();
  320. },
  321. /**
  322. * 获取甘特图数据
  323. */
  324. getGanttChartData() {
  325. let time = this.disQueryTime();
  326. let param = {
  327. smsxt: this.systemId,
  328. plazaId: this.plazaId,
  329. startDate: this.startTime, // time[0]
  330. endDate: this.endTime // time[1]
  331. };
  332. queryGanttChart("/data/base/queryGanttChart", param).then(res => {
  333. const { dsfList, wbList, zwList, result } = res;
  334. console.log("res", res);
  335. if (result === "success") {
  336. let newData = [],
  337. data = [wbList, zwList, dsfList],
  338. name = ["维保", "专维", "第三方检测"];
  339. _.forEach(data, (item, index) => {
  340. newData.push({
  341. index: index,
  342. id: index + 1,
  343. name: name[index],
  344. open: true,
  345. // children: name[index] === '专维'?[] : this.disGanttData(dsfList)
  346. children: this.disGanttData(data[index])
  347. });
  348. });
  349. this.treeData = newData;
  350. let taskData = _.map(_.cloneDeep(newData), item => {
  351. let parentNode = {
  352. id: item.id,
  353. type: item.name,
  354. open: item.open,
  355. };
  356. return Object.assign(parentNode, {
  357. dataList: _.map(item.children, _item => {
  358. return {
  359. parentNode,
  360. id: _item.id,
  361. title: _item.name,
  362. tasks: _item.originData
  363. };
  364. })
  365. })
  366. });
  367. console.log("taskData", taskData);
  368. if (!window.gc) {
  369. let width = this.$refs.chartContainer.offsetWidth;
  370. let handleFn = null;
  371. if (this.timeType === 'month') {
  372. handleFn = GanttChartMonth
  373. } else {
  374. handleFn = GanttChartDay
  375. }
  376. window.gc = new handleFn({
  377. chartParentContainer: "chartContainer",
  378. chartContainer: "ganttContainer",
  379. viewWidth: width,
  380. cWidth: 3 * width,
  381. tasks: taskData,
  382. daysCount: this.timeType === 'month'? (365*1.5) : parseInt((3 * width) / 40),
  383. callback: this.showDialog,
  384. pageToCallback: (data)=>{
  385. const { startAt, endAt } = data;
  386. this.startTime = moment.unix(new Date(startAt).getTime() / 1000).format('YYYYMMDDHHmmss');
  387. this.endTime = moment.unix(new Date(endAt).getTime() / 1000).format('YYYYMMDDHHmmss');
  388. this.getGanttChartData();
  389. }
  390. });
  391. gc.main();
  392. } else {
  393. gc.changeTasks(taskData)
  394. }
  395. }
  396. });
  397. },
  398. /**
  399. * 处理甘特图数据
  400. */
  401. disGanttData(arr) {
  402. let data = [];
  403. _.forEach(arr, item => {
  404. data.push({
  405. id: item.id,
  406. name: item.name,
  407. checked: "uncheck",
  408. originData: _.map(item.data, _item => {
  409. // _item.startDate = moment.unix((new Date().getTime() - 1000*60*60*24*7)/1000).format('YYYY-MM-DD HH:mm:ss');
  410. _item.startDate = moment.unix(_item.startDate / 1000).format("YYYY-MM-DD HH:mm:ss");
  411. // _item.endDate = moment.unix(new Date().getTime()/1000).format('YYYY-MM-DD HH:mm:ss');
  412. _item.endDate = moment.unix(_item.endDate / 1000).format("YYYY-MM-DD HH:mm:ss");
  413. _item.description = _item.parentname;
  414. return _item;
  415. })
  416. });
  417. });
  418. return data;
  419. },
  420. /**
  421. * 展开收起节点
  422. */
  423. toggleNode(status, item) {
  424. console.log("status", status, item);
  425. window.gc.toggle(item.index);
  426. },
  427. /**
  428. * 显示弹窗
  429. */
  430. showDialog(task) {
  431. this.showDetail = true;
  432. // this.detailTitle = task._pdata.description;
  433. this.curTask = task;
  434. this.getGanttDetailData();
  435. this.getPictureOrReportData(0);
  436. this.getPictureOrReportData(1);
  437. },
  438. /**
  439. * 获取甘特图详情
  440. */
  441. getGanttDetailData() {
  442. const { id, statusType } = this.curTask._pdata;
  443. let param = {
  444. plazaId: this.plazaId,
  445. type: statusType,
  446. id: id
  447. };
  448. queryGanttDetail("/data/base/queryGanttChartDetails", param).then(res => {
  449. const { result, data } = res;
  450. if (result === "success") {
  451. if (!data) {
  452. this.ganttDetail = {}
  453. return
  454. }
  455. const {
  456. status,
  457. planStartDate,
  458. planEndDate,
  459. realStartDate,
  460. realEndDate,
  461. statusType,
  462. name
  463. } = data;
  464. let color;
  465. switch (statusType) {
  466. case 1:
  467. color = ['#c3c7cb', '#e7e9ea'];
  468. break
  469. case 2:
  470. color = ['#5b8ff9', '#5b8ff933'];
  471. break
  472. case 3:
  473. color = ['#f58300', '#fbce99'];
  474. break
  475. case 4:
  476. color = ['#f54e45', '#fbb8b5'];
  477. break
  478. default:
  479. color = ['#f54e45', '#fbb8b5'];
  480. break
  481. }
  482. let newData = {
  483. status,
  484. color: color,
  485. name: name,
  486. planTime: this.dealDetailTime(planStartDate, planEndDate),
  487. realTime: this.dealDetailTime(realStartDate, realEndDate)
  488. };
  489. this.ganttDetail = newData;
  490. this.tableData = data.assetList;
  491. }
  492. });
  493. },
  494. /**
  495. * 处理时间
  496. */
  497. dealDetailTime(startTime, endTime) {
  498. let start = moment.unix(startTime / 1000).format("YYYY.MM.DD HH:mm:ss"),
  499. end = moment.unix(endTime / 1000).format("YYYY.MM.DD HH:mm:ss");
  500. return `${start}-${end}`;
  501. },
  502. /**
  503. * 获取甘特图的图片/报告详情
  504. */
  505. getPictureOrReportData(type) {
  506. const { id, statusType } = this.curTask._pdata;
  507. let param = {
  508. plazaId: this.plazaId,
  509. file_type: statusType,
  510. // file_type: 0,
  511. file_type_id: id,
  512. // file_type_id: 9886,
  513. type: type,
  514. // assetnum: this.assetnum,
  515. };
  516. queryDetailData("/data/base/queryFileDetails", param).then(res => {
  517. console.log("photo", res);
  518. const { result, data } = res;
  519. if (result === 'success') {
  520. let newData = [];
  521. _.forEach(data, (item, index) => {
  522. newData.push({
  523. id: item.id,
  524. url: item.urlname,
  525. isActive: index === 0,
  526. name: item.description
  527. });
  528. });
  529. if (type === 0) {
  530. this.pictureList = newData;
  531. this.curImg = newData[0];
  532. this.pictures = this.pictureList.slice(0, 2);
  533. } else {
  534. this.accessoryList = newData;
  535. }
  536. }
  537. });
  538. },
  539. /**
  540. * 切换当前预览大图
  541. */
  542. changeCurImg(id) {
  543. _.map(this.pictureList, (o) => {return o.isActive = o.id === id});
  544. this.curImg = _.find(this.pictureList, (o) => {return o.isActive});
  545. },
  546. /**
  547. * 展示图片
  548. */
  549. showImgContainer(id) {
  550. console.log('id', id)
  551. _.map(this.pictures, (o) => {return o.isActive = o.id === id});
  552. this.curImg = _.find(this.pictures, (o) => {return o.isActive});
  553. this.showImgDetail = true;
  554. }
  555. },
  556. beforeDestroy() {
  557. window.gc = null;
  558. }
  559. };
  560. </script>
  561. <style lang='less' scoped>
  562. .gantt-chart {
  563. padding-left: 16px;
  564. padding-right: 16px;
  565. padding-top: 12px;
  566. padding-bottom: 16px;
  567. width: 100%;
  568. height: 100%;
  569. background: #fff;
  570. .condition-legend-bar {
  571. margin-bottom: 12px;
  572. display: flex;
  573. justify-content: space-between;
  574. }
  575. .legend-container {
  576. display: flex;
  577. .item-legend {
  578. padding-left: 18px;
  579. position: relative;
  580. font-size: 14px;
  581. color: #646c73;
  582. line-height: 32px;
  583. &:not(:nth-of-type(4)) {
  584. margin-right: 20px;
  585. }
  586. > div:first-child {
  587. position: absolute;
  588. left: 0;
  589. top: calc(50% - 6px);
  590. width: 12px;
  591. height: 12px;
  592. border: 1px solid;
  593. }
  594. &:nth-of-type(4) {
  595. margin-right: 32px;
  596. }
  597. }
  598. }
  599. .main-gantt-container {
  600. width: 100%;
  601. height: calc(100% - 44px);
  602. background: #f2f5f7;
  603. border: 1px solid rgba(239, 240, 241, 1);
  604. border-radius: 4px;
  605. display: flex;
  606. .task-title {
  607. width: 404px;
  608. height: 100%;
  609. border-right: 1px solid #eff0f1;
  610. .title {
  611. padding-left: 32px;
  612. padding-top: 15px;
  613. padding-bottom: 15px;
  614. font-size: 14px;
  615. color: #646c73;
  616. line-height: 19px;
  617. border-bottom: 1px solid #eff0f1;
  618. }
  619. > div:nth-of-type(2) {
  620. max-height: calc(100% - 50px);
  621. overflow: auto;
  622. }
  623. }
  624. .chart-container {
  625. flex: 1;
  626. overflow: hidden;
  627. background: #fff;
  628. }
  629. }
  630. .dialog-container {
  631. max-height: 580px;
  632. overflow: auto;
  633. padding-right: 5px;
  634. .row {
  635. display: flex;
  636. > div:first-child {
  637. margin-right: 24px;
  638. display: flex;
  639. align-items: center;
  640. }
  641. &:not(:last-of-type) {
  642. margin-bottom: 14px;
  643. }
  644. .info {
  645. font-size: 14px;
  646. color: #1f2429;
  647. line-height: 22px;
  648. }
  649. }
  650. .icon {
  651. margin-right: 6px;
  652. width: 16px;
  653. }
  654. .title {
  655. width: 84px;
  656. font-size: 14px;
  657. color: #646c73;
  658. line-height: 22px;
  659. font-weight: 400;
  660. }
  661. .task-status > div:nth-of-type(2) {
  662. padding-left: 8px;
  663. padding-right: 8px;
  664. // width: 58px;
  665. height: 24px;
  666. // background: rgba(91, 143, 249, 0.2);
  667. border-radius: 2px;
  668. // color: #5b8ff9;
  669. line-height: 24px;
  670. text-align: center;
  671. }
  672. .picture {
  673. margin-bottom: 19px !important;
  674. > div:first-child {
  675. align-items: baseline;
  676. }
  677. > div:nth-of-type(2) {
  678. flex: 1;
  679. }
  680. > div:nth-of-type(2) > div:first-child {
  681. margin-bottom: 12px;
  682. display: flex;
  683. }
  684. .num,
  685. .more {
  686. font-size: 14px;
  687. line-height: 22px;
  688. font-weight: 400;
  689. }
  690. .num {
  691. margin-right: 22px;
  692. color: #1f2429;
  693. }
  694. .more {
  695. color: #025baa;
  696. cursor: pointer;
  697. }
  698. }
  699. .pictrue-container,
  700. .accessory-container {
  701. .item {
  702. padding: 10px 16px;
  703. width: 400px;
  704. border-radius: 4px;
  705. border: 1px solid rgba(233, 233, 233, 1);
  706. display: flex;
  707. align-items: center;
  708. cursor: pointer;
  709. > img {
  710. width: 24px;
  711. margin-right: 15px;
  712. }
  713. .info{
  714. overflow: hidden;
  715. text-overflow: ellipsis;
  716. white-space: nowrap;
  717. }
  718. }
  719. .item:not(:last-of-type) {
  720. margin-bottom: 8px;
  721. }
  722. }
  723. .accessory-container{
  724. position: relative;
  725. overflow: hidden;
  726. .expand-more{
  727. position: absolute;
  728. left: 444px;
  729. bottom: 0;
  730. color: #025baa;
  731. cursor: pointer;
  732. display: flex;
  733. align-items: center;
  734. >svg{
  735. margin-right: 4px;
  736. width: 16px;
  737. transition: transform .36s;
  738. }
  739. .expand{
  740. transform: rotate(180deg);
  741. }
  742. }
  743. }
  744. .test-content {
  745. display: block;
  746. > div:first-child {
  747. margin-bottom: 13px;
  748. }
  749. }
  750. }
  751. .detail-container {
  752. display: flex;
  753. height: 600px;
  754. }
  755. .pictures-menu {
  756. margin-right: 21px;
  757. padding-top: 16px;
  758. padding-bottom: 16px;
  759. padding-right: 5px;
  760. height: 100%;
  761. overflow: auto;
  762. .item {
  763. > img {
  764. width: 180px;
  765. border: 4px solid rgba(245, 246, 247, 1);
  766. border-radius: 4px;
  767. }
  768. .name {
  769. width: 180px;
  770. font-size: 12px;
  771. color: #1f2429;
  772. line-height: 16px;
  773. margin-top: 12px;
  774. text-align: center;
  775. overflow: hidden;
  776. text-overflow: ellipsis;
  777. white-space: nowrap;
  778. }
  779. &:not(:last-of-type) {
  780. margin-bottom: 20px;
  781. }
  782. }
  783. .active>img{
  784. border-color: rgba(31, 35, 41, 0.15);
  785. }
  786. }
  787. .cur-img-container {
  788. padding: 20px;
  789. flex: 1;
  790. height: 100%;
  791. background: #f5f6f7;
  792. display: flex;
  793. justify-content: center;
  794. align-items: center;
  795. > img {
  796. max-width: 730px;
  797. max-height: 530px;
  798. }
  799. }
  800. }
  801. </style>