Commit d54c180f by 吴娟华

'1.2.1'

1 parent 1ad0ec41
......@@ -39,6 +39,7 @@
:align="item.align||'center'"
:sortable="item.sortable"
:show-overflow-tooltip="true"
:fixed="!!item.fixed"
>
<template slot-scope="scope">
<slot
......@@ -290,7 +291,7 @@ export default {
this.data = data[this.tableParams.listName]
this.total = data.totalElements
this.loading = false
this.$emit('dataFinished');
this.$emit('dataFinished', this.data);
}).catch(() => {
this.loading = false
})
......
<template>
<div>
<el-form :model="ruleForm" :rules="rules" :label-position="labelPosition" :label-width="labelWidth" :size="size" :inline="inline">
<el-form-item v-for="(item, index) in ruleData" :key="index" :label="item.label" :prop="item.prop || ''" :class="item.class" v-show="!item.hidden">
<el-form-item v-for="(item, index) in ruleData" :key="index" :label="item.label" :prop="item.prop || ''" :class="item.class" v-show="!item.hidden" v-loading="item.loading">
<template slot-scope="scope">
<template v-if="item.type === 'input'">
<el-input v-if="item.clickFunc" :type="item.inputText || 'text'" :disabled="item.disabled || false" :readonly="item.readonly || false" :placeholder="item.placeholder || '请输入'" @click.native="item.clickFunc" :class="item.clickFunc ? 'pointer' : ''" :ref="item.ref" v-model="ruleForm[item.prop]" @input="update($event)">
......
......@@ -85,20 +85,25 @@ export default {
tableColumns: [
{
label: '特约店编码',
prop: 'shopCode'
prop: 'shopCode',
fixed: true
}, {
label: '特约店名称',
prop: 'shopName'
prop: 'shopName',
fixed: true
}, {
label: '车型',
prop: 'vehicleTypeName'
prop: 'vehicleTypeName',
fixed: true
}, {
label: '车架号VIN码',
prop: 'vin',
width: 120
width: 120,
fixed: true
}, {
label: '时间',
prop: 'statDate'
prop: 'statDate',
fixed: true
}
]
},
......
......@@ -42,6 +42,7 @@
:beforeSearchFn="beforeSearchFn"
:searchForm="searchDataForm"
:getListApi="getListApi"
@dataFinished="tableDataFinished"
:hasNum="false"
>
</basic-table>
......@@ -85,25 +86,36 @@ export default {
tableColumns: [
{
label: '特约店编码',
prop: 'shopCode'
prop: 'shopCode',
fixed: true
}, {
label: '特约店名称',
prop: 'shopName'
prop: 'shopName',
fixed: true
}, {
label: '车型',
prop: 'modelName'
prop: 'modelName',
fixed: true
}, {
label: '设备号',
prop: 'sn',
width: 80,
fixed: true
}, {
label: '车架号VIN码',
prop: 'vin',
width: 120
}, {
width: 120,
fixed: true
},{
label: '时间',
prop: 'statDate'
prop: 'statDate',
fixed: true
}
]
},
getListApi: getOutStoreList,
date: ''
date: '',
statDate: '',
}
},
mounted() {
......@@ -150,9 +162,12 @@ export default {
url: `${store.state.baseURL}${REPORT_API.REPORT_EXPORT}`,
method: 'GET',
data: this.searchDataForm,
fileName: '导出报表Excel'
fileName: '无在店统计报表'+this.statDate
})
}
},
tableDataFinished(data) {
this.statDate = data[0].statDate
},
},
}
</script>
......
......@@ -14,7 +14,7 @@
label="特约店名称:"
prop="specialShopName"
>
<el-cascader
<!-- <el-cascader
:key="refresh"
ref="specialShopCascader"
v-model="form.specialShopName"
......@@ -27,7 +27,31 @@
size="small"
clearable
:disabled="readonlyStatus"
></el-cascader>
></el-cascader> -->
<el-popover
v-model="filterVisible"
placement="bottom-start"
width="400"
@show="selectStore"
trigger="click">
<div v-loading="loading">
<el-input placeholder="输入关键字进行过滤" v-model="filterText" size="small">
</el-input>
<el-tree style="max-height:50vh;overflow:auto" class="filter-tree" :data="filterTextData" :filter-node-method="filterNode" highlight-current ref="tree" node-key="id" check-on-click-node>
</el-tree>
<p style="text-align: right; margin-top: 10px">
<el-button @click="filterConfirm" type="primary">确定</el-button>
<el-button @click="closeFilter">取消</el-button>
</p>
</div>
<el-input
v-model="form.specialShopName"
:placeholder="form.specialShopName || '请选择特约店名称'"
slot="reference"
>
</el-input>
</el-popover>
</el-form-item>
<el-form-item label="特约店编码:">
<el-input
......@@ -152,6 +176,9 @@
<script>
import { getSpecialShopList } from 'services/vehicle'
import {
getOrgTree,
} from "services/common";
import { getFenceDetailById, saveFence, updateFence } from 'services/specialshop'
import fenceMap from 'components/map/fenceMap.vue'
import mapService from 'utils/mapService.js'
......@@ -284,7 +311,14 @@ export default {
analysisAddress: [
{ validator: checkTransferAddr, trigger: 'change' }
],
}
},
loading: true,
filterVisible: false,
filterText: "",
filterTextData: [],
isOpen: true,
shopNameId: '',
}
},
created() {
......@@ -294,6 +328,51 @@ export default {
this.init();
},
methods: {
selectStore() {
if (this.isReadonly) return;
this.filterText = "";
this.filterDialogTitle = "选择所属组织";
if(!this.filterTextData.length) {
this.getStoreList();
}
//this.closeFilter();
},
closeFilter() {
this.filterVisible = !this.filterVisible;
},
getStoreList() {
let _this = this;
_this.loading = true;
getOrgTree({hasUserLeaf: true}).then((res) => {
const { code, data } = res;
_this.loading = false;
if (code == 200) {
this.filterTextData = data;
}
});
},
filterConfirm() {
const { label, id, origin } = this.$refs.tree.getCurrentNode();
if (origin.type != 'u') {
this.$message({
message: "请选择下级所属组织",
type: "error",
});
return;
}
this.form.specialShopName = label.split('/')[1]
this.form.specialShopCode = label.split('/')[0]
//this.$set(this, "form.specialShopName", label);
this.form.specialShopId = id;
this.closeFilter();
},
filterNode(value, data) {
console.log(value, data);
if (!value) return true;
return data.label.indexOf(value) !== -1;
},
init() {
const { id, readonlyStatus } = this.$route.query;
this.readonlyStatus = readonlyStatus || false;
......
......@@ -726,6 +726,9 @@ ul.choose-list {
border: 1px solid #eee;
padding: 10px;
}
ul.choose-list li{
list-style: none;
}
.choose-list-checkbox {
line-height: 30px;
margin: 0 5px;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!