fix: BUG修改,后台权限配置改为接口字典获取

This commit is contained in:
cjp 2023-12-11 17:32:46 +08:00
parent 32037f7351
commit 04f8e8a4d9
3 changed files with 109 additions and 308 deletions

View File

@ -1,12 +1,7 @@
<template> <template>
<div class="fullHeight"> <div class="fullHeight">
<div class="searchBox whiteBlock"> <div class="searchBox whiteBlock">
<el-form <el-form :inline="true" size="medium" :model="searchForm" ref="searchForm">
:inline="true"
size="medium"
:model="searchForm"
ref="searchForm"
>
<el-form-item label="使用状态" prop="useState"> <el-form-item label="使用状态" prop="useState">
<el-select v-model="searchForm.useState" placeholder="请选择"> <el-select v-model="searchForm.useState" placeholder="请选择">
<el-option label="全部" value=""></el-option> <el-option label="全部" value=""></el-option>
@ -15,105 +10,46 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="企业名称" prop="companyName" class="last"> <el-form-item label="企业名称" prop="companyName" class="last">
<el-input <el-input v-model="searchForm.companyName" placeholder="请输入" clearable></el-input>
v-model="searchForm.companyName"
placeholder="请输入"
clearable
></el-input>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" plain @click="getListData">查询</el-button> <el-button type="primary" plain @click="getListData">查询</el-button>
<el-button type="warning" plain @click="resetForm">刷新</el-button> <el-button type="warning" plain @click="resetForm">刷新</el-button>
<el-button type="primary" size="medium" @click="addReg" <el-button type="primary" size="medium" @click="addReg">添加企业</el-button>
>添加企业</el-button
>
</el-form-item> </el-form-item>
</el-form> </el-form>
</div> </div>
<div class="table_wrap whiteBlock"> <div class="table_wrap whiteBlock">
<el-table class="tables" :data="tableData"> <el-table class="tables" :data="tableData">
<el-table-column <el-table-column type="index" width="50" align="center" label="序号"></el-table-column>
type="index" <el-table-column prop="companyName" label="企业名称" align="center" width="180"></el-table-column>
width="50" <el-table-column prop="realName" label="企业负责人" align="center" width="180"></el-table-column>
align="center" <el-table-column prop="account" label="用户账号" align="center" width="180"></el-table-column>
label="序号" <el-table-column prop="showPassword" label="用户密码" align="center" width="180"></el-table-column>
></el-table-column> <el-table-column prop="createTime" label="注册时间" align="center" width="180"></el-table-column>
<el-table-column <el-table-column prop="companyTel" label="手机号码" align="center" width="180"></el-table-column>
prop="companyName"
label="企业名称"
align="center"
width="180"
></el-table-column>
<el-table-column
prop="realName"
label="企业负责人"
align="center"
width="180"
></el-table-column>
<el-table-column
prop="account"
label="用户账号"
align="center"
width="180"
></el-table-column>
<el-table-column
prop="showPassword"
label="用户密码"
align="center"
width="180"
></el-table-column>
<el-table-column
prop="createTime"
label="注册时间"
align="center"
width="180"
></el-table-column>
<el-table-column
prop="companyTel"
label="手机号码"
align="center"
width="180"
></el-table-column>
<el-table-column prop="isEnable" label="使用状态" align="center"> <el-table-column prop="isEnable" label="使用状态" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.isEnable == 0 ? '禁用' : '启用' }} {{ scope.row.isEnable == 0 ? '禁用' : '启用' }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column prop="diffDay" label="剩余天数" align="center"></el-table-column>
prop="diffDay"
label="剩余天数"
align="center"
></el-table-column>
<el-table-column prop="diffDay" label="项目数" align="center"> <el-table-column prop="diffDay" label="项目数" align="center">
<template slot-scope="scope"> <template slot-scope="scope"> {{ scope.row.createProjectNum }}/{{ scope.row.projectNum }} </template>
{{ scope.row.createProjectNum }}/{{ scope.row.projectNum }}
</template>
</el-table-column> </el-table-column>
<el-table-column prop="address" label="操作" align="center" width="300"> <el-table-column prop="address" label="操作" align="center" width="300">
<template slot-scope="scope"> <template slot-scope="scope">
<div class="tableBtns"> <div class="tableBtns">
<div @click="configuration(scope.row)" class="operationText"> <div @click="configuration(scope.row)" class="operationText">
<img <img src="@/assets/images/accredit.png" width="15px" height="15px" />
src="@/assets/images/accredit.png"
width="15px"
height="15px"
/>
<span>授权配置</span> <span>授权配置</span>
</div> </div>
<div @click="edit(scope.row)" class="operationText"> <div @click="edit(scope.row)" class="operationText">
<img <img src="@/assets/images/icon-edit.png" width="15px" height="15px" />
src="@/assets/images/icon-edit.png"
width="15px"
height="15px"
/>
<span>编辑</span> <span>编辑</span>
</div> </div>
<div @click="deleteDev(scope.row)" class="operationText"> <div @click="deleteDev(scope.row)" class="operationText">
<img <img src="@/assets/images/icon-delete.png" width="15px" height="15px" />
src="@/assets/images/icon-delete.png"
width="15px"
height="15px"
/>
<span>删除</span> <span>删除</span>
</div> </div>
</div> </div>
@ -132,12 +68,7 @@
background background
></el-pagination> ></el-pagination>
</div> </div>
<el-dialog <el-dialog :modal-append-to-body="false" title="授权配置" :visible.sync="authorizedDialog" width="767px">
:modal-append-to-body="false"
title="授权配置"
:visible.sync="authorizedDialog"
width="767px"
>
<div class="dialog_content"> <div class="dialog_content">
<el-row :gutter="24"> <el-row :gutter="24">
<el-col :span="11" style="margin: 7px 0px 0 0"> <el-col :span="11" style="margin: 7px 0px 0 0">
@ -149,14 +80,7 @@
</el-col> </el-col>
<el-col :span="13" style="text-align: right"> <el-col :span="13" style="text-align: right">
<span style="margin-right: 15px">到期日期</span> <span style="margin-right: 15px">到期日期</span>
<el-date-picker <el-date-picker v-model="time" type="date" placeholder="选择日期" value-format="yyyy-MM-dd" size="medium"> </el-date-picker>
v-model="time"
type="date"
placeholder="选择日期"
value-format="yyyy-MM-dd"
size="medium"
>
</el-date-picker>
</el-col> </el-col>
</el-row> </el-row>
<el-row :gutter="24" style="margin-top: 20px"> <el-row :gutter="24" style="margin-top: 20px">
@ -169,12 +93,7 @@
</el-col> </el-col>
<el-col :span="13" style="text-align: right"> <el-col :span="13" style="text-align: right">
<span style="margin-right: 15px">授权项目数</span> <span style="margin-right: 15px">授权项目数</span>
<el-input-number <el-input-number v-model="projectNum" :min="1" size="medium" style="width: 220px"></el-input-number>
v-model="projectNum"
:min="1"
size="medium"
style="width: 220px"
></el-input-number>
</el-col> </el-col>
</el-row> </el-row>
<el-row :gutter="24" style="margin-top: 20px"> <el-row :gutter="24" style="margin-top: 20px">
@ -187,11 +106,7 @@
</el-col> </el-col>
<el-col :span="13" style="text-align: right"> <el-col :span="13" style="text-align: right">
<span style="margin-right: 15px">是否显示项目看板</span> <span style="margin-right: 15px">是否显示项目看板</span>
<el-radio-group <el-radio-group v-model="projectKanban" size="medium" style="width: 220px; text-align: left">
v-model="projectKanban"
size="medium"
style="width: 220px; text-align: left"
>
<el-radio :label="0"></el-radio> <el-radio :label="0"></el-radio>
<el-radio :label="1"></el-radio> <el-radio :label="1"></el-radio>
</el-radio-group> </el-radio-group>
@ -226,16 +141,13 @@
<el-radio :label="1"></el-radio> <el-radio :label="1"></el-radio>
</el-radio-group> --> </el-radio-group> -->
<span class="firstConlumLabel">选择系统版本</span> <span class="firstConlumLabel">选择系统版本</span>
<el-radio-group <div style="margin-top:10px"></div>
v-model="styleType" <el-radio-group v-model="styleType" size="medium" @change="getBaseModuleList">
size="medium" <el-radio v-for="item in styleTypeArr" :label="item.data" :key="item.id">{{ item.name }}</el-radio>
@change="getBaseModuleList" <!-- <el-radio :label="2">星璇版</el-radio>
>
<el-radio :label="1">标准版</el-radio>
<el-radio :label="2">星璇版</el-radio>
<el-radio :label="3">衢州版</el-radio> <el-radio :label="3">衢州版</el-radio>
<el-radio :label="4">三江版</el-radio> <el-radio :label="4">三江版</el-radio>
<el-radio :label="5">标准七参数版</el-radio> <el-radio :label="5">标准七参数版</el-radio> -->
</el-radio-group> </el-radio-group>
</el-col> </el-col>
</el-row> </el-row>
@ -260,11 +172,7 @@
</el-col> </el-col>
<el-col :span="13" style="text-align: right"> <el-col :span="13" style="text-align: right">
<span style="margin-right: 15px">是否能添加项目</span> <span style="margin-right: 15px">是否能添加项目</span>
<el-radio-group <el-radio-group v-model="canAddProject" size="medium" style="width: 220px; text-align: left">
v-model="canAddProject"
size="medium"
style="width: 220px; text-align: left"
>
<el-radio :label="0"></el-radio> <el-radio :label="0"></el-radio>
<el-radio :label="1"></el-radio> <el-radio :label="1"></el-radio>
</el-radio-group> </el-radio-group>
@ -273,135 +181,56 @@
<el-row :gutter="24" style="margin-top: 20px"> <el-row :gutter="24" style="margin-top: 20px">
<el-col :span="24"> <el-col :span="24">
<div>请勾选功能权限</div> <div>请勾选功能权限</div>
<el-checkbox <el-checkbox :indeterminate="isIndeterminate" v-model="checkAll" @change="handleCheckAllChange">全选</el-checkbox>
:indeterminate="isIndeterminate" <el-checkbox-group class="zdy-checkbox" v-model="moduleInfo.moduleId" @change="handleCheckedCitiesChange">
v-model="checkAll"
@change="handleCheckAllChange"
>全选</el-checkbox
>
<el-checkbox-group
class="zdy-checkbox"
v-model="moduleInfo.moduleId"
@change="handleCheckedCitiesChange"
>
<div class="CheckboxTitle">企业模块</div> <div class="CheckboxTitle">企业模块</div>
<el-checkbox <el-checkbox v-if="i.moduleType === 1" v-for="i in companyArr" :key="i.moduleId" :label="i.moduleId">{{
v-if="i.moduleType === 1" i.moduleName
v-for="i in companyArr" }}</el-checkbox>
:key="i.moduleId"
:label="i.moduleId"
>{{ i.moduleName }}</el-checkbox
>
<div class="CheckboxTitle">企业后台模块</div> <div class="CheckboxTitle">企业后台模块</div>
<el-checkbox <el-checkbox v-if="i.moduleType === 3" v-for="i in companyArr" :key="i.moduleId" :label="i.moduleId">{{
v-if="i.moduleType === 3" i.moduleName
v-for="i in companyArr" }}</el-checkbox>
:key="i.moduleId"
:label="i.moduleId"
>{{ i.moduleName }}</el-checkbox
>
<div class="CheckboxTitle">项目模块</div> <div class="CheckboxTitle">项目模块</div>
<el-checkbox <el-checkbox v-if="i.moduleType === 2" v-for="i in companyArr" :key="i.moduleId" :label="i.moduleId">{{
v-if="i.moduleType === 2" i.moduleName
v-for="i in companyArr" }}</el-checkbox>
:key="i.moduleId"
:label="i.moduleId"
>{{ i.moduleName }}</el-checkbox
>
<div class="CheckboxTitle">项目看板模块</div> <div class="CheckboxTitle">项目看板模块</div>
<el-checkbox <el-checkbox v-if="i.moduleType === 4" v-for="i in companyArr" :key="i.moduleId" :label="i.moduleId">{{
v-if="i.moduleType === 4" i.moduleName
v-for="i in companyArr" }}</el-checkbox>
:key="i.moduleId"
:label="i.moduleId"
>{{ i.moduleName }}</el-checkbox
>
</el-checkbox-group> </el-checkbox-group>
</el-col> </el-col>
</el-row> </el-row>
<div class="dialog-footer"> <div class="dialog-footer">
<el-button <el-button class="cancleBtn" @click="authorizedDialog = false" icon="el-icon-circle-close" size="medium"> </el-button>
class="cancleBtn" <el-button type="primary" icon="el-icon-circle-check" @click="saveFn" size="medium"> </el-button>
@click="authorizedDialog = false"
icon="el-icon-circle-close"
size="medium"
> </el-button
>
<el-button
type="primary"
icon="el-icon-circle-check"
@click="saveFn"
size="medium"
> </el-button
>
</div> </div>
</div> </div>
</el-dialog> </el-dialog>
<!-- 新增企业弹框 --> <!-- 新增企业弹框 -->
<el-dialog <el-dialog :modal-append-to-body="false" @close="close" :title="titleRes" :visible.sync="diaLogShow" width="667px">
:modal-append-to-body="false"
@close="close"
:title="titleRes"
:visible.sync="diaLogShow"
width="667px"
>
<div class="dialog_content"> <div class="dialog_content">
<el-form <el-form size="medium" ref="addEditForm" :model="addEditForm" :rules="addEditRules" label-width="120px" class="dialogFormBox">
size="medium"
ref="addEditForm"
:model="addEditForm"
:rules="addEditRules"
label-width="120px"
class="dialogFormBox"
>
<el-form-item label="企业名称" prop="companyName"> <el-form-item label="企业名称" prop="companyName">
<el-input <el-input v-model="addEditForm.companyName" placeholder="请输入"></el-input>
v-model="addEditForm.companyName"
placeholder="请输入"
></el-input>
</el-form-item> </el-form-item>
<el-form-item label="企业负责人" prop="companyName"> <el-form-item label="企业负责人" prop="companyName">
<el-input <el-input v-model="addEditForm.realName" placeholder="请输入"></el-input>
v-model="addEditForm.realName"
placeholder="请输入"
></el-input>
</el-form-item> </el-form-item>
<el-form-item label="用户账号" prop="account"> <el-form-item label="用户账号" prop="account">
<el-input <el-input v-model="addEditForm.account" placeholder="请输入"></el-input>
v-model="addEditForm.account"
placeholder="请输入"
></el-input>
</el-form-item> </el-form-item>
<el-form-item style="margin-bottom:30px" label="用户密码" prop="showPassword"> <el-form-item style="margin-bottom:30px" label="用户密码" prop="showPassword">
<el-input <el-input type="password" show-password v-model="addEditForm.showPassword" placeholder="请输入"></el-input>
type="password"
show-password
v-model="addEditForm.showPassword"
placeholder="请输入"
></el-input>
</el-form-item> </el-form-item>
<el-form-item label="手机号码" prop="companyTel"> <el-form-item label="手机号码" prop="companyTel">
<el-input <el-input v-model="addEditForm.companyTel" placeholder="请输入"></el-input>
v-model="addEditForm.companyTel"
placeholder="请输入"
></el-input>
</el-form-item> </el-form-item>
<div class="dialog-footer"> <div class="dialog-footer">
<el-button <el-button class="cancleBtn" @click="diaLogShow = false" icon="el-icon-circle-close" size="medium">取消 </el-button>
class="cancleBtn" <el-button type="primary" icon="el-icon-circle-check" @click="submit" size="medium">确定 </el-button>
@click="diaLogShow = false"
icon="el-icon-circle-close"
size="medium"
>取消
</el-button>
<el-button
type="primary"
icon="el-icon-circle-check"
@click="submit"
size="medium"
>确定
</el-button>
</div> </div>
</el-form> </el-form>
</div> </div>
@ -415,13 +244,12 @@ import {
baseModuleList, baseModuleList,
getCompanyModuleList, getCompanyModuleList,
baseModuleProjectEdit, baseModuleProjectEdit,
addHeadquarterCompanyApi,// addHeadquarterCompanyApi, //
editHeadquarterCompanyApi, editHeadquarterCompanyApi,
deleteHeadquarterCompanyApi, deleteHeadquarterCompanyApi,
getStyleTypeArr
} from '@/assets/js/api/jxjadmin.js' } from '@/assets/js/api/jxjadmin.js'
import { import { checkPhone } from '@/assets/js/util.js'
checkPhone
} from '@/assets/js/util.js'
export default { export default {
name: 'registerAudit', name: 'registerAudit',
data() { data() {
@ -469,7 +297,7 @@ export default {
realName: '', realName: '',
account: '', account: '',
companyTel: '', companyTel: '',
showPassword: '', showPassword: ''
}, },
addEditRules: { addEditRules: {
companyName: [ companyName: [
@ -512,7 +340,7 @@ export default {
{ {
required: true, required: true,
message: '必填', message: '必填',
trigger: "blur", trigger: 'blur'
}, },
{ {
pattern: /^(?=.*\d)(?=.*[a-zA-Z])(?=.*[!@#$%^&*()_+~`\-={}[\]:";'<>?,./])[a-zA-Z\d!@#$%^&*()_+~`\-={}[\]:";'<>?,./]{8,}$/, pattern: /^(?=.*\d)(?=.*[a-zA-Z])(?=.*[!@#$%^&*()_+~`\-={}[\]:";'<>?,./])[a-zA-Z\d!@#$%^&*()_+~`\-={}[\]:";'<>?,./]{8,}$/,
@ -531,41 +359,53 @@ export default {
message: '必填', message: '必填',
trigger: 'change' trigger: 'change'
} }
], ]
}, },
titleRes: '', titleRes: '',
styleTypeArr: []
} }
}, },
created() { created() {
this.getListData() this.getListData()
this.getStyleTypeArrByCode()
}, },
methods: { methods: {
getStyleTypeArrByCode() {
getStyleTypeArr({ dictionaryEncoding: 'base_module_style_type' }).then(res => {
if (res.result.length > 0) {
// console.log("", res);
this.styleTypeArr = res.result
// this.styleType = Number(res.result[0].data)
console.log('获取字典', this.styleTypeArr)
}
})
},
addReg() { addReg() {
this.diaLogShow = true this.diaLogShow = true
this.titleRes = '添加企业' this.titleRes = '添加企业'
}, },
edit(obj) { edit(obj) {
console.log('编辑', obj); console.log('编辑', obj)
this.diaLogShow = true this.diaLogShow = true
this.addEditForm = JSON.parse(JSON.stringify(obj)) this.addEditForm = JSON.parse(JSON.stringify(obj))
this.titleRes = '编辑企业' this.titleRes = '编辑企业'
}, },
// //
deleteDev(obj) { deleteDev(obj) {
this.$confirm("此操作将永久删除, 是否继续?", "提示", { this.$confirm('此操作将永久删除, 是否继续?', '提示', {
confirmButtonText: "确定", confirmButtonText: '确定',
cancelButtonText: "取消", cancelButtonText: '取消',
type: "warning", type: 'warning'
}) })
.then(() => { .then(() => {
deleteHeadquarterCompanyApi({ id: obj.companyId }).then((result) => { deleteHeadquarterCompanyApi({ id: obj.companyId }).then(result => {
if (result.success) { if (result.success) {
this.$message.success(result.message) this.$message.success(result.message)
this.getListData() this.getListData()
} }
}) })
}) })
.catch(() => { }) .catch(() => {})
}, },
submit() { submit() {
if (this.addEditForm.companyTel) { if (this.addEditForm.companyTel) {
@ -576,17 +416,17 @@ export default {
} }
let params = JSON.parse(JSON.stringify(this.addEditForm)) let params = JSON.parse(JSON.stringify(this.addEditForm))
params.projectSn = this.$store.state.projectSn params.projectSn = this.$store.state.projectSn
this.$refs.addEditForm.validate((valid) => { this.$refs.addEditForm.validate(valid => {
if (valid) { if (valid) {
if (this.titleRes == '添加企业') { if (this.titleRes == '添加企业') {
addHeadquarterCompanyApi(params).then((result) => { addHeadquarterCompanyApi(params).then(result => {
if (result.success) { if (result.success) {
this.$message.success(result.message) this.$message.success(result.message)
this.getListData() this.getListData()
} }
}) })
} else if (this.titleRes == '编辑企业') { } else if (this.titleRes == '编辑企业') {
editHeadquarterCompanyApi(params).then((result) => { editHeadquarterCompanyApi(params).then(result => {
if (result.success) { if (result.success) {
this.$message.success(result.message) this.$message.success(result.message)
this.getListData() this.getListData()
@ -622,17 +462,15 @@ export default {
enterProjectBackType: this.canGoProjectEnd, enterProjectBackType: this.canGoProjectEnd,
addProjectType: this.canAddProject addProjectType: this.canAddProject
} }
editCompanyConfigApi(json).then((res) => { editCompanyConfigApi(json).then(res => {
let moduleIdStr = JSON.parse( let moduleIdStr = JSON.parse(JSON.stringify(this.moduleInfo)).moduleId.join(',')
JSON.stringify(this.moduleInfo)
).moduleId.join(',')
console.log('查看form', moduleIdStr, this.moduleInfo) console.log('查看form', moduleIdStr, this.moduleInfo)
baseModuleProjectEdit({ baseModuleProjectEdit({
headquartersSn: this.moduleInfo.headquartersSn, headquartersSn: this.moduleInfo.headquartersSn,
moduleIdStr: moduleIdStr, moduleIdStr: moduleIdStr,
sn: this.moduleInfo.companySn, sn: this.moduleInfo.companySn,
type: '1' type: '1'
}).then((res) => { }).then(res => {
// this.$message.success('') // this.$message.success('')
}) })
this.authorizedDialog = false this.authorizedDialog = false
@ -647,7 +485,7 @@ export default {
data.pageNo = this.pageNo data.pageNo = this.pageNo
data.pageSize = this.pageSize data.pageSize = this.pageSize
getRegisterAuditList(data).then((res) => { getRegisterAuditList(data).then(res => {
console.log(res) console.log(res)
this.tableData = res.result.records this.tableData = res.result.records
this.total = res.result.total this.total = res.result.total
@ -674,7 +512,7 @@ export default {
this.companyBigScreen = item.companyBigScreen this.companyBigScreen = item.companyBigScreen
this.mobileAttendance = item.mobileAttendance this.mobileAttendance = item.mobileAttendance
this.inputQrCode = item.inputQrCode this.inputQrCode = item.inputQrCode
this.styleType = item.styleType this.styleType = String(item.styleType)
this.canGoProjectEnd = item.enterProjectBackType this.canGoProjectEnd = item.enterProjectBackType
this.canAddProject = item.addProjectType this.canAddProject = item.addProjectType
@ -692,33 +530,31 @@ export default {
this.getListData() this.getListData()
}, },
getBaseModuleList() { getBaseModuleList() {
baseModuleList({ moduleType: '', styleType: this.styleType }).then( let styleType = Number(this.styleType)
(result) => { console.log('打印', styleType)
baseModuleList({ moduleType: '', styleType: styleType }).then(result => {
if (result.success) { if (result.success) {
let brHtm = {} let brHtm = {}
this.companyArr = result.result this.companyArr = result.result
this.companyArr.map((item) => { this.companyArr.map(item => {
this.cityOptions.push(item.moduleId) this.cityOptions.push(item.moduleId)
}) })
this.brHtm = brHtm this.brHtm = brHtm
// console.log('',brHtm) // console.log('',brHtm)
// console.log('',this.companyArr) // console.log('',this.companyArr)
} }
} })
)
}, },
getCompanyList(headquartersSn) { getCompanyList(headquartersSn) {
getCompanyModuleList({ headquartersSn: headquartersSn }).then( getCompanyModuleList({ headquartersSn: headquartersSn }).then(result => {
(result) => {
if (result.success) { if (result.success) {
result.result.map((item) => { result.result.map(item => {
this.moduleInfo.moduleId.push(item.moduleId) this.moduleInfo.moduleId.push(item.moduleId)
}) })
// console.log('',result.result) // console.log('',result.result)
this.handleCheckedCitiesChange(this.moduleInfo.moduleId) this.handleCheckedCitiesChange(this.moduleInfo.moduleId)
} }
} })
)
}, },
handleCheckAllChange(val) { handleCheckAllChange(val) {
this.moduleInfo.moduleId = val ? this.cityOptions : [] this.moduleInfo.moduleId = val ? this.cityOptions : []
@ -727,15 +563,14 @@ export default {
handleCheckedCitiesChange(value) { handleCheckedCitiesChange(value) {
let checkedCount = value.length let checkedCount = value.length
this.checkAll = checkedCount === this.cityOptions.length this.checkAll = checkedCount === this.cityOptions.length
this.isIndeterminate = this.isIndeterminate = checkedCount > 0 && checkedCount < this.cityOptions.length
checkedCount > 0 && checkedCount < this.cityOptions.length
}, },
close() { close() {
this.addEditForm = {} this.addEditForm = {}
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.addEditForm.clearValidate() this.$refs.addEditForm.clearValidate()
}) })
}, }
} }
} }
</script> </script>

View File

@ -289,24 +289,7 @@ export default {
value: 3 value: 3
} }
], ],
bridgeSectionList: [ bridgeSectionList: [],
{
name: '桥段1',
id: 1
},
{
name: '桥段2',
id: 2
},
{
name: '桥段3',
id: 3
},
{
name: '桥段4',
id: 4
}
],
input1: '', // input1: '', //
currentBridgeInfo: '', //item currentBridgeInfo: '', //item
activeBuildIndex: '', // activeBuildIndex: '', //

View File

@ -289,24 +289,7 @@ export default {
value: 3 value: 3
} }
], ],
bridgeSectionList: [ bridgeSectionList: [],
{
name: '桥段1',
id: 1
},
{
name: '桥段2',
id: 2
},
{
name: '桥段3',
id: 3
},
{
name: '桥段4',
id: 4
}
],
input1: '', // input1: '', //
currentBridgeInfo: '', //item currentBridgeInfo: '', //item
activeBuildIndex: '', // activeBuildIndex: '', //