Commit dd3861db by 胡悦

修复bug

1 parent 6237196c
...@@ -24,6 +24,15 @@ const routes = [ ...@@ -24,6 +24,15 @@ const routes = [
} }
}, },
{ {
path: '/otherTodo',
name: 'otherTodo',
component: () => import('../views/toDo/otherToDo/index.vue'),
meta: {
title: '待办列表',
keepAlive: true
}
},
{
path: '/vehicleManage', path: '/vehicleManage',
name: 'vehicleManage', name: 'vehicleManage',
component: () => import('../views/vehicleManage/index.vue'), component: () => import('../views/vehicleManage/index.vue'),
......
<template>
<div class="system-container">
<div class="container">
<search-form
class="searchTop border-shadow"
:formModel="searchForm"
:formList="todoFormList"
>
<span
class="inline-b"
slot="form-slot"
>
<el-button
type="primary"
:size="btn_size"
icon="el-icon-search"
:id="todoTableParams.btnId"
>搜索</el-button>
<el-button
type="primary"
:size="btn_size"
icon="el-icon-refresh"
@click="refresh"
>重置</el-button>
</span>
</search-form>
<basic-table
ref="todoTable"
:tableParams="todoTableParams"
:getListApi="getListApi"
:searchForm="searchForm"
:hasNum="false"
>
<span
slot="status"
slot-scope="scope"
>
<span
class="dot"
:class="scope.scope.enableStatus ? USERSTATUS[scope.scope.enableStatus].split(',')[1] : ''"
></span>
<span class="statusText">{{ scope.scope.enableStatus ? USERSTATUS[scope.scope.enableStatus].split(',')[0] : '--'}}</span>
</span>
<span
slot="table-button"
slot-scope="scope"
>
<el-button
v-if="scope.scope.status == 1"
type="text"
@click="btnClick('todo', scope.scope)"
>
待办处理
</el-button>
</span>
</basic-table>
</div>
</div>
</template>
<script>
import { getTodoList } from 'services/approval'
export default {
data() {
return {
searchForm: { status: 1 },
ITEMTYPE: this.$Constants.ITEM_TYPE,
todoFormList: [
{
type: 'select',
prop: 'status',
placeholder: '请选择',
options: [{
label: '全部待办',
value: ''
}, {
label: '未处理',
value: 1
}, {
label: '已处理',
value: 2
}]
},
{
type: 'select',
prop: 'busType',
placeholder: '请选择',
options: [{
label: '全部类型',
value: ''
}, {
label: '试驾围栏修改审核',
value: 1
}, {
label: '上牌资料审核',
value: 2
}]
}
],
todoTableParams: {
btnId: new Date().getTime() + parseInt(Math.random() * 1000),
listName: 'list',
tableOption: true,
tableColumns: [
{
label: '事项类型',
prop: 'busType'
}, {
label: '创建人',
prop: 'username'
}, {
label: '车辆类型',
prop: '',
formatter: (cellValue) => {
return '试乘试驶车'
}
}, {
label: '创建时间',
prop: 'createdDate'
}
]
},
getListApi: getTodoList
}
},
methods: {
refresh() {
this.searchForm = { status: 1 }
this.$refs.todoTable.refreshTable()
},
btnClick(type, scope) {
switch (type) {
case 'todo':
// 跳转
console.log(scope)
const path = '/oEshield#/monitor/fenceManagement';
if (scope.bizType == 1) history.pushState(null, path, path)
else if (scope.bizType == 2) this.$router.push({ name: 'vehicleSubmit', params: { approvalId: scope.approvalId, url: 'check' } })
break
}
}
},
}
</script>
<style>
</style>
\ No newline at end of file \ No newline at end of file
...@@ -308,7 +308,7 @@ export default { ...@@ -308,7 +308,7 @@ export default {
vehicleVisible: false, vehicleVisible: false,
vehicleTitle: '', vehicleTitle: '',
vehicleForm: {}, vehicleForm: {},
vehicleArr: ['shopName', 'vin', 'modelId', 'configId', 'licensePlate', 'color', 'innerColor', 'serveType', 'sn'], vehicleArr: ['shopName', 'vin', 'modelId', 'modelName', 'configId', 'licensePlate', 'color', 'innerColor', 'serveType', 'sn'],
vehicleData: [ vehicleData: [
{ label: '特约店名称:', prop: 'shopName', type: 'input', readonly: true, clickFunc: this.selectStore }, { label: '特约店名称:', prop: 'shopName', type: 'input', readonly: true, clickFunc: this.selectStore },
{ label: '车架号:', prop: 'vin', type: 'input', maxlength: '17', clearable: true }, { label: '车架号:', prop: 'vin', type: 'input', maxlength: '17', clearable: true },
...@@ -317,7 +317,7 @@ export default { ...@@ -317,7 +317,7 @@ export default {
{ label: '车牌:', prop: 'licensePlate', type: 'input', clearable: true }, { label: '车牌:', prop: 'licensePlate', type: 'input', clearable: true },
{ label: '外色:', prop: 'color', type: 'input', clearable: true }, { label: '外色:', prop: 'color', type: 'input', clearable: true },
{ label: '内色:', prop: 'innerColor', type: 'input', clearable: true }, { label: '内色:', prop: 'innerColor', type: 'input', clearable: true },
{ label: '服役类型:', prop: 'serveType', type: 'select', options: [{ label: '未上牌', value: 0 }, { label: '已上牌', value: 1 }], clearable: true }, { label: '服役类型:', prop: 'serveType', type: 'select', options: [{ label: '未上牌', value: '0' }, { label: '已上牌', value: '1' }], clearable: true },
{ label: '设备号:', prop: 'sn', type: 'input', maxlength: 15, clearable: true } { label: '设备号:', prop: 'sn', type: 'input', maxlength: 15, clearable: true }
], ],
vehicleDefalutData: [ vehicleDefalutData: [
...@@ -328,7 +328,7 @@ export default { ...@@ -328,7 +328,7 @@ export default {
{ label: '车牌:', prop: 'licensePlate', type: 'input', clearable: true }, { label: '车牌:', prop: 'licensePlate', type: 'input', clearable: true },
{ label: '外色:', prop: 'color', type: 'input', clearable: true }, { label: '外色:', prop: 'color', type: 'input', clearable: true },
{ label: '内色:', prop: 'innerColor', type: 'input', clearable: true }, { label: '内色:', prop: 'innerColor', type: 'input', clearable: true },
{ label: '服役类型:', prop: 'serveType', type: 'select', options: [{ label: '未上牌', value: 0 }, { label: '已上牌', value: 1 }], clearable: true }, { label: '服役类型:', prop: 'serveType', type: 'select', options: [{ label: '未上牌', value: '0' }, { label: '已上牌', value: '1' }], clearable: true },
{ label: '设备号:', prop: 'sn', type: 'input', maxlength: 15, clearable: true } { label: '设备号:', prop: 'sn', type: 'input', maxlength: 15, clearable: true }
], ],
vehicleRules: { vehicleRules: {
...@@ -408,7 +408,8 @@ export default { ...@@ -408,7 +408,8 @@ export default {
const { code, data } = res const { code, data } = res
if (code == 200) { if (code == 200) {
this.vehicleArr.forEach(item => { this.vehicleArr.forEach(item => {
this.$set(this.vehicleForm, item, data[item]) if (item == 'serveType') this.$set(this.vehicleForm, item, data[item] + '')
else this.$set(this.vehicleForm, item, data[item])
}) })
this.vehicleForm.tempId = data.id this.vehicleForm.tempId = data.id
} }
...@@ -424,7 +425,8 @@ export default { ...@@ -424,7 +425,8 @@ export default {
const { code, data } = res const { code, data } = res
if (code == 200) { if (code == 200) {
this.vehicleArr.forEach(item => { this.vehicleArr.forEach(item => {
this.$set(this.vehicleForm, item, data[item]) if (item == 'serveType') this.$set(this.vehicleForm, item, data[item] + '')
else this.$set(this.vehicleForm, item, data[item])
}) })
} }
}) })
...@@ -501,13 +503,14 @@ export default { ...@@ -501,13 +503,14 @@ export default {
handleConfirm(type) { handleConfirm(type) {
switch (type) { switch (type) {
case 'create': case 'create':
console.log(this.vehicleForm) console.log(this.vehicleForm, this.vehicleData)
this.$refs.vehicleRuleForm.$children[0].validate((valid) => { this.$refs.vehicleRuleForm.$children[0].validate((valid) => {
console.log(valid, this.$refs.vehicleRuleForm) console.log(valid, this.$refs.vehicleRuleForm)
if (valid) { if (valid) {
let params = _.cloneDeep(this.vehicleForm) let params = _.cloneDeep(this.vehicleForm)
const { modelId, configId } = params const { modelId, configId } = params
params.modelName = this.vehicleData.find(item => item.prop == 'modelId').options.find(j => j.id == modelId).dictLabel if (this.vehicleData.find(item => item.prop == 'modelId').options.find(j => j.id == modelId)) params.modelName = this.vehicleData.find(item => item.prop == 'modelId').options.find(j => j.id == modelId).dictLabel
// else params.modelName = modelId
params.configDesc = this.vehicleData.find(item => item.prop == 'configId').options.find(j => j.id == configId).dictLabel params.configDesc = this.vehicleData.find(item => item.prop == 'configId').options.find(j => j.id == configId).dictLabel
let api = addVehicle let api = addVehicle
if (params.tempId) api = editVehicle if (params.tempId) api = editVehicle
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!