list.vue 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604
  1. <template>
  2. <a-card size="small" :bordered="false" class="productInfoList-wrap">
  3. <a-spin :spinning="spinning" tip="Loading...">
  4. <!-- 搜索条件 -->
  5. <div ref="tableSearch" class="table-page-search-wrapper">
  6. <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
  7. <a-row :gutter="15">
  8. <a-col :md="6" :sm="24">
  9. <a-form-item label="产品名称">
  10. <a-input id="productInfoList-name" v-model.trim="queryParam.name" allowClear placeholder="请输入产品名称"/>
  11. </a-form-item>
  12. </a-col>
  13. <a-col :md="6" :sm="24">
  14. <a-form-item label="产品编码/原厂编码">
  15. <a-input id="productInfoList-queryWord" v-model.trim="queryParam.queryWord" allowClear placeholder="请输入产品编码/原厂编码"/>
  16. </a-form-item>
  17. </a-col>
  18. <a-col :md="5" :sm="24">
  19. <a-form-item label="品牌">
  20. <ProductBrand id="productInfoList-productBrandSn" v-model="queryParam.productBrandSn"></ProductBrand>
  21. </a-form-item>
  22. </a-col>
  23. <template v-if="advanced">
  24. <a-col :md="7" :sm="24">
  25. <a-form-item label="产品分类">
  26. <a-cascader
  27. @change="changeProductType"
  28. expand-trigger="hover"
  29. change-on-select
  30. :options="productTypeList"
  31. :fieldNames="{ label: 'productTypeName', value: 'productTypeSn', children: 'children' }"
  32. id="productInfoList-productType"
  33. placeholder="请选择产品分类"
  34. allowClear
  35. v-model="productType" />
  36. </a-form-item>
  37. </a-col>
  38. <a-col :md="6" :sm="24">
  39. <a-form-item label="产品状态">
  40. <v-select code="PRODUCT_STATUS" id="productInfoList-state" v-model="queryParam.state" allowClear placeholder="请选择产品状态"></v-select>
  41. </a-form-item>
  42. </a-col>
  43. <a-col :md="6" :sm="24">
  44. <a-form-item label="定价状态">
  45. <v-select code="PRICING_STATUS" id="productInfoList-pricingState" v-model="queryParam.pricingState" allowClear placeholder="请选择定价状态"></v-select>
  46. </a-form-item>
  47. </a-col>
  48. </template>
  49. <a-col :md="7" :sm="24" style="margin-bottom: 10px;">
  50. <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="productInfoList-refresh">查询</a-button>
  51. <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="productInfoList-reset">重置</a-button>
  52. <a-button
  53. v-if="$hasPermissions('B_productInfo_export')"
  54. style="margin-left: 5px"
  55. type="primary"
  56. class="button-warning"
  57. @click="handleExport"
  58. :disabled="disabled"
  59. :loading="exportLoading"
  60. id="productInfoList-export">导出</a-button>
  61. <a @click="advanced=!advanced" style="margin-left: 5px">
  62. {{ advanced ? '收起' : '展开' }}
  63. <a-icon :type="advanced ? 'up' : 'down'"/>
  64. </a>
  65. </a-col>
  66. </a-row>
  67. </a-form>
  68. </div>
  69. <!-- 操作按钮 -->
  70. <div class="table-operator">
  71. <a-button id="productInfoList-add" type="primary" v-if="$hasPermissions('B_productInfo_add')" class="button-error" @click="handleEdit()">新增</a-button>
  72. <a-button
  73. id="productInfoList-batchAudit"
  74. type="primary"
  75. v-if="$hasPermissions('B_productInfo_batchAudit')"
  76. class="button-warning"
  77. :loading="loadingAudit"
  78. @click="handleBatchAudit"
  79. style="margin: 0 15px;">批量审核</a-button>
  80. <a-button
  81. id="productInfoList-batchLaunch"
  82. type="primary"
  83. v-if="$hasPermissions('B_productInfo_batchLaunch')"
  84. class="button-primary"
  85. :loading="loadingLaunch"
  86. @click="handleBatchLaunch"
  87. style="margin: 0 15px;">批量上线</a-button>
  88. <a-button
  89. id="productInfoList-batchDownline"
  90. type="primary"
  91. v-if="$hasPermissions('B_productInfo_batchDownline')"
  92. class="button-grey"
  93. :loading="loadingDownline"
  94. @click="handleBatchDownline"
  95. style="margin: 0 15px;">批量下线</a-button>
  96. <span style="margin-left: 8px" v-if="$hasPermissions('B_productInfo_batchAudit') || $hasPermissions('B_productInfo_batchLaunch') || $hasPermissions('B_productInfo_batchDownline')">
  97. <template v-if="hasSelected">{{ `已选 ${selectedRowKeys.length} 项` }}</template>
  98. </span>
  99. </div>
  100. <s-table
  101. class="sTable fixPagination"
  102. ref="table"
  103. :style="{ height: tableHeight+84.5+'px' }"
  104. size="small"
  105. :row-selection=" showSelect ?{ selectedRowKeys: selectedRowKeys, onChange: onChange, onSelect: onSelectChange, onSelectAll: onSelectAllChange }:null"
  106. :rowKey="(record) => record.id"
  107. :columns="columns"
  108. :data="loadData"
  109. :scroll="{ y: tableHeight }"
  110. :defaultLoadData="false"
  111. bordered>
  112. <!-- 自定义表头 -->
  113. <template slot="arrowFalgTitle">
  114. <a-tooltip placement="top">
  115. <template slot="title">
  116. <span>自有即箭冠产品,非自有即非箭冠产品</span>
  117. </template>
  118. 自有<a-icon type="question-circle" :style="{ marginLeft: '10px' }" />
  119. </a-tooltip>
  120. </template>
  121. <template slot="arrowFalg" slot-scope="text, record">
  122. <span v-if="record.arrowFalg">{{ record.arrowFalg == 1 ? '是' : '否' }}</span>
  123. <span v-else>--</span>
  124. </template>
  125. <!-- 产品分类 -->
  126. <template slot="productType" slot-scope="text, record">
  127. <span v-if="record.productTypeName2 || record.productTypeName3">{{ record.productTypeName2 }} {{ record.productTypeName3 ? '>' : '' }} {{ record.productTypeName3 }}</span>
  128. <span v-else>--</span>
  129. </template>
  130. <!-- 操作 -->
  131. <template slot="action" slot-scope="text, record">
  132. <a-button
  133. size="small"
  134. type="link"
  135. v-if="record.state=='WAIT' && $hasPermissions('B_productInfo_audit')"
  136. class="button-warning"
  137. @click="handleAudit(record)"
  138. id="productInfoList-audit-btn">审核</a-button>
  139. <a-button
  140. size="small"
  141. type="link"
  142. v-if="(record.state=='WAIT_ONLINE'||record.state=='OFFLINE') && $hasPermissions('B_productInfo_launch')"
  143. class="button-primary"
  144. @click="handleLaunch(record)"
  145. id="productInfoList-launch-btn">上线</a-button>
  146. <a-button
  147. size="small"
  148. type="link"
  149. v-if="record.state=='ONLINE' && $hasPermissions('B_productInfo_downline')"
  150. class="button-grey"
  151. @click="handleDownline(record)"
  152. id="productInfoList-downline-btn">下线</a-button>
  153. <a-button
  154. size="small"
  155. type="link"
  156. v-if="$hasPermissions('B_productInfo_edit')"
  157. class="button-info"
  158. @click="handleEdit(record)"
  159. id="productInfoList-edit-btn">编辑</a-button>
  160. <a-button
  161. size="small"
  162. type="link"
  163. v-if="$hasPermissions('B_productInfo_detail')"
  164. class="button-success"
  165. @click="handleDetail(record)"
  166. id="productInfoList-detail-btn">详情</a-button>
  167. <a-button
  168. size="small"
  169. type="link"
  170. v-if="record.state=='WAIT' && $hasPermissions('B_productInfo_del')"
  171. class="button-error"
  172. @click="handleDel(record)"
  173. id="productInfoList-del-btn">删除</a-button>
  174. <span v-if="!(record.state=='WAIT' && $hasPermissions('B_productInfo_audit')) && !((record.state=='WAIT_ONLINE'||record.state=='OFFLINE') && $hasPermissions('B_productInfo_launch')) && !(record.state=='ONLINE' && $hasPermissions('B_productInfo_downline')) && !$hasPermissions('B_productInfo_edit') && !$hasPermissions('B_productInfo_detail') && !(record.state=='WAIT' && $hasPermissions('B_productInfo_del'))">--</span>
  175. </template>
  176. </s-table>
  177. </a-spin>
  178. <!-- 产品详情 -->
  179. <product-info-detail-modal :openModal="openModal" :itemSn="itemSn" @close="closeModal" />
  180. <!-- 产品下线 -->
  181. <product-info-offline-modal :openModal="openOfflineModal" :offlineProductList="offlineProductList" @close="closeOfflineModal" @ok="$refs.table.refresh()" />
  182. </a-card>
  183. </template>
  184. <script>
  185. import moment from 'moment'
  186. import { STable, VSelect } from '@/components'
  187. import productInfoDetailModal from './detailModal.vue'
  188. import productInfoOfflineModal from './offlineModal.vue'
  189. import { productBrandQuery } from '@/api/productBrand'
  190. import { productTypeQueryAll } from '@/api/productType'
  191. import ProductBrand from '@/views/common/productBrand.js'
  192. import { productList, productAudit, productBatchAudit, productDel, productOnline, productBatchOnline, productExport } from '@/api/product'
  193. export default {
  194. components: { STable, VSelect, productInfoDetailModal, productInfoOfflineModal,ProductBrand },
  195. data () {
  196. return {
  197. spinning: false,
  198. advanced: true, // 高级搜索 展开/关闭
  199. tableHeight: 0,
  200. queryParam: { // 查询条件
  201. name: '', // 产品名称
  202. queryWord: '', // 产品编码/原厂编码
  203. productBrandSn: undefined, // 产品品牌
  204. productTypeSn1: '', // 产品一级分类
  205. productTypeSn2: '', // 产品二级分类
  206. productTypeSn3: '', // 产品三级分类
  207. state: undefined, // 产品状态
  208. pricingState: undefined // 定价状态
  209. },
  210. productType: [],
  211. disabled: false, // 查询、重置按钮是否可操作
  212. exportLoading: false,
  213. columns: [
  214. { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
  215. { title: '创建时间', dataIndex: 'createDate',width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
  216. { title: '产品名称', dataIndex: 'name', align: 'center',width: '17%', ellipsis: true, customRender: function (text) { return text || '--' } },
  217. { title: '产品编码', dataIndex: 'code', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
  218. { title: '原厂编码', dataIndex: 'origCode', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
  219. { title: '品牌', dataIndex: 'productBrandName', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
  220. { title: '产品分类', scopedSlots: { customRender: 'productType' }, width: '10%', align: 'center' },
  221. { slots: { title: 'arrowFalgTitle' }, scopedSlots: { customRender: 'arrowFalg' }, width: '6%', align: 'center' },
  222. { title: '最近修改时间', dataIndex: 'updateDate', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
  223. { title: '产品状态', dataIndex: 'stateDictValue',width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
  224. { title: '定价状态', dataIndex: 'pricingStateDictValue', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
  225. { title: '操作', scopedSlots: { customRender: 'action' }, width: '15%', align: 'center', }
  226. ],
  227. selectedRowKeys: [], // Check here to configure the default column
  228. selectedRows: [],
  229. loadingAudit: false,
  230. loadingLaunch: false,
  231. loadingDownline: false,
  232. // 加载数据方法 必须为 Promise 对象
  233. loadData: parameter => {
  234. this.disabled = true
  235. this.spinning = true
  236. return productList(Object.assign(parameter, this.queryParam)).then(res => {
  237. const data = res.data
  238. const no = (data.pageNo - 1) * data.pageSize
  239. for (var i = 0; i < data.list.length; i++) {
  240. data.list[i].no = no + i + 1
  241. }
  242. this.disabled = false
  243. this.spinning = false
  244. return data
  245. })
  246. },
  247. openModal: false, // 查看详情 弹框
  248. itemSn: '', // 当前sn
  249. openOfflineModal: false, // 下线 弹框
  250. offlineProductList: [], // 下线 当前所选数据
  251. productBrandList: [], // 品牌下拉数据
  252. productTypeList: [] // 分类下拉数据
  253. }
  254. },
  255. computed: {
  256. hasSelected () {
  257. return this.selectedRowKeys.length > 0
  258. },
  259. // 是否显示table选择框
  260. showSelect () {
  261. return this.$hasPermissions('B_productInfo_batchAudit') || this.$hasPermissions('B_productInfo_batchLaunch') || this.$hasPermissions('B_productInfo_batchDownline')
  262. }
  263. },
  264. methods: {
  265. onChange (selectedRowKeys, selectedRows) {
  266. this.selectedRowKeys = selectedRowKeys
  267. },
  268. onSelectChange (record, selected, selectedRows, nativeEvent) {
  269. if (selected) { // 选择
  270. this.selectedRows.push(record)
  271. } else { // 取消
  272. this.selectedRows = selectedRows
  273. }
  274. },
  275. // 本页全选/取消全选
  276. onSelectAllChange (selected, selectedRows, changeRows) {
  277. const _this = this
  278. if (selected) { // 选择
  279. this.selectedRows = [...this.selectedRows, ...changeRows]
  280. } else { // 取消
  281. const arrId = []
  282. this.selectedRows.map((item, index) => {
  283. this.selectedRows.map((subItem, ind) => {
  284. if (item.id == subItem.id) {
  285. arrId.push(index)
  286. }
  287. })
  288. })
  289. arrId.map((item, index) => {
  290. _this.selectedRows = _this.selectedRows.slice(item, item + 1)
  291. })
  292. }
  293. },
  294. // 审核
  295. handleAudit (row) {
  296. const _this = this
  297. this.$confirm({
  298. title: '提示',
  299. content: '确认要审核吗?',
  300. centered: true,
  301. onOk () {
  302. _this.spinning = true
  303. productAudit({ sn: row.productSn }).then(res => {
  304. if (res.status == 200) {
  305. _this.$message.success(res.message)
  306. _this.$refs.table.refresh()
  307. _this.spinning = false
  308. } else {
  309. _this.spinning = false
  310. }
  311. })
  312. }
  313. })
  314. },
  315. // 批量审核
  316. handleBatchAudit () {
  317. const _this = this
  318. if (_this.selectedRowKeys.length < 1) {
  319. _this.$message.warning('请在列表勾选后再进行批量操作!')
  320. return
  321. }
  322. let num = 0
  323. const obj = []
  324. _this.selectedRows.map(item => {
  325. if (item.state == 'WAIT') {
  326. num++
  327. obj.push(item.productSn)
  328. }
  329. })
  330. if (num < 1) {
  331. _this.$message.warning('当前数据不可操作!')
  332. return
  333. }
  334. this.$confirm({
  335. title: '提示',
  336. content: '已选有效数据' + num + '条,确认要批量审核吗?',
  337. centered: true,
  338. onOk () {
  339. _this.loadingAudit = true
  340. _this.spinning = true
  341. productBatchAudit(obj).then(res => {
  342. _this.loadingAudit = false
  343. if (res.status == 200) {
  344. _this.selectedRowKeys = []
  345. _this.selectedRows = []
  346. _this.$message.success(res.message)
  347. _this.$refs.table.refresh()
  348. _this.spinning = false
  349. } else {
  350. _this.spinning = false
  351. }
  352. })
  353. }
  354. })
  355. },
  356. // 批量上线
  357. handleBatchLaunch () {
  358. const _this = this
  359. if (_this.selectedRowKeys.length < 1) {
  360. _this.$message.warning('请在列表勾选后再进行批量操作!')
  361. return
  362. }
  363. let num = 0
  364. const obj = []
  365. _this.selectedRows.map(item => {
  366. if (item.state == 'WAIT_ONLINE' || item.state == 'OFFLINE') {
  367. num++
  368. obj.push(item.productSn)
  369. }
  370. })
  371. if (num < 1) {
  372. _this.$message.warning('当前数据不可操作!')
  373. return
  374. }
  375. this.$confirm({
  376. title: '提示',
  377. content: '已选有效数据' + num + '条,确认要批量上线吗?',
  378. centered: true,
  379. onOk () {
  380. _this.loadingLaunch = true
  381. _this.spinning = true
  382. productBatchOnline(obj).then(res => {
  383. _this.loadingLaunch = false
  384. if (res.status == 200) {
  385. _this.selectedRowKeys = []
  386. _this.selectedRows = []
  387. _this.$message.success(res.message)
  388. _this.$refs.table.refresh()
  389. _this.spinning = false
  390. } else {
  391. _this.spinning = false
  392. }
  393. })
  394. }
  395. })
  396. },
  397. // 批量下线
  398. handleBatchDownline () {
  399. const _this = this
  400. if (_this.selectedRowKeys.length < 1) {
  401. _this.$message.warning('请在列表勾选后再进行批量操作!')
  402. return
  403. }
  404. let num = 0
  405. _this.offlineProductList = []
  406. _this.selectedRows.map(item => {
  407. if (item.state == 'ONLINE') {
  408. num++
  409. _this.offlineProductList.push({ productSn: item.productSn, code: item.code, commonProductList: [] })
  410. }
  411. })
  412. if (num < 1) {
  413. _this.$message.warning('当前数据不可操作!')
  414. return
  415. }
  416. this.openOfflineModal = true
  417. },
  418. // 重置
  419. resetSearchForm () {
  420. this.queryParam.name = ''
  421. this.queryParam.queryWord = ''
  422. this.queryParam.productBrandSn = undefined
  423. this.queryParam.productTypeSn1 = ''
  424. this.queryParam.productTypeSn2 = ''
  425. this.queryParam.productTypeSn3 = ''
  426. this.queryParam.state = undefined
  427. this.queryParam.pricingState = undefined
  428. this.productType = []
  429. this.$refs.table.refresh(true)
  430. },
  431. // 新增/编辑
  432. handleEdit (row) {
  433. if (row) { // 编辑
  434. this.$router.push({ path: `/productManagement/productInfo/edit/${row.id}/${row.productSn}` })
  435. } else { // 新增
  436. this.$router.push({ path: '/productManagement/productInfo/add' })
  437. }
  438. },
  439. // 上线
  440. handleLaunch (row) {
  441. const _this = this
  442. this.$confirm({
  443. title: '提示',
  444. content: '确认要上线吗?',
  445. centered: true,
  446. onOk () {
  447. _this.spinning = true
  448. productOnline({ sn: row.productSn }).then(res => {
  449. if (res.status == 200) {
  450. _this.$message.success(res.message)
  451. _this.$refs.table.refresh()
  452. _this.spinning = false
  453. } else {
  454. _this.spinning = false
  455. }
  456. })
  457. }
  458. })
  459. },
  460. // 下线
  461. handleDownline (row) {
  462. this.offlineProductList.push({ productSn: row.productSn, code: row.code, commonProductList: [] })
  463. this.openOfflineModal = true
  464. },
  465. // 删除
  466. handleDel (row) {
  467. const _this = this
  468. this.$confirm({
  469. title: '提示',
  470. content: '确认要删除吗?',
  471. centered: true,
  472. onOk () {
  473. _this.spinning = true
  474. productDel({ sn: row.productSn }).then(res => {
  475. if (res.status == 200) {
  476. _this.$message.success(res.message)
  477. _this.$refs.table.refresh()
  478. _this.spinning = false
  479. } else {
  480. _this.spinning = false
  481. }
  482. })
  483. }
  484. })
  485. },
  486. // 详情
  487. handleDetail (row) {
  488. this.itemSn = row.productSn
  489. this.openModal = true
  490. },
  491. // 关闭弹框
  492. closeModal () {
  493. this.itemSn = ''
  494. this.openModal = false
  495. },
  496. // 关闭下线弹框
  497. closeOfflineModal () {
  498. this.selectedRowKeys = []
  499. this.selectedRows = []
  500. this.offlineProductList = []
  501. this.openOfflineModal = false
  502. },
  503. // 导出
  504. handleExport () {
  505. const _this = this
  506. const params = this.queryParam
  507. this.exportLoading = true
  508. _this.spinning = true
  509. productExport(params).then(res => {
  510. this.exportLoading = false
  511. _this.spinning = false
  512. if (res.type == 'application/json') {
  513. var reader = new FileReader()
  514. reader.addEventListener('loadend', function () {
  515. const obj = JSON.parse(reader.result)
  516. _this.$notification.error({
  517. message: '提示',
  518. description: obj.message
  519. })
  520. })
  521. reader.readAsText(res)
  522. } else {
  523. this.download(res)
  524. }
  525. })
  526. },
  527. download (data) {
  528. if (!data) { return }
  529. const url = window.URL.createObjectURL(new Blob([data]))
  530. const link = document.createElement('a')
  531. link.style.display = 'none'
  532. link.href = url
  533. const a = moment().format('YYYYMMDDHHmmss')
  534. const fname = '产品列表' + a
  535. link.setAttribute('download', fname + '.xlsx')
  536. document.body.appendChild(link)
  537. link.click()
  538. },
  539. // 产品分类 change
  540. changeProductType (val, opt) {
  541. this.queryParam.productTypeSn1 = val[0] ? val[0] : ''
  542. this.queryParam.productTypeSn2 = val[1] ? val[1] : ''
  543. this.queryParam.productTypeSn3 = val[2] ? val[2] : ''
  544. },
  545. // 产品品牌 列表
  546. getProductBrand () {
  547. productBrandQuery({}).then(res => {
  548. if (res.status == 200) {
  549. this.productBrandList = res.data
  550. } else {
  551. this.productBrandList = []
  552. }
  553. })
  554. },
  555. // 产品分类 列表
  556. getProductType () {
  557. productTypeQueryAll({}).then(res => {
  558. if (res.status == 200) {
  559. this.productTypeList = res.data
  560. } else {
  561. this.productTypeList = []
  562. }
  563. })
  564. },
  565. pageInit () {
  566. const _this = this
  567. this.$nextTick(() => { // 页面渲染完成后的回调
  568. _this.setTableH()
  569. })
  570. this.getProductBrand()
  571. this.getProductType()
  572. },
  573. setTableH () {
  574. const tableSearchH = this.$refs.tableSearch.offsetHeight
  575. this.tableHeight = window.innerHeight - tableSearchH - 235
  576. }
  577. },
  578. watch: {
  579. advanced (newValue, oldValue) {
  580. const _this = this
  581. setTimeout(() => {
  582. _this.setTableH()
  583. }, 400)
  584. }
  585. },
  586. mounted () {
  587. if (!this.$store.state.app.isNewTab) { // 页签刷新时调用
  588. this.pageInit()
  589. this.resetSearchForm()
  590. }
  591. },
  592. activated () {
  593. // 如果是新页签打开,则重置当前页面
  594. if (this.$store.state.app.isNewTab) {
  595. this.pageInit()
  596. this.resetSearchForm()
  597. }
  598. },
  599. beforeRouteEnter (to, from, next) {
  600. next(vm => {})
  601. }
  602. }
  603. </script>