list.vue 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555
  1. <template>
  2. <a-card size="small" :bordered="false" class="actualSalesReportList-wrap">
  3. <a-spin :spinning="spinning" tip="Loading...">
  4. <!-- 搜索条件 -->
  5. <div class="table-page-search-wrapper">
  6. <a-form-model
  7. id="actualSalesReportList-form"
  8. ref="ruleForm"
  9. class="form-model-con"
  10. layout="inline"
  11. :model="queryParam"
  12. :rules="rules"
  13. @keyup.enter.native="handleSearch">
  14. <a-row :gutter="15">
  15. <a-col :md="6" :sm="24">
  16. <a-form-model-item label="销售日期" prop="time">
  17. <rangeDate ref="rangeDate" :value="queryParam.time" @change="dateChange" />
  18. </a-form-model-item>
  19. </a-col>
  20. <a-col :md="6" :sm="24">
  21. <a-form-model-item label="客户名称">
  22. <custList id="actualSalesReportList-allocateTypeSn" ref="custList" @change="custChange"></custList>
  23. </a-form-model-item>
  24. </a-col>
  25. <a-col :md="6" :sm="24">
  26. <a-form-model-item label="客户级别">
  27. <v-select
  28. v-model="queryParam.dealer.dealerLevel"
  29. ref="dealerLevel"
  30. id="actualSalesReportList-allocateTypeSn"
  31. code="DEALER_LEVEL"
  32. placeholder="请选择客户级别"
  33. allowClear></v-select>
  34. </a-form-model-item>
  35. </a-col>
  36. <template v-if="advanced">
  37. <a-col :md="6" :sm="24">
  38. <a-form-model-item label="所在区域">
  39. <subarea id="actualSalesReportList-allocateTypeSn" v-model="queryParam.dealer.subareaSn"></subarea>
  40. </a-form-model-item>
  41. </a-col>
  42. <a-col :md="12" :sm="24">
  43. <a-row>
  44. <a-form-model-item label="地区" style="margin-bottom: 0!important;">
  45. <a-col span="7">
  46. <a-form-model-item prop="dealerProvinceSn" style="margin: 0;">
  47. <a-select v-model="queryParam.dealer.provinceSn" allowClear @change="getCityList" placeholder="请选择省">
  48. <a-select-option v-for="item in addrProvinceList" :value="item.id" :key="item.id + 'a'">{{ item.name }}</a-select-option>
  49. </a-select>
  50. </a-form-model-item>
  51. </a-col>
  52. <a-col span="7" offset="1">
  53. <a-form-model-item prop="dealerCitySn" style="margin: 0;">
  54. <a-select v-model="queryParam.dealer.citySn" allowClear @change="getAreaList" placeholder="请选择市">
  55. <a-select-option v-for="item in addrCityList" :value="item.id" :key="item.id + 'b'">{{ item.name }}</a-select-option>
  56. </a-select>
  57. </a-form-model-item>
  58. </a-col>
  59. <a-col span="7" offset="1">
  60. <a-form-model-item prop="dealerCountySn" style="margin: 0;">
  61. <a-select v-model="queryParam.dealer.districtSn" allowClear placeholder="请选择区/县">
  62. <a-select-option v-for="item in addrDistrictList" :value="item.id" :key="item.id + 'c'">{{ item.name }}</a-select-option>
  63. </a-select>
  64. </a-form-model-item>
  65. </a-col>
  66. </a-form-model-item>
  67. </a-row>
  68. </a-col>
  69. </template>
  70. <a-col :md="6" :sm="24">
  71. <a-button type="primary" @click="handleSearch" :disabled="disabled" id="actualSalesReportList-refresh">查询</a-button>
  72. <a-button style="margin-left: 8px" @click="resetSearchForm" :disabled="disabled" id="actualSalesReportList-reset">重置</a-button>
  73. <a-button
  74. style="margin-left: 10px"
  75. type="primary"
  76. class="button-warning"
  77. @click="handleExport"
  78. :disabled="disabled"
  79. :loading="exportLoading"
  80. v-if="$hasPermissions('B_actualSalesReport_export')"
  81. id="actualSalesReportList-export">导出</a-button>
  82. <a @click="advanced=!advanced" style="margin-left: 8px">
  83. {{ advanced ? '收起' : '展开' }}
  84. <a-icon :type="advanced ? 'up' : 'down'"/>
  85. </a>
  86. </a-col>
  87. </a-row>
  88. </a-form-model>
  89. </div>
  90. <!-- 列表 -->
  91. <s-table
  92. class="sTable"
  93. ref="table"
  94. size="small"
  95. :rowKey="(record) => record.id"
  96. :columns="columns"
  97. :data="loadData"
  98. :scroll="{ x: 2250 }"
  99. :defaultLoadData="false"
  100. bordered>
  101. <template slot="footer">
  102. <a-row>
  103. <a-col span="2">合计:</a-col>
  104. <a-col span="22">
  105. <a-row>
  106. <a-col span="4">箭牌滤清器:{{ (totalData && (totalData.jpLqqAmount || totalData.jpLqqAmount==0)) ? totalData.jpLqqAmount : '--' }}</a-col>
  107. <a-col span="4">箭牌变速箱滤清器:{{ (totalData && (totalData.jpBsxLqqAmount || totalData.jpBsxLqqAmount==0)) ? totalData.jpBsxLqqAmount : '--' }}</a-col>
  108. <a-col span="4">箭牌雨刮片:{{ (totalData && (totalData.jpYgpAmount || totalData.jpYgpAmount==0)) ? totalData.jpYgpAmount : '--' }}</a-col>
  109. <a-col span="4">箭牌喇叭:{{ (totalData && (totalData.jpLbAmount || totalData.jpLbAmount==0)) ? totalData.jpLbAmount : '--' }}</a-col>
  110. <a-col span="4">箭牌刹车片:{{ (totalData && (totalData.jpScpAmount || totalData.jpScpAmount==0)) ? totalData.jpScpAmount : '--' }}</a-col>
  111. <a-col span="4">箭牌感应线:{{ (totalData && (totalData.jpGyxAmount || totalData.jpGyxAmount==0)) ? totalData.jpGyxAmount : '--' }}</a-col>
  112. <a-col span="4">冠牌滤清器:{{ (totalData && (totalData.gpLqqAmount || totalData.gpLqqAmount==0)) ? totalData.gpLqqAmount : '--' }}</a-col>
  113. <a-col span="4">冠牌雨刮片:{{ (totalData && (totalData.gpYgpAmount || totalData.gpYgpAmount==0)) ? totalData.gpYgpAmount : '--' }}</a-col>
  114. <a-col span="4">冠牌刹车片:{{ (totalData && (totalData.gpScpAmount || totalData.gpScpAmount==0)) ? totalData.gpScpAmount : '--' }}</a-col>
  115. <a-col span="4">稳升点火线圈:{{ (totalData && (totalData.wsDhxqAmount || totalData.wsDhxqAmount==0)) ? totalData.wsDhxqAmount : '--' }}</a-col>
  116. <a-col span="4">稳升灯泡:{{ (totalData && (totalData.wsDpAmount || totalData.wsDpAmount==0)) ? totalData.wsDpAmount : '--' }}</a-col>
  117. <a-col span="4">汇箭:{{ (totalData && (totalData.hjAmount || totalData.hjAmount==0)) ? totalData.hjAmount : '--' }}</a-col>
  118. <a-col span="4">德路斯:{{ (totalData && (totalData.dlsAmount || totalData.dlsAmount==0)) ? totalData.dlsAmount : '--' }}</a-col>
  119. <a-col span="4">TBU:{{ (totalData && (totalData.tbuAmount || totalData.tbuAmount==0)) ? totalData.tbuAmount : '--' }}</a-col>
  120. <a-col span="4">TBU-P:{{ (totalData && (totalData.tbupAmount || totalData.tbupAmount==0)) ? totalData.tbupAmount : '--' }}</a-col>
  121. <a-col span="4">布瑞斯:{{ (totalData && (totalData.brsAmount || totalData.brsAmount==0)) ? totalData.brsAmount : '--' }}</a-col>
  122. <a-col span="4">NGK:{{ (totalData && (totalData.ngkAmount || totalData.ngkAmount==0)) ? totalData.ngkAmount : '--' }}</a-col>
  123. <a-col span="4">飞利浦:{{ (totalData && (totalData.flpAmount || totalData.flpAmount==0)) ? totalData.flpAmount : '--' }}</a-col>
  124. <a-col span="4">车仆:{{ (totalData && (totalData.cpAmount || totalData.cpAmount==0)) ? totalData.cpAmount : '--' }}</a-col>
  125. <a-col span="4">瓦尔塔:{{ (totalData && (totalData.wetAmount || totalData.wetAmount==0)) ? totalData.wetAmount : '--' }}</a-col>
  126. <a-col span="4">雷贝斯托:{{ (totalData && (totalData.lbstAmount || totalData.lbstAmount==0)) ? totalData.lbstAmount : '--' }}</a-col>
  127. <a-col span="4">德尔福:{{ (totalData && (totalData.defAmount || totalData.defAmount==0)) ? totalData.defAmount : '--' }}</a-col>
  128. <a-col span="4">巴诺德:{{ (totalData && (totalData.bndAmount || totalData.bndAmount==0)) ? totalData.bndAmount : '--' }}</a-col>
  129. <a-col span="6" v-if="$hasPermissions('B_isShowPrice')">实售销售合计金额:{{ (totalData && (totalData.totalAmount || totalData.totalAmount==0)) ? totalData.totalAmount : '--' }}</a-col>
  130. </a-row>
  131. </a-col>
  132. </a-row>
  133. </template>
  134. </s-table>
  135. </a-spin>
  136. <!-- 导出提示框 -->
  137. <reportModal :visible="showExport" @close="showExport=false"></reportModal>
  138. </a-card>
  139. </template>
  140. <script>
  141. import { commonMixin } from '@/utils/mixin'
  142. import getDate from '@/libs/getDate.js'
  143. import { STable, VSelect } from '@/components'
  144. import rangeDate from '@/views/common/rangeDate.vue'
  145. import custList from '@/views/common/custList.vue'
  146. import reportModal from '@/views/common/reportModal.vue'
  147. import subarea from '@/views/common/subarea.js'
  148. import { getArea } from '@/api/data'
  149. import { hdExportExcel } from '@/libs/exportExcel'
  150. import { salesBillRealAmountQueryPageList, salesBillRealReportCount } from '@/api/salesBillReport'
  151. import { actualSalesExport } from '@/api/reportData'
  152. export default {
  153. name: 'ActualSalesReportList',
  154. mixins: [commonMixin],
  155. components: { STable, VSelect, rangeDate, subarea, custList, reportModal },
  156. data () {
  157. return {
  158. spinning: false,
  159. advanced: true, // 高级搜索 展开/关闭
  160. tableHeight: 0,
  161. showExport: false, // 导出弹窗初始值
  162. queryParam: { // 查询条件
  163. time: [
  164. getDate.getCurrMonthDays().starttime,
  165. getDate.getCurrMonthDays().endtime
  166. ],
  167. beginDate: getDate.getCurrMonthDays().starttime,
  168. endDate: getDate.getCurrMonthDays().endtime,
  169. dealer: {
  170. 'dealerSn': undefined,
  171. 'provinceSn': undefined,
  172. 'citySn': undefined,
  173. 'districtSn': undefined,
  174. 'subareaSn': undefined,
  175. 'dealerLevel': undefined
  176. }
  177. },
  178. rules: {
  179. 'time': [{ required: true, message: '请选择销售日期', trigger: 'change' }]
  180. },
  181. disabled: false, // 查询、重置按钮是否可操作
  182. exportLoading: false,
  183. // 加载数据方法 必须为 Promise 对象
  184. loadData: parameter => {
  185. this.disabled = true
  186. this.spinning = true
  187. if (this.tableHeight == 0) {
  188. this.tableHeight = window.innerHeight - 380
  189. }
  190. const paramsPage = Object.assign(this.queryParam, { pageNo: parameter.pageNo, pageSize: parameter.pageSize }) // 有分页
  191. return salesBillRealAmountQueryPageList(paramsPage).then(res => {
  192. let data
  193. if (res.status == 200) {
  194. data = res.data
  195. this.getCount(paramsPage)
  196. const no = (data.pageNo - 1) * data.pageSize
  197. for (var i = 0; i < data.list.length; i++) {
  198. data.list[i].no = no + i + 1
  199. }
  200. this.disabled = false
  201. }
  202. this.spinning = false
  203. return data
  204. })
  205. },
  206. totalData: null,
  207. addrProvinceList: [], // 省下拉
  208. addrCityList: [], // 市下拉
  209. addrDistrictList: [] // 区下拉
  210. }
  211. },
  212. computed: {
  213. columns () {
  214. const arr = [
  215. { title: '区域', dataIndex: 'dealer.subareaNameSet', width: 90, align: 'center', customRender: function (text) { return (text && text.length > 0) ? text.join('/') : '--' } },
  216. { title: '省份', dataIndex: 'dealer.provinceName', width: 90, align: 'center', customRender: function (text) { return text || '--' } },
  217. { title: '客户名称', dataIndex: 'dealer.dealerName', width: 100, align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
  218. { title: '客户级别', dataIndex: 'dealer.dealerLevelDictValue', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
  219. { title: '品牌',
  220. align: 'center',
  221. children: [
  222. {
  223. title: '箭牌',
  224. align: 'center',
  225. children: [
  226. {
  227. title: '滤清器',
  228. dataIndex: 'jpLqqAmount',
  229. align: 'center',
  230. width: 80,
  231. customRender: function (text) { return (text || text == 0) ? ('¥' + text) : '--' }
  232. },
  233. {
  234. title: '变速箱滤清器',
  235. dataIndex: 'jpBsxLqqAmount',
  236. align: 'center',
  237. width: 80,
  238. customRender: function (text) { return (text || text == 0) ? ('¥' + text) : '--' }
  239. },
  240. {
  241. title: '雨刮片',
  242. dataIndex: 'jpYgpAmount',
  243. align: 'center',
  244. width: 80,
  245. customRender: function (text) { return (text || text == 0) ? ('¥' + text) : '--' }
  246. },
  247. {
  248. title: '喇叭',
  249. dataIndex: 'jpLbAmount',
  250. align: 'center',
  251. width: 80,
  252. customRender: function (text) { return (text || text == 0) ? ('¥' + text) : '--' }
  253. },
  254. {
  255. title: '刹车片',
  256. dataIndex: 'jpScpAmount',
  257. align: 'center',
  258. width: 80,
  259. customRender: function (text) { return (text || text == 0) ? ('¥' + text) : '--' }
  260. },
  261. {
  262. title: '感应线',
  263. dataIndex: 'jpGyxAmount',
  264. align: 'center',
  265. width: 80,
  266. customRender: function (text) { return (text || text == 0) ? ('¥' + text) : '--' }
  267. }
  268. ]
  269. },
  270. {
  271. title: '冠牌',
  272. align: 'center',
  273. children: [
  274. {
  275. title: '滤清器',
  276. dataIndex: 'gpLqqAmount',
  277. align: 'center',
  278. width: 80,
  279. customRender: function (text) { return (text || text == 0) ? ('¥' + text) : '--' }
  280. },
  281. {
  282. title: '雨刮片',
  283. dataIndex: 'gpYgpAmount',
  284. align: 'center',
  285. width: 80,
  286. customRender: function (text) { return (text || text == 0) ? ('¥' + text) : '--' }
  287. },
  288. {
  289. title: '刹车片',
  290. dataIndex: 'gpScpAmount',
  291. align: 'center',
  292. width: 80,
  293. customRender: function (text) { return (text || text == 0) ? ('¥' + text) : '--' }
  294. }
  295. ]
  296. },
  297. {
  298. title: '稳升',
  299. align: 'center',
  300. children: [
  301. {
  302. title: '点火线圈',
  303. dataIndex: 'wsDhxqAmount',
  304. align: 'center',
  305. width: 80,
  306. customRender: function (text) { return (text || text == 0) ? ('¥' + text) : '--' }
  307. },
  308. {
  309. title: '灯泡',
  310. dataIndex: 'wsDpAmount',
  311. align: 'center',
  312. width: 80,
  313. customRender: function (text) { return (text || text == 0) ? ('¥' + text) : '--' }
  314. }
  315. ]
  316. },
  317. {
  318. title: '汇箭',
  319. dataIndex: 'hjAmount',
  320. align: 'center',
  321. width: 80,
  322. customRender: function (text) { return (text || text == 0) ? ('¥' + text) : '--' }
  323. },
  324. {
  325. title: '德路斯',
  326. dataIndex: 'dlsAmount',
  327. align: 'center',
  328. width: 80,
  329. customRender: function (text) { return (text || text == 0) ? ('¥' + text) : '--' }
  330. },
  331. {
  332. title: 'TBU',
  333. dataIndex: 'tbuAmount',
  334. align: 'center',
  335. width: 80,
  336. customRender: function (text) { return (text || text == 0) ? ('¥' + text) : '--' }
  337. },
  338. {
  339. title: 'TBU-P',
  340. dataIndex: 'tbupAmount',
  341. align: 'center',
  342. width: 80,
  343. customRender: function (text) { return (text || text == 0) ? ('¥' + text) : '--' }
  344. },
  345. {
  346. title: '布瑞斯',
  347. dataIndex: 'brsAmount',
  348. align: 'center',
  349. width: 80,
  350. customRender: function (text) { return (text || text == 0) ? ('¥' + text) : '--' }
  351. }
  352. ]
  353. },
  354. { title: '代理品牌',
  355. align: 'center',
  356. children: [
  357. {
  358. title: 'NGK',
  359. dataIndex: 'ngkAmount',
  360. align: 'center',
  361. width: 80,
  362. customRender: function (text) { return (text || text == 0) ? ('¥' + text) : '--' }
  363. },
  364. {
  365. title: '飞利浦',
  366. dataIndex: 'flpAmount',
  367. align: 'center',
  368. width: 80,
  369. customRender: function (text) { return (text || text == 0) ? ('¥' + text) : '--' }
  370. },
  371. {
  372. title: '车仆',
  373. dataIndex: 'cpAmount',
  374. align: 'center',
  375. width: 80,
  376. customRender: function (text) { return (text || text == 0) ? ('¥' + text) : '--' }
  377. },
  378. {
  379. title: '瓦尔塔',
  380. dataIndex: 'wetAmount',
  381. align: 'center',
  382. width: 80,
  383. customRender: function (text) { return (text || text == 0) ? ('¥' + text) : '--' }
  384. },
  385. {
  386. title: '雷贝斯托',
  387. dataIndex: 'lbstAmount',
  388. align: 'center',
  389. width: 80,
  390. customRender: function (text) { return (text || text == 0) ? ('¥' + text) : '--' }
  391. },
  392. {
  393. title: '德尔福',
  394. dataIndex: 'defAmount',
  395. align: 'center',
  396. width: 80,
  397. customRender: function (text) { return (text || text == 0) ? ('¥' + text) : '--' }
  398. },
  399. {
  400. title: '巴诺德',
  401. dataIndex: 'bndAmount',
  402. align: 'center',
  403. width: 80,
  404. customRender: function (text) { return (text || text == 0) ? ('¥' + text) : '--' }
  405. }
  406. ]
  407. }
  408. // { title: '实售销售合计金额', width: 90, dataIndex: 'totalAmount', align: 'center', customRender: function (text) { return (text || text == 0) ? ('¥' + text) : '--' } }
  409. ]
  410. if (this.$hasPermissions('B_isShowPrice')) { // 售价权限
  411. arr.splice(arr.length, 0, { title: '实售销售合计金额', width: 90, dataIndex: 'totalAmount', align: 'center', customRender: function (text) { return (text || text == 0) ? ('¥' + text) : '--' } })
  412. }
  413. return arr
  414. }
  415. },
  416. methods: {
  417. // 导出
  418. handleExport () {
  419. const _this = this
  420. this.$refs.ruleForm.validate(valid => {
  421. if (valid) {
  422. _this.showExport = true
  423. const params = _this.queryParam
  424. _this.exportLoading = true
  425. _this.spinning = true
  426. hdExportExcel(actualSalesExport, params, '实售销售报表', function () {
  427. _this.exportLoading = false
  428. _this.spinning = false
  429. })
  430. } else {
  431. return false
  432. }
  433. })
  434. },
  435. // 总计
  436. getCount (params) {
  437. salesBillRealReportCount(params).then(res => {
  438. if (res.status == 200 && res.data) {
  439. this.totalData = res.data
  440. } else {
  441. this.totalData = null
  442. }
  443. })
  444. },
  445. handleSearch () {
  446. const _this = this
  447. this.$refs.ruleForm.validate(valid => {
  448. if (valid) {
  449. _this.$refs.table.refresh(true)
  450. } else {
  451. return false
  452. }
  453. })
  454. },
  455. // 创建时间 change
  456. dateChange (date) {
  457. if (date[0] && date[1]) {
  458. this.queryParam.time = date
  459. } else {
  460. this.queryParam.time = []
  461. }
  462. this.queryParam.beginDate = date[0] || ''
  463. this.queryParam.endDate = date[1] || ''
  464. },
  465. custChange (val) {
  466. this.queryParam.dealer.dealerSn = val.key
  467. },
  468. // 重置
  469. resetSearchForm () {
  470. this.queryParam.time = [
  471. getDate.getCurrMonthDays().starttime,
  472. getDate.getCurrMonthDays().endtime
  473. ]
  474. this.$refs.rangeDate.resetDate(this.queryParam.time)
  475. this.queryParam.beginDate = getDate.getCurrMonthDays().starttime
  476. this.queryParam.endDate = getDate.getCurrMonthDays().endtime
  477. this.queryParam.dealer = {
  478. 'dealerSn': undefined,
  479. 'provinceSn': undefined,
  480. 'citySn': undefined,
  481. 'districtSn': undefined,
  482. 'subareaSn': undefined,
  483. 'dealerLevel': undefined
  484. }
  485. this.totalData = null
  486. this.$refs.custList.resetForm()
  487. this.$refs.ruleForm.resetFields()
  488. this.$refs.table.clearTable()
  489. },
  490. // 获取城市列表
  491. getCityList (val) {
  492. this.addrCityList = []
  493. this.addrDistrictList = []
  494. this.queryParam.dealerCitySn = undefined
  495. this.queryParam.dealerCountySn = undefined
  496. if (val) {
  497. this.getArea('city', val)
  498. }
  499. },
  500. // 获取区县列表
  501. getAreaList (val) {
  502. this.addrDistrictList = []
  503. this.queryParam.dealerCountySn = undefined
  504. if (val) {
  505. this.getArea('district', val)
  506. }
  507. },
  508. // 省/市/区
  509. getArea (leve, sn) {
  510. let params
  511. if (leve == 'province') {
  512. params = { type: '2' }
  513. } else {
  514. params = { parentId: sn, type: leve == 'city' ? '3' : '4' }
  515. }
  516. getArea(params).then(res => {
  517. if (res.status == 200) {
  518. if (leve == 'province') {
  519. this.addrProvinceList = res.data || []
  520. } else if (leve == 'city') {
  521. this.addrCityList = res.data || []
  522. } else if (leve == 'district') {
  523. this.addrDistrictList = res.data || []
  524. }
  525. } else {
  526. if (leve == 'province') {
  527. this.addrProvinceList = []
  528. } else if (leve == 'city') {
  529. this.addrCityList = []
  530. } else if (leve == 'district') {
  531. this.addrDistrictList = []
  532. }
  533. }
  534. })
  535. }
  536. },
  537. mounted () {
  538. if (!this.$store.state.app.isNewTab) { // 页签刷新时调用
  539. this.getArea('province')
  540. this.resetSearchForm()
  541. }
  542. },
  543. activated () {
  544. // 如果是新页签打开,则重置当前页面
  545. if (this.$store.state.app.isNewTab) {
  546. this.getArea('province')
  547. this.resetSearchForm()
  548. }
  549. },
  550. beforeRouteEnter (to, from, next) {
  551. next(vm => {})
  552. }
  553. }
  554. </script>