list.vue 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399
  1. <template>
  2. <div>
  3. <a-card size="small" :bordered="false" class="tireSalesDealerList-wrap searchBoxNormal">
  4. <!-- 搜索条件 -->
  5. <div class="table-page-search-wrapper" ref="tableSearch">
  6. <a-form-model
  7. id="tireSalesDealerList-form"
  8. ref="ruleForm"
  9. class="form-model-con"
  10. layout="inline"
  11. :rules="rules"
  12. :model="queryParam">
  13. <a-row :gutter="15">
  14. <a-col :md="6" :sm="24">
  15. <a-form-model-item label="日期" prop="time">
  16. <rangeDate
  17. ref="rangeDate"
  18. :showTime="false"
  19. :today="false"
  20. :value="queryParam.time"
  21. id="tireSalesDealerList-time"
  22. @change="dateChange" />
  23. </a-form-model-item>
  24. </a-col>
  25. <a-col :md="6" :sm="24">
  26. <a-form-model-item label="地区">
  27. <AreaList id="tireSalesDealerList-areaList" changeOnSelect ref="areaList" @change="areaChange" defValKey="id"></AreaList>
  28. </a-form-model-item>
  29. </a-col>
  30. <a-col :md="6" :sm="24">
  31. <a-form-item label="区域/分区">
  32. <subarea id="tireSalesDealerList-subarea" ref="subarea" @change="subareaChange"></subarea>
  33. </a-form-item>
  34. </a-col>
  35. <template v-if="advanced">
  36. <a-col :md="6" :sm="24">
  37. <a-form-model-item label="客户名称">
  38. <dealerSubareaScopeList ref="dealerSubareaScopeList" id="tireSalesDealerList-dealerName" @change="custChange" />
  39. </a-form-model-item>
  40. </a-col>
  41. <a-col :md="6" :sm="24">
  42. <a-form-model-item label="客户级别">
  43. <v-select
  44. v-model="queryParam.dealerLevel"
  45. ref="dealerLevel"
  46. id="tireSalesDealerList-dealerLevel"
  47. code="DEALER_LEVEL"
  48. placeholder="请选择客户级别"
  49. allowClear></v-select>
  50. </a-form-model-item>
  51. </a-col>
  52. <a-col :md="6" :sm="24">
  53. <a-form-model-item label="区域负责人">
  54. <BizUser id="tireSalesDealerList-bizUserSn" v-model="queryParam.subareaArea.bizUserSn"></BizUser>
  55. </a-form-model-item>
  56. </a-col>
  57. </template>
  58. <a-col :md="6" :sm="24">
  59. <a-button
  60. style="margin-left: 5px"
  61. type="primary"
  62. @click="handleSearch"
  63. :disabled="disabled"
  64. id="tireSalesDealerList-refresh">查询</a-button>
  65. <a-button
  66. style="margin-left: 8px"
  67. @click="resetSearchForm"
  68. :disabled="disabled"
  69. id="tireSalesDealerList-reset">重置</a-button>
  70. <a-button
  71. style="margin-left: 10px"
  72. type="primary"
  73. class="button-warning"
  74. @click="handleExport"
  75. :disabled="disabled"
  76. :loading="exportLoading"
  77. v-if="$hasPermissions('B_tireReportExport')"
  78. id="tireSalesDealerList-export">导出</a-button>
  79. <a @click="advanced=!advanced" style="margin-left: 5px">
  80. {{ advanced ? '收起' : '展开' }}
  81. <a-icon :type="advanced ? 'up' : 'down'" />
  82. </a>
  83. </a-col>
  84. </a-row>
  85. </a-form-model>
  86. </div>
  87. </a-card>
  88. <a-card size="small" :bordered="false">
  89. <a-spin :spinning="spinning" tip="Loading...">
  90. <!-- 列表 -->
  91. <s-table
  92. class="sTable fixPagination"
  93. ref="table"
  94. size="small"
  95. :rowKey="(record) => record.no"
  96. :style="{ height: tableHeight+70+'px' }"
  97. rowKeyName="no"
  98. :columns="columns"
  99. :data="loadData"
  100. :scroll="{x:2200, y: tableHeight-110 }"
  101. :defaultLoadData="false"
  102. bordered>
  103. <template slot="addressInfo" slot-scope="text, record">
  104. {{ record.dealerEntity.provinceName }}{{ '/'+record.dealerEntity.cityName }}{{ '/'+record.dealerEntity.districtName }}
  105. </template>
  106. <template slot="footer">
  107. <a-row :gutter="15">
  108. <a-col :md="4" :sm="24">总部订货数量:{{ (totalData && (totalData.sysOrderQty || totalData.sysOrderQty==0)) ? totalData.sysOrderQty : '--' }}</a-col>
  109. <a-col :md="4" :sm="24" v-if="$hasPermissions('M_tireSalesReportList_salesPrice')">总部订货金额:{{ (totalData && (totalData.sysOrderAmount || totalData.sysOrderAmount==0)) ? toThousands(totalData.sysOrderAmount): '--' }}</a-col>
  110. <a-col :md="4" :sm="24">上级订货数量:{{ (totalData && (totalData.upOrderQty || totalData.upOrderQty==0)) ?totalData.upOrderQty: '--' }}</a-col>
  111. <a-col :md="4" :sm="24" v-if="$hasPermissions('M_tireSalesReportList_salesPrice')">上级订货金额:{{ (totalData && (totalData.upOrderAmount || totalData.upOrderAmount==0)) ? toThousands(totalData.upOrderAmount): '--' }}</a-col>
  112. <a-col :md="4" :sm="24">跨地区订货数量:{{ (totalData && (totalData.crossRegionQty || totalData.crossRegionQty==0)) ?totalData.crossRegionQty: '--' }}</a-col>
  113. <a-col :md="4" :sm="24" v-if="$hasPermissions('M_tireSalesReportList_salesPrice')">跨地区订货金额:{{ (totalData && (totalData.crossRegionAmount || totalData.crossRegionAmount==0)) ? toThousands(totalData.crossRegionAmount): '--' }}</a-col>
  114. <a-col :md="4" :sm="24">累计入库数量:{{ (totalData && (totalData.putQty || totalData.putQty==0)) ?totalData.putQty: '--' }}</a-col>
  115. <a-col :md="4" :sm="24" v-if="$hasPermissions('M_tireSalesReportList_salesPrice')">累计入库金额:{{ (totalData && (totalData.putAmount || totalData.putAmount==0)) ? toThousands(totalData.putAmount): '--' }}</a-col>
  116. <a-col :md="4" :sm="24">退货数量:{{ (totalData && (totalData.returnQty || totalData.returnQty==0)) ?totalData.returnQty: '--' }}</a-col>
  117. <a-col :md="4" :sm="24" v-if="$hasPermissions('M_tireSalesReportList_salesPrice')">退货金额:{{ (totalData && (totalData.returnAmount || totalData.returnAmount==0)) ? toThousands(totalData.returnAmount): '--' }}</a-col>
  118. <a-col :md="4" :sm="24">客户现有库存数量:{{ (totalData &&totalData.rptDealerStockVO && (totalData.rptDealerStockVO.totalStockQty || totalData.rptDealerStockVO.totalStockQty==0)) ?totalData.rptDealerStockVO.totalStockQty: '--' }}</a-col>
  119. <a-col :md="4" :sm="24" v-if="$hasPermissions('M_tireSalesReportList_salesPrice')">客户现有库存金额:{{ (totalData&&totalData.rptDealerStockVO && (totalData.rptDealerStockVO.totalStockAmount || totalData.rptDealerStockVO.totalStockAmount==0)) ? toThousands(totalData.rptDealerStockVO.totalStockAmount): '--' }}</a-col>
  120. <a-col :md="4" :sm="24">出库加盟商数量:{{ (totalData && (totalData.outQtyDealer || totalData.outQtyDealer==0)) ?totalData.outQtyDealer: '--' }}</a-col>
  121. <a-col :md="4" :sm="24" v-if="$hasPermissions('M_tireSalesReportList_salesPrice')">出库加盟商金额:{{ (totalData && (totalData.outAmountDealer || totalData.outAmountDealer==0)) ? toThousands(totalData.outAmountDealer): '--' }}</a-col>
  122. <a-col :md="4" :sm="24">出库终端数量:{{ (totalData && (totalData.outQtyTerminal || totalData.outQtyTerminal==0)) ?totalData.outQtyTerminal: '--' }}</a-col>
  123. <a-col :md="4" :sm="24" v-if="$hasPermissions('M_tireSalesReportList_salesPrice')">出库终端金额:{{ (totalData && (totalData.outAmountTerminal || totalData.outAmountTerminal==0)) ? toThousands(totalData.outAmountTerminal): '--' }}</a-col>
  124. <a-col :md="4" :sm="24">累计出库数量:{{ (totalData && (totalData.outQty || totalData.outQty==0)) ?totalData.outQty: '--' }}</a-col>
  125. <a-col :md="4" :sm="24" v-if="$hasPermissions('M_tireSalesReportList_salesPrice')">累计出库金额:{{ (totalData && (totalData.outAmount || totalData.outAmount==0)) ? toThousands(totalData.outAmount): '--' }}</a-col>
  126. <a-col :md="4" :sm="24">已绑质保单数量:{{ (totalData&&totalData.rptDealerStockVO && (totalData.rptDealerStockVO.totalWarrantyQty || totalData.rptDealerStockVO.totalWarrantyQty==0)) ?totalData.rptDealerStockVO.totalWarrantyQty: '--' }}</a-col>
  127. </a-row>
  128. </template>
  129. </s-table>
  130. </a-spin>
  131. </a-card>
  132. <!-- 导出提示框 -->
  133. <reportModal :visible="showExport" @close="showExport=false"></reportModal>
  134. </div>
  135. </template>
  136. <script>
  137. import { commonMixin } from '@/utils/mixin'
  138. import { hdExportExcel } from '@/libs/exportExcel'
  139. // 组件
  140. import { STable, VSelect } from '@/components'
  141. import rangeDate from '@/views/common/rangeDate.vue'
  142. import subarea from '@/views/common/subarea.js'
  143. import AreaList from '@/views/common/areaList.js'
  144. import BizUser from '@/views/common/bizUser.js'
  145. import reportModal from '@/views/common/reportModal.vue'
  146. import dealerSubareaScopeList from '@/views/common/dealerSubareaScopeList.vue'
  147. // 接口
  148. import { tireReportList, queryTireCount, tireListExport } from '@/api/reportData'
  149. export default {
  150. name: 'TireSalesDealerList',
  151. mixins: [commonMixin],
  152. components: { STable, VSelect, rangeDate, subarea, AreaList, BizUser, dealerSubareaScopeList, reportModal },
  153. data () {
  154. return {
  155. spinning: false,
  156. advanced: true, // 高级搜索 展开/关闭
  157. disabled: false, // 查询、重置按钮是否可操作
  158. exportLoading: false, // 导出按钮加载状态
  159. showExport: false, // 导出弹窗
  160. tableHeight: 0, // 表格高度
  161. // 查询条件
  162. queryParam: {
  163. time: [], // 日期
  164. bizBeginDate: '', // 开始时间
  165. bizEndDate: '', // 结束时间
  166. provinceSn: undefined, // 省份编码
  167. citySn: undefined, // 市编码
  168. districtSn: undefined, // 区编码
  169. dealerLevel: undefined, // 客户等级
  170. dealerName: undefined, // 客户名称
  171. dealerSn: undefined, // 客户sn
  172. subareaArea: {
  173. subareaSn: undefined, // 区域
  174. subareaAreaSn: undefined, // 分区
  175. bizUserSn: undefined // 区域负责人
  176. }
  177. },
  178. rules: {
  179. 'time': [{ required: true, message: '请选择日期', trigger: 'change' }]
  180. },
  181. // 加载数据方法 必须为 Promise 对象
  182. loadData: parameter => {
  183. this.disabled = true
  184. this.spinning = true
  185. const oldParams = Object.assign(parameter, this.queryParam)
  186. const params = JSON.parse(JSON.stringify(oldParams))
  187. delete params.time
  188. // 获取列表数据 有分页
  189. return tireReportList(params).then(res => {
  190. let data
  191. if (res.status == 200 && res.data) {
  192. data = res.data
  193. // 计算列表序号
  194. const no = (data.pageNo - 1) * data.pageSize
  195. for (var i = 0; i < data.list.length; i++) {
  196. data.list[i].no = no + i + 1
  197. }
  198. this.disabled = false
  199. // 获取统计数据
  200. this.getCount(params)
  201. }
  202. this.spinning = false
  203. return data
  204. })
  205. },
  206. totalData: null
  207. }
  208. },
  209. watch: {
  210. // 展开关闭
  211. advanced (newValue, oldValue) {
  212. const _this = this
  213. this.$nextTick(() => { // 页面渲染完成后的回调
  214. _this.setTableH()
  215. })
  216. },
  217. '$store.state.app.winHeight' (newValue, oldValue) { // 窗口变更时,需同时更改表格高度
  218. this.setTableH()
  219. }
  220. },
  221. computed: {
  222. columns () {
  223. const _this = this
  224. const arr = [
  225. { title: '序号', dataIndex: 'no', width: '5%', align: 'center' },
  226. { title: '地区', scopedSlots: { customRender: 'addressInfo' }, width: '12%', align: 'center' },
  227. { title: '区域', dataIndex: 'subareaArea.subareaName', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
  228. { title: '分区', dataIndex: 'subareaArea.subareaAreaName', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
  229. { title: '区域负责人', dataIndex: 'bizUserName', width: '9%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
  230. { title: '客户名称', dataIndex: 'dealerEntity.dealerName', width: '15%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
  231. { title: '客户级别', dataIndex: 'dealerEntity.dealerLevelDictValue', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
  232. { title: '任务数量', dataIndex: 'dealerEntity.taskNum', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
  233. // { title: '授信金额', dataIndex: 'dealerEntity.dealerLevelDictValue', width: '8%', align: 'right', customRender: function (text) { return text || '--' } },
  234. { title: '总部订货数量', dataIndex: 'sysOrderQty', width: '80px', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
  235. // { title: '总部订货金额', dataIndex: 'sysOrderAmount', width: '8%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
  236. { title: '上级订货数量', dataIndex: 'upOrderQty', width: '80px', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
  237. // { title: '上级订货金额', dataIndex: 'upOrderAmount', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
  238. { title: '跨地区订货数量', dataIndex: 'crossRegionQty', width: '80px', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
  239. // { title: '跨地区订货金额', dataIndex: 'crossRegionAmount', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
  240. { title: '累计入库数量', dataIndex: 'putQty', width: '80px', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
  241. // { title: '累计入库金额', dataIndex: 'putAmount', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
  242. { title: '退货数量', dataIndex: 'returnQty', width: '80px', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
  243. // { title: '退货金额', dataIndex: 'returnAmount', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
  244. { title: '客户现有库存数量', dataIndex: 'rptDealerStockVO.totalStockQty', width: '80px', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
  245. // { title: '客户现有库存金额', dataIndex: 'dealerLevelDictValue', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
  246. { title: '出库加盟商数量', dataIndex: 'outQtyDealer', width: '80px', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
  247. // { title: '出库加盟商金额', dataIndex: 'outAmountDealer', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
  248. { title: '出库终端数量', dataIndex: 'outQtyTerminal', width: '80px', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
  249. // { title: '出库终端金额', dataIndex: 'outAmountTerminal', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
  250. { title: '累计出库数量', dataIndex: 'outQty', width: '80px', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
  251. // { title: '累计出库金额', dataIndex: 'outAmount', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
  252. { title: <div>已绑质保单<div>数量</div></div>, dataIndex: 'rptDealerStockVO.totalWarrantyQty', width: '80px', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } }
  253. ]
  254. if (this.$hasPermissions('M_tireSalesReportList_salesPrice')) {
  255. arr.splice(8, 0, { title: '授信金额', dataIndex: 'dealerEntity.taskAmount', width: '8%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
  256. arr.splice(10, 0, { title: '总部订货金额', dataIndex: 'sysOrderAmount', width: '8%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
  257. arr.splice(12, 0, { title: '上级订货金额', dataIndex: 'upOrderAmount', width: '8%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
  258. arr.splice(14, 0, { title: '跨地区订货金额', dataIndex: 'crossRegionAmount', width: '8%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
  259. arr.splice(16, 0, { title: '累计入库金额', dataIndex: 'putAmount', width: '8%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
  260. arr.splice(18, 0, { title: '退货金额', dataIndex: 'returnAmount', width: '8%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
  261. arr.splice(20, 0, { title: '客户现有库存金额', dataIndex: 'rptDealerStockVO.totalStockAmount', width: '8%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
  262. arr.splice(22, 0, { title: '出库加盟商金额', dataIndex: 'outAmountDealer', width: '8%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
  263. arr.splice(24, 0, { title: '出库终端金额', dataIndex: 'outAmountTerminal', width: '8%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
  264. arr.splice(26, 0, { title: '累计出库金额', dataIndex: 'outAmount', width: '8%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
  265. }
  266. return arr
  267. }
  268. },
  269. methods: {
  270. // 查询
  271. handleSearch () {
  272. const _this = this
  273. this.$refs.ruleForm.validate(valid => {
  274. if (valid) {
  275. _this.$refs.table.refresh(true)
  276. } else {
  277. _this.$message.error('请选择日期')
  278. return false
  279. }
  280. })
  281. },
  282. // 客户名称 change
  283. custChange (val) {
  284. this.queryParam.dealerName = val.name
  285. this.queryParam.dealerSn = val.key
  286. },
  287. // 统计
  288. getCount (params) {
  289. queryTireCount(params).then(res => {
  290. if (res.status == 200 && res.data) {
  291. this.totalData = res.data
  292. } else {
  293. this.totalData = null
  294. }
  295. })
  296. },
  297. // 地区
  298. areaChange (val) {
  299. this.queryParam.provinceSn = val[0] ? val[0] : undefined
  300. this.queryParam.citySn = val[1] ? val[1] : undefined
  301. this.queryParam.districtSn = val[2] ? val[2] : undefined
  302. },
  303. // 日期选择 change
  304. dateChange (date) {
  305. if (date[0] && date[1]) {
  306. this.queryParam.time = date
  307. } else {
  308. this.queryParam.time = []
  309. }
  310. this.queryParam.bizBeginDate = date[0] ? date[0].replace(/-/g, '') : ''
  311. this.queryParam.bizEndDate = date[1] ? date[1].replace(/-/g, '') : ''
  312. },
  313. // 区域分区 change
  314. subareaChange (val) {
  315. this.queryParam.subareaArea.subareaSn = val[0] ? val[0] : undefined
  316. this.queryParam.subareaArea.subareaAreaSn = val[1] ? val[1] : undefined
  317. },
  318. // 重置
  319. resetSearchForm () {
  320. this.queryParam.time = []
  321. this.$refs.rangeDate.resetDate()
  322. this.queryParam.bizBeginDate = ''
  323. this.queryParam.bizEndDate = ''
  324. this.queryParam.provinceSn = undefined
  325. this.queryParam.citySn = undefined
  326. this.queryParam.districtSn = undefined
  327. this.queryParam.dealerName = undefined
  328. this.queryParam.dealerSn = undefined
  329. this.queryParam.subareaArea.subareaSn = undefined
  330. this.queryParam.subareaArea.subareaAreaSn = undefined
  331. this.queryParam.subareaArea.bizUserSn = undefined
  332. this.queryParam.dealerLevel = undefined
  333. this.totalData = null
  334. this.$refs.areaList.clearData()
  335. if (this.advanced) {
  336. this.$refs.dealerSubareaScopeList.resetForm()
  337. }
  338. this.$refs.subarea.clearData()
  339. this.$refs.table.clearTable()
  340. },
  341. // 导出 查询数据必填判断
  342. handleExport () {
  343. const _this = this
  344. this.$refs.ruleForm.validate(valid => {
  345. if (valid) {
  346. _this.exportList()
  347. } else {
  348. _this.$message.error('请选择日期')
  349. return false
  350. }
  351. })
  352. },
  353. // 导出
  354. exportList () {
  355. const _this = this
  356. const params = JSON.parse(JSON.stringify(_this.queryParam))
  357. _this.exportLoading = true
  358. _this.spinning = true
  359. _this.showExport = true
  360. _this.$store.state.app.curActionPermission = 'B_tireReportExport'
  361. params.exportFlag = 0
  362. delete params.time
  363. hdExportExcel(tireListExport, params, '轮胎统计报表', function () {
  364. _this.exportLoading = false
  365. _this.spinning = false
  366. _this.$store.state.app.curActionPermission = ''
  367. })
  368. },
  369. // 初始化
  370. pageInit () {
  371. const _this = this
  372. this.$nextTick(() => { // 页面渲染完成后的回调
  373. _this.setTableH()
  374. })
  375. },
  376. // 计算表格高度
  377. setTableH () {
  378. const tableSearchH = this.$refs.tableSearch.offsetHeight
  379. this.tableHeight = window.innerHeight - tableSearchH - 276
  380. }
  381. },
  382. mounted () {
  383. if (!this.$store.state.app.isNewTab) { // 页签刷新时调用
  384. this.pageInit()
  385. }
  386. },
  387. activated () {
  388. // 如果是新页签打开,则重置当前页面
  389. if (this.$store.state.app.isNewTab) {
  390. this.pageInit()
  391. }
  392. },
  393. beforeRouteEnter (to, from, next) {
  394. next(vm => {})
  395. }
  396. }
  397. </script>