reportingRate.vue 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657
  1. <template>
  2. <div>
  3. <div class="navBarTOP">
  4. <van-nav-bar class="navBar" left-arrow title="下属汇报率审批率统计" @click-left="onClickLeft"/>
  5. </div>
  6. <!-- 主体内容-->
  7. <div class="lineGrey"></div>
  8. <div class="lineGrey"></div>
  9. <div class="lineGrey"></div>
  10. <div class="lineGrey"></div>
  11. <div class="lineGrey"></div>
  12. <div class="container contentpd16 containers">
  13. <van-row gutter="20">
  14. <van-col span="12">
  15. <van-cell :disabled="powerGrade<5" :title="companyName" arrow-direction="down" is-link @click="regionClick"/>
  16. </van-col>
  17. <van-col span="12">
  18. <van-cell :title="regionName" arrow-direction="down" is-link @click="SalesRegionClick"/>
  19. </van-col>
  20. <van-col span="12">
  21. <van-cell :title="seacherForm.startTime" is-link @click="StartTimeClick">
  22. <template #right-icon>
  23. <van-icon :name="timeico" class="search-icon"/>
  24. </template>
  25. </van-cell>
  26. </van-col>
  27. <van-col span="12">
  28. <van-cell :title="seacherForm.endTime" is-link @click="EndTimeClick">
  29. <template #right-icon>
  30. <van-icon :name="timeico" class="search-icon"/>
  31. </template>
  32. </van-cell>
  33. </van-col>
  34. </van-row>
  35. </div>
  36. <el-table :data="tableList" :load="load" :tree-props="{ children: 'children', hasChildren: 'hasChildren' }" border class="elTreeTable" lazy row-key="id">
  37. <el-table-column class="firstName" label="组织名称/业务员(单位%)" prop="deptName" width="120">
  38. <template slot-scope="scope">
  39. <span v-if="scope.row.reportType==1">{{ scope.row.userName }}</span>
  40. <span v-if="scope.row.reportType!=1">{{ scope.row.deptName }}</span>
  41. </template>
  42. </el-table-column>
  43. <el-table-column label="半月报" width="46">
  44. <el-table-column label="提交率%" prop="name" width="46">
  45. <template slot-scope="scope">
  46. <span v-if="scope.row.reportType!=3" class="spanNum">{{ scope.row.doubleWeekCommitRate }} </span>
  47. <div v-if="scope.row.reportType==3&&scope.row.doubleWeekCommitRate!=null">
  48. <span v-if="scope.row.doubleWeekCommitRate!='-'" class="linkSpan" @click="linKReportHistory(scope.row,3)">{{ scope.row.doubleWeekCommitRate }}</span>
  49. <span v-if="scope.row.doubleWeekCommitRate=='-'" style="text-align: center;display: block">{{ scope.row.doubleWeekCommitRate }}</span>
  50. </div>
  51. </template>
  52. </el-table-column>
  53. </el-table-column>
  54. <el-table-column label="周报" width="46">
  55. <el-table-column label="提交率%" prop="address" width="46">
  56. <template slot-scope="scope">
  57. <span v-if="scope.row.reportType!=2" class="spanNum">{{ scope.row.weekCommitRate }} </span>
  58. <div v-if="scope.row.reportType==2&&scope.row.weekCommitRate!=null">
  59. <span v-if="scope.row.weekCommitRate!='-'" class="linkSpan" @click="linKReportHistory(scope.row,2)">{{ scope.row.weekCommitRate }}</span>
  60. <span v-if="scope.row.weekCommitRate=='-'" style="text-align: right;display: block">{{ scope.row.weekCommitRate }}</span>
  61. </div>
  62. </template>
  63. </el-table-column>
  64. <el-table-column label="审批率%" prop="weekApprovalRate" width="46">
  65. <template slot-scope="scope">
  66. <span v-if="scope.row.reportType!=2" class="spanNum">{{ scope.row.weekApprovalRate }} </span>
  67. <div v-if="scope.row.reportType==2&&scope.row.weekApprovalRate!==null">
  68. <span v-if="scope.row.weekApprovalRate!='-'" class="linkSpan" @click="linKReportHistory(scope.row,2)">{{ scope.row.weekApprovalRate }}</span>
  69. <span v-if="scope.row.weekApprovalRate=='-'" style="text-align: right;display: block">{{ scope.row.weekApprovalRate }}</span>
  70. </div>
  71. </template>
  72. </el-table-column>
  73. </el-table-column>
  74. <el-table-column label="日报" width="46">
  75. <el-table-column label="提交率%" prop="address" width="46">
  76. <template slot-scope="scope">
  77. <span v-if="scope.row.reportType!=1" class="spanNum">{{ scope.row.dayCommitRate }} </span>
  78. <div v-if="scope.row.reportType==1&&scope.row.dayCommitRate!=null">
  79. <span v-if="scope.row.dayCommitRate!='-'" class="linkSpan" @click="linKReportHistory(scope.row,1)">{{ scope.row.dayCommitRate }}</span>
  80. <span v-if="scope.row.dayCommitRate=='-'" style="text-align: right;display: block">{{ scope.row.dayCommitRate }}</span>
  81. </div>
  82. </template>
  83. </el-table-column>
  84. <el-table-column label="审批率%" prop="address" width="46">
  85. <template slot-scope="scope">
  86. <span v-if="scope.row.reportType!=1" class="spanNum">{{ scope.row.dayApprovalRate }} </span>
  87. <div v-if="scope.row.reportType==1&&scope.row.dayApprovalRate!=null">
  88. <span v-if="scope.row.dayApprovalRate!='-'" class="linkSpan" @click="linKReportHistory(scope.row,1)">{{ scope.row.dayApprovalRate }}</span>
  89. <span v-if="scope.row.dayApprovalRate=='-'" style="text-align: right;display: block">{{ scope.row.dayApprovalRate }}</span>
  90. </div>
  91. </template>
  92. </el-table-column>
  93. </el-table-column>
  94. </el-table>
  95. <van-popup v-model="RegionShow" capture position="bottom">
  96. <van-picker
  97. :columns="companyList"
  98. show-toolbar
  99. value-key="deptName"
  100. @cancel="RegionShow = false"
  101. @confirm="onregionConfirm"
  102. />
  103. </van-popup>
  104. <van-popup v-model="SalesRegionShow" capture position="bottom">
  105. <van-picker
  106. :columns="regionList"
  107. show-toolbar
  108. value-key="deptName"
  109. @cancel="SalesRegionShow = false"
  110. @confirm="onSalesRegionConfirm"
  111. />
  112. </van-popup>
  113. <van-popup v-model="SalesDepartmentShow" capture position="bottom">
  114. <van-picker
  115. :columns="deptList"
  116. show-toolbar
  117. value-key="deptName"
  118. @cancel="SalesDepartmentShow = false"
  119. @confirm="onSalesDepartmentConfirm"
  120. />
  121. </van-popup>
  122. <van-popup v-model="StaffShow" capture position="bottom">
  123. <van-picker
  124. :columns="userList"
  125. show-toolbar
  126. value-key="nickName"
  127. @cancel="StaffShow = false"
  128. @confirm="onStaffConfirm"
  129. />
  130. </van-popup>
  131. <van-popup v-model="StartTimeShow" capture position="bottom">
  132. <van-datetime-picker
  133. v-model="strtcurrentDate"
  134. :max-date="strtmaxDate"
  135. :min-date="strtminDate"
  136. title="选择查找开始时间"
  137. type="date"
  138. @cancel="StartTimeShow = false"
  139. @confirm="onStartTimeConfirm"
  140. />
  141. </van-popup>
  142. <van-popup v-model="EndTimeShow" capture position="bottom">
  143. <van-datetime-picker
  144. v-model="endcurrentDate"
  145. :max-date="endmaxDate"
  146. :min-date="endminDate"
  147. title="选择查找结束时间"
  148. type="date"
  149. @cancel="EndTimeShow = false"
  150. @confirm="onEndTimeConfirm"
  151. />
  152. </van-popup>
  153. </div>
  154. </template>
  155. <script>
  156. import request from '@/utils/request'
  157. import {queryRates, getDeptInfo} from "@/api/index";
  158. import timeico from "@/assets/Icon/datatims.png";
  159. export default {
  160. data() {
  161. return {
  162. timeico: timeico,
  163. RegionShow: false,
  164. SalesRegionShow: false,
  165. SalesDepartmentShow: false,
  166. StaffShow: false,
  167. StartTimeShow: false,
  168. EndTimeShow: false,
  169. PhotoTypeList: [{text: "009", value: "09"}],
  170. strtminDate: new Date(2022, 0, 1),
  171. endminDate: new Date(2022, 0, 1),
  172. strtmaxDate: new Date(),
  173. endmaxDate: new Date(),
  174. strtcurrentDate: new Date(),
  175. endcurrentDate: new Date(),
  176. companyName: "全部",
  177. deptName: "全部",
  178. regionName: "全部",
  179. userName: "全部",
  180. companyCode: "",
  181. deptCode: "",
  182. regionCode: "",
  183. userCode: "",
  184. companyList: [],
  185. deptList: [],
  186. regionList: [],
  187. userList: [],
  188. deptForm: {
  189. type: "",
  190. parentId: ""
  191. },
  192. list: [],
  193. tableList: [],
  194. seacherFormload: {
  195. companyId: "",
  196. regionId: "",
  197. parentId: "",
  198. startTime: "",
  199. endTime: ""
  200. },
  201. seacherForm: {
  202. companyId: "",
  203. regionId: "",
  204. parentId: "",
  205. startTime: "",
  206. endTime: ""
  207. }
  208. }
  209. },
  210. created() {
  211. this.seacherForm.startTime = this.parseTime(new Date(), '{y}-{m}-{d}')
  212. this.seacherFormload.startTime = this.parseTime(new Date(), '{y}-{m}-{d}')
  213. this.strtcurrentDate = new Date(this.parseTime(new Date(), '{y}-{m}-{d}'))
  214. this.seacherForm.endTime = this.parseTime(new Date(), '{y}-{m}-{d}') + ""
  215. this.seacherFormload.endTime = this.parseTime(new Date(), '{y}-{m}-{d}') + ""
  216. this.endminDate = new Date(this.GetPreMonthDay(this.parseTime(new Date(), '{y}-{m}-{d}'), 2))
  217. this.powerGrade = localStorage.getItem("powerGrade")
  218. this.getDeptInfo("dept")
  219. if (this.powerGrade > 3) {
  220. setTimeout(() => {
  221. this.getDeptInfo("dept", 1)
  222. }, 1000)
  223. }
  224. },
  225. watch: {
  226. $route(to, from) {
  227. if (to.path == "/reportingRate" && from.path == "/My/index") {
  228. this.seacherForm.startTime = this.parseTime(new Date(), '{y}-{m}-{d}')
  229. this.seacherFormload.startTime = this.parseTime(new Date(), '{y}-{m}-{d}')
  230. this.strtcurrentDate = new Date(this.parseTime(new Date(), '{y}-{m}-{d}'))
  231. this.seacherForm.endTime = this.parseTime(new Date(), '{y}-{m}-{d}') + ""
  232. this.seacherFormload.endTime = this.parseTime(new Date(), '{y}-{m}-{d}') + ""
  233. this.endminDate = new Date(this.GetPreMonthDay(this.parseTime(new Date(), '{y}-{m}-{d}'), 2))
  234. this.deptCode = "";
  235. this.userCode = "";
  236. this.regionCode = ""
  237. this.seacherForm.parentId = ""
  238. this.seacherFormload.parentId = ""
  239. this.regionName = "全部"
  240. this.powerGrade = localStorage.getItem("powerGrade")
  241. this.getDeptInfo("dept")
  242. if (this.powerGrade > 3) {
  243. setTimeout(() => {
  244. this.getDeptInfo("dept", 1)
  245. }, 1000)
  246. }
  247. }
  248. }
  249. },
  250. methods: {
  251. GetPreMonthDay(date, monthNum, type) {
  252. var dateArr = date.split('-');
  253. var year = dateArr[0]; //获取当前日期的年份
  254. var month = dateArr[1]; //获取当前日期的月份
  255. var day = dateArr[2]; //获取当前日期的日
  256. var days = new Date(year, month, 0);
  257. days = days.getDate(); //获取当前日期中月的天数
  258. var year2 = year;
  259. var month2 = parseInt(month) - monthNum;
  260. if (month2 <= 0) {
  261. var absM = Math.abs(month2);
  262. year2 = parseInt(year2) - Math.ceil(absM / 12 == 0 ? 1 : parseInt(absM) / 12);
  263. month2 = 12 - (absM % 12);
  264. }
  265. var day2 = day;
  266. var days2 = new Date(year2, month2, 0);
  267. days2 = days2.getDate();
  268. if (day2 > days2) {
  269. day2 = days2;
  270. }
  271. if (month2 < 10) {
  272. month2 = '0' + month2;
  273. }
  274. var t2 = ""
  275. if (monthNum > 0) {
  276. t2 = year2 + '-' + month2 + '-01';
  277. } else {
  278. if (type == "end") {
  279. var Months = new Date().getMonth() + 1
  280. var days111 = new Date().getDate()
  281. if (Months < 10) {
  282. Months = '0' + Months;
  283. }
  284. if (days111 < 10) {
  285. days111 = '0' + days111;
  286. }
  287. if (parseInt(month2) >= new Date().getMonth() + 1) {
  288. t2 = year2 + '-' + Months + '-' + days111;
  289. } else {
  290. var daysd = this.getMonthDays(year2, month2)
  291. t2 = year2 + '-' + month2 + '-' + daysd;
  292. }
  293. } else {
  294. t2 = year2 + '-' + month2 + '-' + day2;
  295. }
  296. }
  297. return t2;
  298. },
  299. getMonthDays(year, month) {
  300. var stratDate = new Date(year, month - 1, 1),
  301. endData = new Date(year, month, 1);
  302. var days = (endData - stratDate) / (1000 * 60 * 60 * 24);
  303. return days;
  304. },
  305. getDeptInfo(type, grade) {
  306. this.deptForm.type = type
  307. if (type == "dept") {
  308. if (grade == "1") {
  309. this.deptForm.parentId = this.companyCode
  310. } else if (grade == "2") {
  311. this.deptForm.parentId = this.regionCode
  312. } else {
  313. this.deptForm.type = ""
  314. this.deptForm.parentId = ""
  315. }
  316. } else if (type == "user") {
  317. this.deptForm.parentId = this.deptCode
  318. }
  319. getDeptInfo(this.deptForm).then(res => {
  320. if (type == "dept") {
  321. if (grade == "1") {
  322. if (res.data.region != null) {
  323. this.regionList = [{deptName: "全部", deptId: ""}].concat(res.data.region)
  324. }
  325. } else if (grade == "2") {
  326. if (res.data.dept != null) {
  327. this.deptList = [{deptName: "全部", deptId: ""}].concat(res.data.dept)
  328. }
  329. } else {
  330. this.companyList = res.data.company
  331. this.companyName = res.data.company[0].deptName
  332. this.companyCode = res.data.company[0].deptId
  333. if (res.data.region != null) {
  334. this.regionName = res.data.region[0].deptName
  335. this.regionCode = res.data.region[0].deptId
  336. this.regionList = res.data.region
  337. }
  338. if (res.data.user != null) {
  339. this.userList = res.data.user
  340. this.userCode = ""
  341. }
  342. this.queryRates()
  343. }
  344. } else if (type == "user") {
  345. if (res.data.user != null) {
  346. this.userList = [{nickName: "全部", userId: ""}].concat(res.data.user)
  347. }
  348. }
  349. })
  350. },
  351. dailyFn() {
  352. this.$router.push("/dailyDetails")
  353. },
  354. onClickLeft() {
  355. this.$router.go(-1)
  356. },
  357. regionClick() {
  358. this.RegionShow = true;
  359. },
  360. SalesRegionClick(val) {
  361. this.SalesRegionShow = true;
  362. },
  363. SalesDepartmentClick() {
  364. this.SalesDepartmentShow = true;
  365. },
  366. StaffClick() {
  367. this.StaffShow = true;
  368. },
  369. StartTimeClick() {
  370. this.StartTimeShow = true;
  371. },
  372. EndTimeClick() {
  373. this.EndTimeShow = true;
  374. },
  375. onregionConfirm(val) {
  376. this.tableList = []
  377. this.RegionShow = false;
  378. this.companyName = val.deptName;
  379. this.companyCode = val.deptId;
  380. this.regionName = "全部";
  381. this.regionCode = "";
  382. this.deptName = "全部";
  383. this.deptCode = "";
  384. this.userName = "全部";
  385. this.userCode = "";
  386. this.seacherForm.parentId = ""
  387. this.seacherFormload.parentId = ""
  388. this.getDeptInfo("dept", 1)
  389. this.queryRates()
  390. },
  391. onSalesRegionConfirm(val) {
  392. this.tableList = []
  393. this.SalesRegionShow = false;
  394. this.regionName = val.deptName;
  395. this.seacherForm.parentId = ""
  396. this.seacherFormload.parentId = ""
  397. if (val.deptId != "") {
  398. this.regionCode = val.deptId;
  399. this.getDeptInfo("dept", 2)
  400. this.deptName = "全部";
  401. this.deptCode = ""
  402. } else {
  403. this.regionCode = ""
  404. this.deptName = "全部";
  405. this.deptCode = "";
  406. this.userName = "全部";
  407. this.userCode = "";
  408. }
  409. this.queryRates()
  410. },
  411. onSalesDepartmentConfirm(val) {
  412. this.tableList = []
  413. this.SalesDepartmentShow = false;
  414. this.deptName = val.deptName;
  415. if (val.deptId != "") {
  416. this.deptCode = val.deptId;
  417. this.getDeptInfo("user")
  418. } else {
  419. this.userName = "全部";
  420. this.userCode = "";
  421. }
  422. },
  423. onStaffConfirm(val) {
  424. this.StaffShow = false;
  425. this.userName = val.nickName;
  426. this.userCode = val.userId;
  427. },
  428. onStartTimeConfirm(val) {
  429. this.seacherForm.startTime = this.parseTime(new Date(val), '{y}-{m}-{d}') + ""
  430. this.seacherForm.parentId = ""
  431. this.seacherFormload.startTime = this.parseTime(new Date(val), '{y}-{m}-{d}') + ""
  432. this.seacherFormload.parentId = ""
  433. this.tableList = []
  434. this.StartTimeShow = false;
  435. if(new Date(val).getTime()<new Date(this.GetPreMonthDay(this.formData.startTime,-2,"end")).getTime()){
  436. this.endminDate = new Date(this.GetPreMonthDay(this.formData.startTime,-2,"end"))
  437. this.endmaxDate=new Date(this.GetPreMonthDay(this.formData.startTime,-2,"end"))
  438. }else{
  439. this.endminDate = new Date(val)
  440. this.endmaxDate=new Date(this.GetPreMonthDay(this.formData.startTime,-2,"end"))
  441. }
  442. if ((new Date(this.seacherForm.startTime).getTime() > new Date(this.seacherForm.endTime).getTime()) || (new Date(this.endmaxDate).getTime() < new Date(this.seacherForm.endTime).getTime())) {
  443. this.seacherForm.endTime = this.parseTime(new Date(val), '{y}-{m}-{d}') + ""
  444. this.seacherFormload.endTime = this.parseTime(new Date(val), '{y}-{m}-{d}') + ""
  445. this.endcurrentDate = this.GetPreMonthDay(this.seacherForm.startTime, -2)
  446. }
  447. this.queryRates()
  448. },
  449. onEndTimeConfirm(val) {
  450. this.tableList = []
  451. this.seacherForm.endTime = this.parseTime(new Date(val), '{y}-{m}-{d}')
  452. this.seacherForm.parentId = ""
  453. this.seacherFormload.endTime = this.parseTime(new Date(val), '{y}-{m}-{d}')
  454. this.seacherFormload.parentId = ""
  455. this.strtmaxDate = new Date(val)
  456. if (new Date(this.seacherForm.startTime).getTime() > new Date(this.seacherForm.endTime).getTime()) {
  457. this.seacherForm.startTime = this.seacherForm.endTime
  458. this.seacherFormload.startTime = this.seacherForm.endTime
  459. }
  460. this.queryRates()
  461. this.EndTimeShow = false;
  462. },
  463. queryRates() {
  464. this.seacherForm.companyId = this.companyCode
  465. this.seacherFormload.companyId = this.companyCode
  466. this.seacherForm.regionId = this.regionCode
  467. this.seacherFormload.regionId = this.regionCode
  468. queryRates(this.seacherForm).then(res => {
  469. if (res.code == 200) {
  470. for (var i = 0; i < res.data.length; i++) {
  471. if (res.data[i].reportType > 1) {
  472. res.data[i].hasChildren = true
  473. }
  474. }
  475. this.tableList = res.data
  476. } else {
  477. this.$toast.fail('数据获取失败');
  478. }
  479. })
  480. },
  481. linKReportHistory(row, type) {
  482. if (type == 1) {
  483. var userId = ""
  484. var userName = "全部"
  485. if (row.userId == "null") {
  486. userId = ""
  487. userName = "全部"
  488. } else {
  489. userId = row.userId
  490. userName = row.userName
  491. }
  492. this.$router.push({
  493. path: "/subordinateHistoricalDaily",
  494. query: {
  495. companyCode: this.companyCode,
  496. companyName: this.companyName,
  497. regionCode: row.regionId,
  498. regionName: row.regionName,
  499. deptCode: row.deptId,
  500. deptName: row.deptName + "销售部",
  501. userCode: userId,
  502. userName: userName,
  503. startTime: this.seacherForm.startTime,
  504. endTime: this.seacherForm.endTime
  505. }
  506. })
  507. } else if (type == 2) {
  508. this.$router.push({
  509. path: "/subordinateHistoricalWeekly",
  510. query: {
  511. companyCode: this.companyCode,
  512. companyName: this.companyName,
  513. regionCode: row.regionId,
  514. regionName: row.regionName,
  515. deptCode: row.deptId,
  516. deptName: row.deptName + "销售部",
  517. startTime: this.seacherForm.startTime,
  518. endTime: this.seacherForm.endTime
  519. }
  520. })
  521. } else {
  522. this.$router.push({
  523. path: "/doubleWeeklyHistorical",
  524. query: {
  525. companyCode: this.companyCode,
  526. companyName: this.companyName,
  527. regionCode: row.deptId,
  528. regionName: row.deptName + "销售大区",
  529. startTime: this.seacherForm.startTime,
  530. endTime: this.seacherForm.endTime
  531. }
  532. })
  533. }
  534. },
  535. load(tree, treeNode, resolve) {
  536. if (tree.reportType == 2) {
  537. this.seacherFormload.parentId = tree.deptId
  538. } else if (tree.reportType == 3) {
  539. // this.regionCode=tree.deptId
  540. // this.regionName=tree.deptName+"销售大区"
  541. this.seacherFormload.parentId = ""
  542. this.seacherFormload.regionId = tree.deptId
  543. } else {
  544. this.seacherFormload.parentId = ""
  545. }
  546. request({
  547. url: 'mobile/reportMobile/queryRates',
  548. method: 'get',
  549. params: this.seacherFormload
  550. }).then(res => {
  551. if (res.code == 200) {
  552. for (var i = 0; i < res.data.length; i++) {
  553. if (res.data[i].reportType > 1) {
  554. res.data[i].hasChildren = true
  555. } else {
  556. res.data[i].hasChildren = false
  557. }
  558. }
  559. resolve(res.data)
  560. } else {
  561. this.$toast.fail('数据获取失败');
  562. }
  563. })
  564. }
  565. }
  566. }
  567. </script>
  568. <style>
  569. body {
  570. margin: 0;
  571. }
  572. .elTreeTable table {
  573. width: 100% !important;
  574. }
  575. .elTreeTable .el-table__cell:first-child .cell {
  576. padding-left: 2px !important;
  577. }
  578. .elTreeTable .el-table__cell {
  579. padding: 0px;
  580. }
  581. .elTreeTable .el-table__body td.el-table__cell {
  582. padding: 2px;
  583. }
  584. .elTreeTable table col {
  585. text-align: center;
  586. }
  587. .elTreeTable th.el-table__cell > .cell {
  588. padding: 1px !important;
  589. }
  590. .elTreeTable {
  591. font-size: 12px !important;
  592. }
  593. .elTreeTable th.el-table__cell {
  594. padding: 1px !important;
  595. }
  596. .elTreeTable th.el-table__cell > .cell {
  597. text-align: center;
  598. }
  599. .elTreeTable .el-table__header tr:first-child th.el-table__cell:first-child .cell {
  600. width: 98px;
  601. }
  602. .elTreeTable .linkSpan {
  603. text-decoration: underline;
  604. color: #0057ba;
  605. display: block;
  606. text-align: right;
  607. padding: 6px 10px;
  608. }
  609. .elTreeTable td.el-table__cell div {
  610. padding: 0px;
  611. }
  612. .elTreeTable .cell .spanNum {
  613. display: block;
  614. text-align: right;
  615. padding: 6px 10px;
  616. }
  617. .elTreeTable .el-table__expand-icon {
  618. float: right;
  619. }
  620. .search-icon {
  621. font-size: 16px;
  622. line-height: inherit;
  623. margin-top: 4px;
  624. }
  625. .contentpd16 {
  626. padding: 16px;
  627. background-color: white;
  628. }
  629. .contentpd16 .van-cell {
  630. background-color: #EBF4FF;
  631. margin: 8px 0;
  632. border-radius: 5px;
  633. padding: 4px 16px;
  634. }
  635. </style>