Commit 69ef9128 authored by mzx's avatar mzx

Merge branch 'develop' of http://gitlab.91isoft.com:90/car-test/web into mengzixuan

parents 7f88683b 4d14fce1
...@@ -67,3 +67,7 @@ nums ...@@ -67,3 +67,7 @@ nums
assigin assigin
metas metas
rachange rachange
chexing
wendang
Chexingdialog
Wendangdialog
\ No newline at end of file
...@@ -95,9 +95,11 @@ module.exports = [ ...@@ -95,9 +95,11 @@ module.exports = [
}, },
{ {
url: '/rules-list', url: '/rules-list',
type: 'get', type: 'post',
response: config => { response: config => {
const query = config.query const query = config.body
console.log('config');
console.log(config);
let temp = [] let temp = []
if (query.type === '1' || query.type === '2') { if (query.type === '1' || query.type === '2') {
temp = [ temp = [
......
...@@ -53,12 +53,20 @@ ...@@ -53,12 +53,20 @@
clearable clearable
/> />
</el-form-item> </el-form-item>
<el-form-item label="关联场景" prop="status"> <el-form-item label="关联场景">
<br /> <br />
<template v-for="(item, key) in model.scene"> <div v-for="(item, key) in model.scene" :key="key">
<el-row :key="key" class="mb10" :gutter="20"> <el-row class="mb10" :gutter="20">
<el-col :span="22"> <el-col :span="22" class="mt10">
<el-input v-model="model.text" placeholder="请输入" clearable /> <el-form-item
label=""
:prop="'scene.' + key + '.text'"
:rules="[
{ required: true, message: '请输入', trigger: 'blur' }
]"
>
<el-input v-model="item.text" placeholder="请输入" clearable />
</el-form-item>
</el-col> </el-col>
<el-col :span="2"> <el-col :span="2">
<template v-if="key === 0"> <template v-if="key === 0">
...@@ -69,17 +77,9 @@ ...@@ -69,17 +77,9 @@
</template> </template>
</el-col> </el-col>
</el-row> </el-row>
</template> </div>
</el-form-item> </el-form-item>
</el-form> </el-form>
<detail-select
:dialog-manger="detailManger"
@close="detailManger.dialogVisible = false"
></detail-select>
<point-select
:dialog-manger="pointManger"
@close="pointManger.dialogVisible = false"
></point-select>
<div slot="footer"> <div slot="footer">
<el-button @click="handleClose()"> 取消 </el-button> <el-button @click="handleClose()"> 取消 </el-button>
<el-button type="primary" @click="handleConfirm()"> 保存 </el-button> <el-button type="primary" @click="handleConfirm()"> 保存 </el-button>
...@@ -94,7 +94,7 @@ export default { ...@@ -94,7 +94,7 @@ export default {
default() { default() {
return { return {
dialogVisible: false, dialogVisible: false,
source: {} dialogEditId: null
} }
} }
} }
...@@ -109,11 +109,6 @@ export default { ...@@ -109,11 +109,6 @@ export default {
} }
] ]
}, },
sceneManger: {
dialogVisible: false,
refreshList: false,
source: {}
},
rules: { rules: {
status: [ status: [
{ required: true, message: '菜单名称不能为空', trigger: 'blur' } { required: true, message: '菜单名称不能为空', trigger: 'blur' }
...@@ -122,21 +117,13 @@ export default { ...@@ -122,21 +117,13 @@ export default {
{ required: true, message: '菜单顺序不能为空', trigger: 'blur' } { required: true, message: '菜单顺序不能为空', trigger: 'blur' }
], ],
path: [{ required: true, message: '路由地址不能为空', trigger: 'blur' }] path: [{ required: true, message: '路由地址不能为空', trigger: 'blur' }]
},
detailManger: {
dialogVisible: false,
refreshList: false
},
pointManger: {
dialogVisible: false,
refreshList: false
} }
} }
}, },
computed: { computed: {
modelTitle() { modelTitle() {
return this.dialogManger.source.id ? '编辑' : '新增' + '审查内容' return this.dialogManger.dialogEditId ? '编辑' : '新增' + '审查内容'
} }
}, },
methods: { methods: {
...@@ -155,7 +142,7 @@ export default { ...@@ -155,7 +142,7 @@ export default {
this.model.scene.splice(key, 1) this.model.scene.splice(key, 1)
}, },
handleClose() { handleClose() {
this.$emit('close') this.dialogManger.dialogVisible = false
}, },
handleConfirm() { handleConfirm() {
this.$refs['form'].validate(valid => {}) this.$refs['form'].validate(valid => {})
...@@ -166,5 +153,6 @@ export default { ...@@ -166,5 +153,6 @@ export default {
<style scoped> <style scoped>
.icon { .icon {
font-size: 20px; font-size: 20px;
margin-top: 10px;
} }
</style> </style>
...@@ -68,7 +68,7 @@ export default { ...@@ -68,7 +68,7 @@ export default {
default() { default() {
return { return {
dialogVisible: false, dialogVisible: false,
source: {} dialogEditId: null
} }
} }
} }
...@@ -110,7 +110,7 @@ export default { ...@@ -110,7 +110,7 @@ export default {
computed: { computed: {
modelTitle() { modelTitle() {
return this.dialogManger.source.id ? '编辑' : '新增' + '审查内容' return this.dialogManger.dialogEditId ? '编辑' : '新增' + '审查内容'
} }
}, },
methods: { methods: {
...@@ -129,7 +129,7 @@ export default { ...@@ -129,7 +129,7 @@ export default {
this.model.scene.splice(key, 1) this.model.scene.splice(key, 1)
}, },
handleClose() { handleClose() {
this.$emit('close') this.detailManger.dialogVisible = false
}, },
handleConfirm() { handleConfirm() {
this.$refs['form'].validate(valid => {}) this.$refs['form'].validate(valid => {})
......
...@@ -83,12 +83,11 @@ export default { ...@@ -83,12 +83,11 @@ export default {
default() { default() {
return { return {
dialogVisible: false, dialogVisible: false,
source: {} dialogEditId: null
} }
} }
} }
}, },
dicts: ['sys_detailed_classification'],
data() { data() {
return { return {
model: {}, model: {},
...@@ -127,7 +126,7 @@ export default { ...@@ -127,7 +126,7 @@ export default {
this.model.scene.splice(key, 1) this.model.scene.splice(key, 1)
}, },
handleClose() { handleClose() {
this.$emit('close') this.dialogManger.dialogVisible = false
}, },
handleConfirm() { handleConfirm() {
this.$refs['form'].validate(valid => { this.$refs['form'].validate(valid => {
......
...@@ -60,14 +60,8 @@ ...@@ -60,14 +60,8 @@
</template> </template>
</el-form-item> </el-form-item>
</el-form> </el-form>
<detail-select <detail-select :dialog-manger="detailManger"></detail-select>
:dialog-manger="detailManger" <point-select :dialog-manger="pointManger"></point-select>
@close="detailManger.dialogVisible = false"
></detail-select>
<point-select
:dialog-manger="pointManger"
@close="pointManger.dialogVisible = false"
></point-select>
<div slot="footer"> <div slot="footer">
<el-button @click="handleClose()"> 取消 </el-button> <el-button @click="handleClose()"> 取消 </el-button>
<el-button type="primary" @click="handleConfirm()"> 保存 </el-button> <el-button type="primary" @click="handleConfirm()"> 保存 </el-button>
...@@ -89,7 +83,7 @@ export default { ...@@ -89,7 +83,7 @@ export default {
default() { default() {
return { return {
dialogVisible: false, dialogVisible: false,
source: {} dialogEditId: null
} }
} }
} }
...@@ -131,7 +125,7 @@ export default { ...@@ -131,7 +125,7 @@ export default {
computed: { computed: {
modelTitle() { modelTitle() {
return this.dialogManger.source.id ? '编辑' : '新增' + '审查细则' return this.dialogManger.dialogEditId ? '编辑' : '新增' + '审查细则'
} }
}, },
methods: { methods: {
...@@ -150,7 +144,7 @@ export default { ...@@ -150,7 +144,7 @@ export default {
this.model.scene.splice(key, 1) this.model.scene.splice(key, 1)
}, },
handleClose() { handleClose() {
this.$emit('close') this.dialogManger.dialogVisible = false
}, },
handleConfirm() { handleConfirm() {
this.$refs['form'].validate(valid => {}) this.$refs['form'].validate(valid => {})
......
...@@ -62,7 +62,7 @@ export default { ...@@ -62,7 +62,7 @@ export default {
default() { default() {
return { return {
dialogVisible: true, dialogVisible: true,
source: {} dialogEditId: null
} }
} }
} }
...@@ -100,7 +100,7 @@ export default { ...@@ -100,7 +100,7 @@ export default {
computed: { computed: {
modelTitle() { modelTitle() {
return this.dialogManger.source.id ? '编辑' : '新增' + '审查要点' return this.dialogManger.dialogEditId ? '编辑' : '新增' + '审查要点'
} }
}, },
methods: { methods: {
...@@ -116,7 +116,7 @@ export default { ...@@ -116,7 +116,7 @@ export default {
this.model.scene.splice(key, 1) this.model.scene.splice(key, 1)
}, },
handleClose() { handleClose() {
this.$emit('close') this.dialogManger.dialogVisible = false
}, },
handleConfirm() { handleConfirm() {
this.$refs['form'].validate(valid => { this.$refs['form'].validate(valid => {
......
...@@ -83,7 +83,7 @@ export default { ...@@ -83,7 +83,7 @@ export default {
default() { default() {
return { return {
dialogVisible: false, dialogVisible: false,
source: {} dialogEditId: null
} }
} }
} }
...@@ -127,7 +127,7 @@ export default { ...@@ -127,7 +127,7 @@ export default {
this.model.scene.splice(key, 1) this.model.scene.splice(key, 1)
}, },
handleClose() { handleClose() {
this.$emit('close') this.dialogManger.dialogVisible = false
}, },
handleConfirm() { handleConfirm() {
this.$refs['form'].validate(valid => { this.$refs['form'].validate(valid => {
......
...@@ -74,28 +74,6 @@ ...@@ -74,28 +74,6 @@
</el-form> </el-form>
<el-row :gutter="10" class="mb10"> <el-row :gutter="10" class="mb10">
<!-- <el-col :span="1.5">
<el-button
v-hasPermi="['setting:rules:add']"
type="primary"
plain
icon="el-icon-plus"
size="mini"
@click="handlePointAdd"
>新增要点</el-button
>
</el-col>
<el-col :span="1.5">
<el-button
v-hasPermi="['setting:rules:add']"
type="primary"
plain
icon="el-icon-plus"
size="mini"
@click="handleAdd"
>新增细则</el-button
>
</el-col> -->
<right-toolbar <right-toolbar
:show-search.sync="showSearch" :show-search.sync="showSearch"
@queryTable="loadData" @queryTable="loadData"
...@@ -132,7 +110,7 @@ ...@@ -132,7 +110,7 @@
v-if="node.level == 1" v-if="node.level == 1"
type="text" type="text"
size="mini" size="mini"
@click="handlePointAdd" @click="handlePointUpdate(node.level, 0)"
> >
添加审查要点 添加审查要点
</el-button> </el-button>
...@@ -140,7 +118,7 @@ ...@@ -140,7 +118,7 @@
v-if="node.level == 2" v-if="node.level == 2"
type="text" type="text"
size="mini" size="mini"
@click="handleAdd" @click="handleUpdate(node.level, 0)"
> >
添加审查细则 添加审查细则
</el-button> </el-button>
...@@ -152,13 +130,17 @@ ...@@ -152,13 +130,17 @@
> >
添加关联场景 添加关联场景
</el-button> --> </el-button> -->
<el-button type="text" size="mini" @click="() => handleUpdate(data)"> <el-button
type="text"
size="mini"
@click="() => handleUpdate(node.level, data.id)"
>
修改 修改
</el-button> </el-button>
<el-button <el-button
type="text" type="text"
size="mini" size="mini"
@click="() => handleDelete(node, data)" @click="() => handleDelete(node.level, data)"
> >
删除 删除
</el-button> </el-button>
...@@ -252,20 +234,19 @@ ...@@ -252,20 +234,19 @@
</pagination> </pagination>
<yan-dialog <yan-dialog
:dialog-manger="dialogManger" :dialog-manger="dialogManger"
@close="dialogManger.dialogVisible = false" @refresh="refreshList = true"
></yan-dialog> ></yan-dialog>
<point-dialog <point-dialog
:dialog-manger="dialogPointManger" :dialog-manger="dialogPointManger"
@close="dialogPointManger.dialogVisible = false" @refresh="refreshList = true"
></point-dialog> ></point-dialog>
<chexing-dialog <chexing-dialog
:dialog-manger="ChexingdialogManger" :dialog-manger="ChexingdialogManger"
@close="ChexingdialogManger.dialogVisible = false" @refresh="refreshList = true"
></chexing-dialog> ></chexing-dialog>
<wendang-dialog <wendang-dialog
:dialog-manger="WendangdialogManger" :dialog-manger="WendangdialogManger"
@close="WendangdialogManger.dialogVisible = false" @refresh="refreshList = true"
></wendang-dialog> ></wendang-dialog>
</page-standard> </page-standard>
</template> </template>
...@@ -297,40 +278,37 @@ export default { ...@@ -297,40 +278,37 @@ export default {
queryParams: { type: '1' }, queryParams: { type: '1' },
dialogManger: { dialogManger: {
dialogVisible: false, dialogVisible: false,
refreshList: false, parentId: 0,
source: {} dialogEditId: null
}, },
dialogPointManger: { dialogPointManger: {
dialogVisible: false, dialogVisible: false,
refreshList: false, parentId: 0,
source: {} dialogEditId: null
}, },
ChexingdialogManger: { ChexingdialogManger: {
dialogVisible: false, dialogVisible: false,
refreshList: false, parentId: 0,
source: {} dialogEditId: null
}, },
WendangdialogManger: { WendangdialogManger: {
dialogVisible: false, dialogVisible: false,
refreshList: false, parentId: 0,
source: {} dialogEditId: null
} },
refreshList: false
} }
}, },
watch: { watch: {
'dialogManger.refreshList'(val) { refreshList(val) {
if (val) { if (val) {
this.loadData() this.loadData()
this.dialogManger.refreshList = false this.refreshList = false
} }
} }
}, },
methods: { methods: {
handleAdd(type) { handlePointUpdate() {
this.dialogManger.dialogVisible = true
this.dialogManger.source = {}
},
handlePointAdd() {
this.dialogPointManger.dialogVisible = true this.dialogPointManger.dialogVisible = true
this.dialogPointManger.source = {} this.dialogPointManger.source = {}
}, },
...@@ -347,19 +325,19 @@ export default { ...@@ -347,19 +325,19 @@ export default {
}) })
.catch(() => {}) .catch(() => {})
}, },
handleUpdate(type, row) { handleUpdate(type, id) {
switch (type) { switch (type) {
case 1: case 1:
this.dialogManger.dialogVisible = true this.dialogManger.dialogVisible = true
this.dialogManger.source = row this.dialogManger.dialogEditId = id
break break
case 2: case 2:
this.ChexingdialogManger.dialogVisible = true this.ChexingdialogManger.dialogVisible = true
this.ChexingdialogManger.source = row this.ChexingdialogManger.dialogEditId = id
break break
case 3: case 3:
this.WendangdialogManger.dialogVisible = true this.WendangdialogManger.dialogVisible = true
this.WendangdialogManger.source = row this.WendangdialogManger.dialogEditId = id
break break
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment