|
@@ -10,24 +10,24 @@
|
|
|
placeholder="输入区间站场名称"
|
|
placeholder="输入区间站场名称"
|
|
|
/>
|
|
/>
|
|
|
</a-form-item>
|
|
</a-form-item>
|
|
|
|
|
+ <a-form-item>
|
|
|
|
|
+ <j-list-select-tag
|
|
|
|
|
+ v-model="queryParam.lineId"
|
|
|
|
|
+ style="width: 150px"
|
|
|
|
|
+ placeholder="选择线路"
|
|
|
|
|
+ dict-code="line"
|
|
|
|
|
+ />
|
|
|
|
|
+ </a-form-item>
|
|
|
<a-form-item>
|
|
<a-form-item>
|
|
|
<a-tree-select
|
|
<a-tree-select
|
|
|
- v-model="queryParam.deptId"
|
|
|
|
|
|
|
+ v-model="deptId"
|
|
|
style="width: 150px"
|
|
style="width: 150px"
|
|
|
:show-search="true"
|
|
:show-search="true"
|
|
|
allow-clear
|
|
allow-clear
|
|
|
placeholder="选择车间"
|
|
placeholder="选择车间"
|
|
|
:tree-data="treeData"
|
|
:tree-data="treeData"
|
|
|
tree-node-filter-prop="label"
|
|
tree-node-filter-prop="label"
|
|
|
- :replace-fields="{children:'children', title:'label', key:'id', value: 'id' }"
|
|
|
|
|
- />
|
|
|
|
|
- </a-form-item>
|
|
|
|
|
- <a-form-item>
|
|
|
|
|
- <j-list-select-tag
|
|
|
|
|
- v-model="queryParam.lineId"
|
|
|
|
|
- style="width: 150px"
|
|
|
|
|
- placeholder="选择线别"
|
|
|
|
|
- dict-code="line"
|
|
|
|
|
|
|
+ :replace-fields="{children:'children', title:'deptName', key:'deptId', value: 'deptId' }"
|
|
|
/>
|
|
/>
|
|
|
</a-form-item>
|
|
</a-form-item>
|
|
|
<a-form-item>
|
|
<a-form-item>
|
|
@@ -69,13 +69,13 @@
|
|
|
<a-dropdown v-if="selectedRowKeys.length > 0">
|
|
<a-dropdown v-if="selectedRowKeys.length > 0">
|
|
|
<a-menu slot="overlay">
|
|
<a-menu slot="overlay">
|
|
|
<a-menu-item key="1" @click="batchDel">
|
|
<a-menu-item key="1" @click="batchDel">
|
|
|
- <a-icon type="delete"/>
|
|
|
|
|
|
|
+ <a-icon type="delete" />
|
|
|
删除
|
|
删除
|
|
|
</a-menu-item>
|
|
</a-menu-item>
|
|
|
</a-menu>
|
|
</a-menu>
|
|
|
<a-button style="margin-left: 8px">
|
|
<a-button style="margin-left: 8px">
|
|
|
批量操作
|
|
批量操作
|
|
|
- <a-icon type="down"/>
|
|
|
|
|
|
|
+ <a-icon type="down" />
|
|
|
</a-button>
|
|
</a-button>
|
|
|
</a-dropdown>
|
|
</a-dropdown>
|
|
|
</div>
|
|
</div>
|
|
@@ -83,8 +83,8 @@
|
|
|
<!-- table区域-begin -->
|
|
<!-- table区域-begin -->
|
|
|
<div>
|
|
<div>
|
|
|
<div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
|
|
<div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
|
|
|
- <i class="anticon anticon-info-circle ant-alert-icon"/> 已选择 <a style="font-weight: 600">{{
|
|
|
|
|
- selectedRowKeys.length }}</a>项
|
|
|
|
|
|
|
+ <i class="anticon anticon-info-circle ant-alert-icon" /> 已选择 <a style="font-weight: 600">{{
|
|
|
|
|
+ selectedRowKeys.length }}</a>项
|
|
|
<a style="margin-left: 24px" @click="onClearSelected">清空</a>
|
|
<a style="margin-left: 24px" @click="onClearSelected">清空</a>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
@@ -102,8 +102,8 @@
|
|
|
>
|
|
>
|
|
|
<template slot="deptName" slot-scope="text, record">
|
|
<template slot="deptName" slot-scope="text, record">
|
|
|
<span v-for="(item, index) in record['deptStations']">
|
|
<span v-for="(item, index) in record['deptStations']">
|
|
|
- <span v-if="record['deptStations'].length -1 != index"> {{item.deptName || item.deptId}} ,</span>
|
|
|
|
|
- <span v-else>{{item.deptName || item.deptId}} </span>
|
|
|
|
|
|
|
+ <span v-if="record['deptStations'].length -1 != index"> {{ item.deptName || item.deptId }} ,</span>
|
|
|
|
|
+ <span v-else>{{ item.deptName || item.deptId }} </span>
|
|
|
</span>
|
|
</span>
|
|
|
</template>
|
|
</template>
|
|
|
<template slot="lineName" slot-scope="text, record">
|
|
<template slot="lineName" slot-scope="text, record">
|
|
@@ -113,7 +113,7 @@
|
|
|
<a-button size="small" type="primary" @click="handleEdit(record)">
|
|
<a-button size="small" type="primary" @click="handleEdit(record)">
|
|
|
编辑
|
|
编辑
|
|
|
</a-button>
|
|
</a-button>
|
|
|
- <a-divider type="vertical"/>
|
|
|
|
|
|
|
+ <a-divider type="vertical" />
|
|
|
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.stationId)">
|
|
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.stationId)">
|
|
|
<a-button size="small" type="danger">
|
|
<a-button size="small" type="danger">
|
|
|
删除
|
|
删除
|
|
@@ -121,53 +121,69 @@
|
|
|
</a-popconfirm>
|
|
</a-popconfirm>
|
|
|
</span>
|
|
</span>
|
|
|
</a-table>
|
|
</a-table>
|
|
|
- <check-and-edit-model ref="modalForm" @ok="modalFormOk"/>
|
|
|
|
|
|
|
+ <check-and-edit-model ref="modalForm" @ok="modalFormOk" />
|
|
|
</div>
|
|
</div>
|
|
|
<!-- table区域-end -->
|
|
<!-- table区域-end -->
|
|
|
<!-- 表单区域 -->
|
|
<!-- 表单区域 -->
|
|
|
</el-card>
|
|
</el-card>
|
|
|
</template>
|
|
</template>
|
|
|
<script>
|
|
<script>
|
|
|
- import {listMixin} from '@/mixin/listMixin'
|
|
|
|
|
- import columns from './indexColumns'
|
|
|
|
|
- import CheckAndEditModel from './CheckAndEditModel'
|
|
|
|
|
- import {getAction} from "@/api/request";
|
|
|
|
|
|
|
+import { listMixin } from '@/mixin/listMixin'
|
|
|
|
|
+import columns from './indexColumns'
|
|
|
|
|
+import CheckAndEditModel from './CheckAndEditModel'
|
|
|
|
|
+import { getAction } from '@/api/request'
|
|
|
|
|
|
|
|
- export default {
|
|
|
|
|
- components: {
|
|
|
|
|
- CheckAndEditModel
|
|
|
|
|
- },
|
|
|
|
|
- mixins: [listMixin],
|
|
|
|
|
- data() {
|
|
|
|
|
- return {
|
|
|
|
|
- // 查询条件
|
|
|
|
|
- queryParam: {},
|
|
|
|
|
- // 表头
|
|
|
|
|
- columns: columns(this),
|
|
|
|
|
- treeData: [],
|
|
|
|
|
- url: {
|
|
|
|
|
- list: '/business/catenary/bus/station/list',
|
|
|
|
|
- delete: '/business/catenary/bus/station/',
|
|
|
|
|
- exportXlsUrl: '/exportXlsUrl',
|
|
|
|
|
- tree: '/system/dept/treeSelect',
|
|
|
|
|
- importExcelUrl: `${process.env.VUE_APP_BASE_API}/importExcelUrl`
|
|
|
|
|
- }
|
|
|
|
|
|
|
+export default {
|
|
|
|
|
+ components: {
|
|
|
|
|
+ CheckAndEditModel
|
|
|
|
|
+ },
|
|
|
|
|
+ mixins: [listMixin],
|
|
|
|
|
+ data() {
|
|
|
|
|
+ return {
|
|
|
|
|
+ // 查询条件
|
|
|
|
|
+ deptId: undefined,
|
|
|
|
|
+ queryParam: {},
|
|
|
|
|
+ // 表头
|
|
|
|
|
+ columns: columns(this),
|
|
|
|
|
+ treeData: [],
|
|
|
|
|
+ url: {
|
|
|
|
|
+ list: '/business/catenary/bus/station/list',
|
|
|
|
|
+ delete: '/business/catenary/bus/station/',
|
|
|
|
|
+ exportXlsUrl: '/exportXlsUrl',
|
|
|
|
|
+ tree: '/business/catenary/bus/line/getDeptByLineId/',
|
|
|
|
|
+ importExcelUrl: `${process.env.VUE_APP_BASE_API}/importExcelUrl`
|
|
|
}
|
|
}
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ watch: {
|
|
|
|
|
+ deptId(val) {
|
|
|
|
|
+ this.queryParam.deptId = val
|
|
|
},
|
|
},
|
|
|
- created() {
|
|
|
|
|
- this.loadTree()
|
|
|
|
|
- },
|
|
|
|
|
- methods: {
|
|
|
|
|
- loadTree() {
|
|
|
|
|
- this.treeData = []
|
|
|
|
|
- getAction(this.url.tree).then((res) => {
|
|
|
|
|
- if (res.code === 200) {
|
|
|
|
|
- this.treeData = res.data
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ 'queryParam.lineId': {
|
|
|
|
|
+ handler: function(newV, oldV) {
|
|
|
|
|
+ if (newV) {
|
|
|
|
|
+ this.loadTree(newV)
|
|
|
|
|
+ }
|
|
|
|
|
+ this.$nextTick(() => {
|
|
|
|
|
+ this.queryParam.deptId = undefined
|
|
|
|
|
+ this.deptId = undefined
|
|
|
})
|
|
})
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+ },
|
|
|
|
|
+ created() {
|
|
|
|
|
+ },
|
|
|
|
|
+ methods: {
|
|
|
|
|
+ loadTree(lineId) {
|
|
|
|
|
+ this.treeData = []
|
|
|
|
|
+ getAction(this.url.tree + lineId).then((res) => {
|
|
|
|
|
+ if (res.code === 200) {
|
|
|
|
|
+ this.treeData = res.rows
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
|
|
+}
|
|
|
</script>
|
|
</script>
|
|
|
<style scoped>
|
|
<style scoped>
|
|
|
@import '~@/assets/less/common.less'
|
|
@import '~@/assets/less/common.less'
|