Commit b36a4e46 by 吴娟华

'1.2.1'

1 parent 9d5f0e8e
......@@ -104,7 +104,7 @@ export default {
},
methods: {
selectChange(val,item) {
//console.log(item)
console.log(val,item)
if(item.selectChange){
item.selectChange(val,item);
}
......
......@@ -11,6 +11,7 @@
v-for="(item, index) in formList"
:key="index"
:label="item.label || ''"
:class="item.class||''"
>
<template>
<template v-if="item.type === 'input'">
......
......@@ -162,7 +162,7 @@ export default {
url: `${store.state.baseURL}${REPORT_API.REPORT_EXPORT}`,
method: 'GET',
data: this.searchDataForm,
fileName: '无在店统计报表'+this.statDate
fileName: '无在店统计报表'+moment().format('YYYY.MM.DD')
})
},
tableDataFinished(data) {
......
......@@ -407,8 +407,13 @@ export default {
},
watch: {
filterText(val) {
this.$refs.tree.filter(val);
},
this._timeout && clearTimeout(this._timeout)
this._timeout = setTimeout(()=>{
this.$refs.tree.filter(val)
},500)
}
},
mounted() {
this.getModels();
......
......@@ -195,7 +195,7 @@
class="choose-list-checkbox"
>
<div class="choose-list-content">
<p>{{ item.name }}/{{ item.vin }}</p>
<p>{{ item.ownerName }}/{{ item.vin }}</p>
<p class="choose-list-group">
<el-tag
type="info"
......@@ -218,7 +218,7 @@
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="sure" size="small">确认</el-button>
<el-button @click="$emit('onUserListModalChange', false)" size="small"
<el-button @click="closeDialog" size="small"
>取消</el-button
>
</div>
......@@ -246,6 +246,9 @@ import {
listtestdrive,
getSpecialShopList,
} from "services/vehicle";
import {
getOrgTree,
} from "services/common";
export default {
props: ["userListModalVisible", "userData", "init"],
data() {
......@@ -374,7 +377,10 @@ export default {
}
},
filterText(val) {
this.$refs.tree.filter(val);
this._timeout && clearTimeout(this._timeout)
this._timeout = setTimeout(()=>{
this.$refs.tree.filter(val)
},500)
},
},
methods: {
......@@ -396,7 +402,7 @@ export default {
console.log(obj)
});
this.$emit("onUpdateUserData", userdata);
this.$emit("onUserListModalChange", false);
this.closeDialog()
this.checkedCancel = true
},
search() {
......@@ -641,7 +647,7 @@ export default {
getStoreList() {
let _this = this;
_this.loading = true;
getSpecialShopList().then((res) => {
getOrgTree({hasUserLeaf: true}).then((res) => {
const { code, data } = res;
_this.loading = false;
if (code == 200) {
......
......@@ -37,7 +37,7 @@
<el-col :span="20">
<el-row v-for="(item, index) in snForm.deviceArr" :key="index">
<i @click="removeDevice(index)" class="el-icon-remove-outline" style="position: absolute;font-size: 20px; margin-left:20px; line-height:30px;"></i>
<i v-show="!isViewMode" @click="removeDevice(index)" class="el-icon-remove-outline" style="position: absolute;font-size: 20px; margin-left:20px; line-height:30px;"></i>
<el-col :span="12">
<el-form-item
label="设备SN号"
......@@ -54,17 +54,17 @@
</el-row>
</el-col>
<el-col :span="4">
<i @click="addDevice" class="el-icon-circle-plus-outline" style="font-size: 20px; margin-left:20px; line-height:30px;"></i>
<i v-show="!isViewMode" @click="addDevice" class="el-icon-circle-plus-outline" style="font-size: 20px; margin-left:20px; line-height:30px;"></i>
</el-col>
</el-row>
</el-form>
<rule-form :ruleForm="vehicleForm" :rules="vehicleRules" :ruleData="vehicleData" :labelWidth="'140px'" ref='vehicleRuleForm'></rule-form>
<el-row>
<el-col :span="24">
<el-form label-width="120px" style="min-height:20px" v-loading="freqLoading" >
<el-form-item label="操作日志" v-show="freqTableData.length">
<table class="freq_table">
<tr>
<el-form label-width="120px">
<el-form-item label="操作日志" v-show="isViewMode">
<table class="freq_table" v-loading="freqLoading" style="min-height: 40px">
<tr v-show="freqTableData.length">
<th width="80">调频时间</th>
<th width="80">调频模式</th>
<th width="100">上点频次</th>
......@@ -89,6 +89,9 @@
</el-row>
</div>
</slot>
<!-- <template v-slot:btn-front>
<el-button type="primary" @click="gotoMonitor()" size="small">监控</el-button>
</template> -->
</basic-dialog>
<!-- 导入 -->
<basic-dialog :title="importTitle" :isVisible="vehicleImport" @confirmDialog="handleConfirm('import')" @closeDialog="handleClose('import')">
......@@ -231,11 +234,12 @@ export default {
value: '0'
}]
},
{
/* {
label: "设备状态",
type: 'select',
prop: 'deviceState',
placeholder: '请选择',
class: 'unvisible',
options: [{
label: '全部',
value: ''
......@@ -252,7 +256,7 @@ export default {
label: '在线',
value: '3'
}]
},
}, */
{
label: '激活时间',
type: 'daterange',
......@@ -722,12 +726,19 @@ export default {
vehicleListPromise: null,
isCreateMode: false,
freqLoading: false,
isViewMode: false,
};
},
watch: {
filterText(val) {
this.$refs.tree.filter(val);
},
this._timeout && clearTimeout(this._timeout)
this._timeout = setTimeout(()=>{
this.$refs.tree.filter(val)
},500)
}
},
created() {
this.vehicleListPromise = new Promise((resolve, reject)=>{
......@@ -780,6 +791,7 @@ export default {
this.isReadonly = false;
this.isCreateMode = true
this.freqLoading = false
this.isViewMode = false
this.vehicleListPromise.then(()=>{
if (this.vehicleVisible) {
let _list = _.cloneDeep(this.vehicleDefalutData);
......@@ -815,6 +827,7 @@ export default {
this.formLoading = true
this.isCreateMode = false
this.freqLoading = false
this.isViewMode = false
this.vehicleListPromise.then(()=>{
if (this.vehicleVisible) {
//let _list = this.vehicleDefalutData;
......@@ -824,10 +837,13 @@ export default {
getVehicleInfo({ id: scope.id }).then((res) => {
const { code, data } = res;
if (code == 200) {
//动态创建车系、车型选择框
let _list = this.creatSelect(data);
_list.map((k) => {console.log(k.prop)
if (k.prop === "vin" || k.prop == "organizationName") {
if (k.prop === "vin" || k.prop == "organizationName" || k.prop == "licensePlate") {
this.$set(k, "disabled", true);
}else{
if(k.prop == 'brandId') {
......@@ -838,12 +854,18 @@ export default {
});
this.vehicleData = _.cloneDeep(_list);
this.vehicleArr.forEach((item) => {
if (item == "serveType")
if (item == "serveType"){
this.$set(this.vehicleForm, item, data[item] + "");
else this.$set(this.vehicleForm, item, data[item]);
}else {
this.$set(this.vehicleForm, item, data[item]);
if(item == 'brandId') {
this.changeCarBrand(data.brandId, true)
}
}
});
this.vehicleForm.id = scope.id;
this.snForm.deviceArr = data.deviceInfoDtos.map((item, i)=>{
//this.snRules['device'+i] = this.snRules['device0']
......@@ -866,14 +888,17 @@ export default {
this.vehicleVisible = !this.vehicleVisible;
this.isReadonly = true;
this.isCreateMode = false
this.isViewMode = true
this.vehicleListPromise.then(()=>{
if (this.vehicleVisible) {
getVehicleInfo({ id: scope.id }).then((res) => {
const { code, data } = res;
if (code == 200) {
//动态创建车系、车型选择框
let _list = this.creatSelect(data);
_list.map((k) => {
this.$set(k, "disabled", true);
if(k.prop == 'brandId') {
......@@ -883,9 +908,14 @@ export default {
this.vehicleData = _.cloneDeep(_list);
this.vehicleArr.forEach((item) => {
if (item == "serveType")
if (item == "serveType"){
this.$set(this.vehicleForm, item, data[item] + "");
else this.$set(this.vehicleForm, item, data[item]);
}else {
this.$set(this.vehicleForm, item, data[item]);
if(item == 'brandId') {
this.changeCarBrand(data.brandId, 'view')
}
}
});
this.snForm.deviceArr = data.deviceInfoDtos.map((item, i)=>{
......@@ -1249,7 +1279,7 @@ export default {
},
// 监听车型选择
changeCarBrand(e) {
changeCarBrand(e, flag) {
let list = this.vehicleDefalutData;
let m = this.vehicleList;
let o = m.find((k) => k.id == e);
......@@ -1274,8 +1304,35 @@ export default {
} else {
list.splice(idx + 1, 0, n);
}
if(flag) {
let row = list.find((item)=>item.prop === 'seriesId')
setTimeout(()=>{
let id = this.vehicleForm.typeId
this.changeCarModel(this.vehicleForm.seriesId, row)
this.vehicleForm.typeId = id
},500)
}
list.map((k) => {
if(flag == 'view') {
this.$set(k, "disabled", true);
}else if(!this.isCreateMode){
if (k.prop === "vin" || k.prop == "organizationName" || k.prop == "licensePlate") {
this.$set(k, "disabled", true);
}else{
this.$set(k, "disabled", false);
}
}else{
this.$set(k, "disabled", false);
}
});
this.$set(this, "vehicleDefalutData", list);
this.vehicleData = _.cloneDeep(list);
delete this.vehicleForm.seriesId;
delete this.vehicleForm.typeId;
},
......@@ -1315,13 +1372,24 @@ export default {
} else {
list.splice(idx + 1, 0, n);
}
list.map((k) => {
if(k.prop === 'typeId') {
if(this.isViewMode){
this.$set(k, 'disabled', true)
}else{
this.$set(k, 'disabled', false)
}
}
});
this.$set(this, "vehicleDefalutData", list);
this.vehicleData = _.cloneDeep(list);
delete this.vehicleForm.typeId;
},
// 动态创建选择框
creatSelect(data) {
creatSelect(data) {console.log(data)
let nList = this.vehicleList;
let _list = _.cloneDeep(this.vehicleDefalutData);
//动态创建车系、车型选择框
......@@ -1381,6 +1449,9 @@ export default {
} else {
_list.splice(idx + 2, 0, _models);
}
//this.changeCarBrand(data.brandId)
//this.changeCarModel(data.seriesId, _series)
}
return _list;
......@@ -1405,6 +1476,21 @@ export default {
FreqModalChange(isOpen){
this.freqVisible = isOpen;
},
gotoMonitor() {
console.log(this.vehicleForm)
/* let snO = {
name: this.vehicleForm.name,
standNo: this.vehicleForm.vin,
sn: this.vehicleForm.trackInfo.sn,
sourceType: this.vehicleForm.trackInfo.source === 0?'无线':'有线',
source: this.vehicleForm.trackInfo.source
}
//this.$router.push({ name: 'monitor', params: { snArr: [snO], mode: 'monitor' }})
let routeData = this.$router.resolve({ path: 'oEshield#/monitor/monitor', query: { snArr: JSON.stringify([snO]), mode: 'monitor' }});
// window.open(routeData.href, '_blank');
location.href = routeData.href */
}
},
components: {
......@@ -1442,4 +1528,7 @@ export default {
padding: 2px;
text-align: center;
}
.unvisible{
visibility: hidden;
}
</style>
\ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!