Commit 67a1f09c authored by mengmeng's avatar mengmeng

Merge branch 'fwl' into 'master'

差不多结尾

See merge request !4
parents bb8b9c12 eca9161e
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
window.SITE_CONFIG = {}; window.SITE_CONFIG = {};
window.SITE_CONFIG['version'] = 'v1.0.0'; window.SITE_CONFIG['version'] = 'v1.0.0';
window.SITE_CONFIG['nodeEnv'] = '<%= process.env.VUE_APP_NODE_ENV %>'; window.SITE_CONFIG['nodeEnv'] = '<%= process.env.VUE_APP_NODE_ENV %>';
window.SITE_CONFIG['apiURL'] = 'http://192.168.10.169:8080/hmit-admin'; // api请求地址 window.SITE_CONFIG['apiURL'] = 'http://192.168.10.164:8080/hmit-admin'; // api请求地址
window.SITE_CONFIG['storeState'] = {}; // vuex本地储存初始化状态(用于不刷新页面的情况下,也能重置初始化项目中所有状态) window.SITE_CONFIG['storeState'] = {}; // vuex本地储存初始化状态(用于不刷新页面的情况下,也能重置初始化项目中所有状态)
window.SITE_CONFIG['contentTabDefault'] = { // 内容标签页默认属性对象 window.SITE_CONFIG['contentTabDefault'] = { // 内容标签页默认属性对象
'name': '', // 名称, 由 this.$route.name 自动赋值(默认,名称 === 路由名称 === 路由路径) 'name': '', // 名称, 由 this.$route.name 自动赋值(默认,名称 === 路由名称 === 路由路径)
......
...@@ -10,11 +10,13 @@ import { ...@@ -10,11 +10,13 @@ import {
} from "../utils/request"; } from "../utils/request";
//会议详情 //会议详情
export function getwoFaultTypeList() { export function getMeetingDetail(id) {
return getData("/workorder/wofaulttype/woFaultTypeList"); return getData(`/meeting/meeting/${id}`);
} }
//会议保存 //会议保存
export function getMeeting(dto) { export function getMeeting(dto) {
return postData("/meeting/meeting", dto); return postData("/meeting/meeting", dto);
} }
//会议修改/meeting/meeting
\ No newline at end of file
...@@ -37,7 +37,7 @@ export const moduleRoutes = { ...@@ -37,7 +37,7 @@ export const moduleRoutes = {
{ path: '/memberManageDetail', component: () => import('@/views/modules/memberManage/memberManageDetail'), name: '会员信息详情', meta: { title: '会员信息详情', isTab: false } }, { path: '/memberManageDetail', component: () => import('@/views/modules/memberManage/memberManageDetail'), name: '会员信息详情', meta: { title: '会员信息详情', isTab: false } },
{ path: '/meetingsAdd', component: () => import('@/views/modules/meeting/meetingsAdd'), name: '会议新增', meta: { title: '会议新增', isTab: false } }, { path: '/meetingsAdd', component: () => import('@/views/modules/meeting/meetingsAdd'), name: '会议新增', meta: { title: '会议新增', isTab: false } },
{ path: '/meetingsDetail', component: () => import('@/views/modules/meeting/meetingsDetail'), name: '会议详情', meta: { title: '会议详情', isTab: true } }, { path: '/meetingsDetail', component: () => import('@/views/modules/meeting/meetingsDetail'), name: '会议详情', meta: { title: '会议详情', isTab: false } },
{ path: '/member', component: () => import('@/views/modules/user/user'), name: '会员信息管理', meta: { title: '会员信息管理', isTab: true } }, { path: '/member', component: () => import('@/views/modules/user/user'), name: '会员信息管理', meta: { title: '会员信息管理', isTab: true } },
{ path: '/shenhe', component: () => import('@/views/modules/auditInformationManage/auditInformationManage'), name: '审核信息管理', meta: { title: '审核信息管理', isTab: true } }, { path: '/shenhe', component: () => import('@/views/modules/auditInformationManage/auditInformationManage'), name: '审核信息管理', meta: { title: '审核信息管理', isTab: true } },
] ]
......
<template> <template>
<div v-loading.fullscreen.lock="loading" :element-loading-text="$t('loading')" :class="['aui-wrapper', { 'aui-sidebar--fold': $store.state.sidebarFold }]"> <div
v-loading.fullscreen.lock="loading"
:element-loading-text="$t('loading')"
:class="['aui-wrapper', { 'aui-sidebar--fold': $store.state.sidebarFold }]"
>
<template v-if="!loading"> <template v-if="!loading">
<main-navbar /> <main-navbar />
<main-sidebar /> <main-sidebar />
...@@ -12,94 +16,106 @@ ...@@ -12,94 +16,106 @@
</template> </template>
<script> <script>
import MainNavbar from './main-navbar' import MainNavbar from "./main-navbar";
import MainSidebar from './main-sidebar' import MainSidebar from "./main-sidebar";
import MainContent from './main-content' import MainContent from "./main-content";
import MainThemeTools from './main-theme-tools' import MainThemeTools from "./main-theme-tools";
import debounce from 'lodash/debounce' import debounce from "lodash/debounce";
export default { export default {
provide () { provide() {
return { return {
// 刷新 // 刷新
refresh () { refresh() {
this.$store.state.contentIsNeedRefresh = true this.$store.state.contentIsNeedRefresh = true;
this.$nextTick(() => { this.$nextTick(() => {
this.$store.state.contentIsNeedRefresh = false this.$store.state.contentIsNeedRefresh = false;
}) });
} },
} };
}, },
data () { data() {
return { return {
loading: true loading: true,
} };
}, },
components: { components: {
MainNavbar, MainNavbar,
MainSidebar, MainSidebar,
MainContent, MainContent,
MainThemeTools MainThemeTools,
}, },
watch: { watch: {
$route: 'routeHandle' $route: "routeHandle",
}, },
created () { created() {
this.windowResizeHandle() this.windowResizeHandle();
this.routeHandle(this.$route) this.routeHandle(this.$route);
Promise.all([ Promise.all([this.getUserInfo(), this.getPermissions()]).then(() => {
this.getUserInfo(), this.loading = false;
this.getPermissions() });
]).then(() => {
this.loading = false
})
}, },
methods: { methods: {
// 窗口改变大小 // 窗口改变大小
windowResizeHandle () { windowResizeHandle() {
this.$store.state.sidebarFold = document.documentElement['clientWidth'] <= 992 || false this.$store.state.sidebarFold =
window.addEventListener('resize', debounce(() => { document.documentElement["clientWidth"] <= 992 || false;
this.$store.state.sidebarFold = document.documentElement['clientWidth'] <= 992 || false window.addEventListener(
}, 150)) "resize",
debounce(() => {
this.$store.state.sidebarFold =
document.documentElement["clientWidth"] <= 992 || false;
}, 150)
);
}, },
// 路由, 监听 // 路由, 监听
routeHandle (route) { routeHandle(route) {
if (!route.meta.isTab) { if (!route.meta.isTab) {
return false return false;
} }
var tab = this.$store.state.contentTabs.filter(item => item.name === route.name)[0] var tab = this.$store.state.contentTabs.filter(
(item) => item.name === route.name
)[0];
if (!tab) { if (!tab) {
tab = { tab = {
...window.SITE_CONFIG['contentTabDefault'], ...window.SITE_CONFIG["contentTabDefault"],
...route.meta, ...route.meta,
'name': route.name, name: route.name,
'params': { ...route.params }, params: { ...route.params },
'query': { ...route.query } query: { ...route.query },
} };
this.$store.state.contentTabs = this.$store.state.contentTabs.concat(tab) this.$store.state.contentTabs = this.$store.state.contentTabs.concat(
tab
);
} }
this.$store.state.sidebarMenuActiveName = tab.menuId this.$store.state.sidebarMenuActiveName = tab.menuId;
this.$store.state.contentTabsActiveName = tab.name this.$store.state.contentTabsActiveName = tab.name;
}, },
// 获取当前管理员信息 // 获取当前管理员信息
getUserInfo () { getUserInfo() {
return this.$http.get('/sys/user/info').then(({ data: res }) => { return this.$http
.get("/sys/user/info")
.then(({ data: res }) => {
if (res.code !== 0) { if (res.code !== 0) {
return this.$message.error(res.msg) return this.$message.error(res.msg);
} }
this.$store.state.user.id = res.data.id this.$store.state.user.id = res.data.id;
this.$store.state.user.name = res.data.username this.$store.state.user.name = res.data.username;
this.$store.state.user.superAdmin = res.data.superAdmin this.$store.state.user.superAdmin = res.data.superAdmin;
}).catch(() => {}) })
.catch(() => {});
}, },
// 获取权限 // 获取权限
getPermissions () { getPermissions() {
return this.$http.get('/sys/menu/permissions').then(({ data: res }) => { return this.$http
.get("/sys/menu/permissions")
.then(({ data: res }) => {
if (res.code !== 0) { if (res.code !== 0) {
return this.$message.error(res.msg) return this.$message.error(res.msg);
}
window.SITE_CONFIG['permissions'] = res.data
}).catch(() => {})
}
} }
} window.SITE_CONFIG["permissions"] = res.data;
})
.catch(() => {});
},
},
};
</script> </script>
...@@ -95,6 +95,7 @@ export default { ...@@ -95,6 +95,7 @@ export default {
pid: "", pid: "",
parentName: "", parentName: "",
sort: 0, sort: 0,
type: 0,
}, },
}; };
}, },
...@@ -170,6 +171,12 @@ export default { ...@@ -170,6 +171,12 @@ export default {
}, },
// 上级部门树, 选中 // 上级部门树, 选中
deptListTreeCurrentChangeHandle(data) { deptListTreeCurrentChangeHandle(data) {
// console.log(data);
/* if (data.children.length <0) {
this.dataForm.type = 0;
} else {
this.dataForm.type = 1;
} */
this.dataForm.pid = data.id; this.dataForm.pid = data.id;
this.dataForm.parentName = data.name; this.dataForm.parentName = data.name;
this.deptListVisible = false; this.deptListVisible = false;
......
...@@ -143,7 +143,7 @@ export default { ...@@ -143,7 +143,7 @@ export default {
data() { data() {
return { return {
mixinViewModuleOptions: { mixinViewModuleOptions: {
getDataListURL: "/user/user/page", getDataListURL: "/user/user/page?check=0",
getDataListIsPage: true, getDataListIsPage: true,
exportURL: "/user/user/export", exportURL: "/user/user/export",
deleteURL: "/user/user", deleteURL: "/user/user",
......
...@@ -33,10 +33,16 @@ ...@@ -33,10 +33,16 @@
<el-form-item label="职位"> <el-form-item label="职位">
<el-input v-model="dataForm.position"></el-input> <el-input v-model="dataForm.position"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="联系电话"> <el-form-item
label="联系电话"
prop="mobile"
>
<el-input v-model="dataForm.mobile"></el-input> <el-input v-model="dataForm.mobile"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="邮箱"> <el-form-item
label="邮箱"
prop="email"
>
<el-input v-model="dataForm.email"></el-input> <el-input v-model="dataForm.email"></el-input>
</el-form-item> </el-form-item>
...@@ -66,7 +72,7 @@ ...@@ -66,7 +72,7 @@
v-if="dataForm.ifCheck==1" v-if="dataForm.ifCheck==1"
label="所属市区级" label="所属市区级"
> >
<el-select <!-- <el-select
style="width:100%" style="width:100%"
v-model="dataForm.areaName" v-model="dataForm.areaName"
placeholder="请选择所属市区级" placeholder="请选择所属市区级"
...@@ -78,34 +84,37 @@ ...@@ -78,34 +84,37 @@
:value="item.value" :value="item.value"
> >
</el-option> </el-option>
</el-select> </el-select> -->
<!-- <el-cascader <el-cascader
style="width:100%" style="width:100%"
v-model="dataForm.areaName" v-model="dataForm.areaId"
placeholder="请选择所属市区级" placeholder="请选择所属市区级"
:options="optionsOfLocation" :options="optionsOfLocation"
:props="{ checkStrictly: true }" :props="props"
ref="myCascader"
@change="changearea"
clearable clearable
></el-cascader> --> ></el-cascader>
</el-form-item> </el-form-item>
<el-form-item <el-form-item
required required
prop="committeeName" prop="committeeId"
v-if="dataForm.ifCheck==1" v-if="dataForm.ifCheck==1"
label="所属委员会" label="所属委员会"
> >
<el-select <el-select
style="width:100%" style="width:100%"
v-model="dataForm.committeeName" @change="changename"
v-model="dataForm.committeeId"
placeholder="请选择所属委员会" placeholder="请选择所属委员会"
clearable clearable
> >
<el-option <el-option
v-for="item in optionsOfCommittee" v-for="item in optionsOfCommittee"
:key="item.value" :key="item.id"
:label="item.label" :label="item.name"
:value="item.value" :value="item.id"
> >
</el-option> </el-option>
</el-select> </el-select>
...@@ -140,7 +149,12 @@ export default { ...@@ -140,7 +149,12 @@ export default {
data() { data() {
return { return {
type: this.$route.query.type, type: this.$route.query.type,
props: {
checkStrictly: true,
value: "id",
label: "name",
children: "children",
},
dataForm: { dataForm: {
id: "", id: "",
name: "", name: "",
...@@ -155,7 +169,7 @@ export default { ...@@ -155,7 +169,7 @@ export default {
uploadDate: "", //上传日期 */ uploadDate: "", //上传日期 */
}, },
optionsOfLocation: [ optionsOfLocation: [
{ /* {
value: "宁波市", value: "宁波市",
label: "宁波市", label: "宁波市",
}, },
...@@ -174,7 +188,7 @@ export default { ...@@ -174,7 +188,7 @@ export default {
{ {
value: "镇海区", value: "镇海区",
label: "镇海区", label: "镇海区",
}, }, */
/* { /* {
value: "ningbo", value: "ningbo",
label: "宁波市", label: "宁波市",
...@@ -198,28 +212,7 @@ export default { ...@@ -198,28 +212,7 @@ export default {
], ],
}, */ }, */
], ],
optionsOfCommittee: [ optionsOfCommittee: [],
{
value: "网络安全协会",
label: "网络安全协会",
},
{
value: "网络安全协会1",
label: "网络安全协会1",
},
{
value: "网络安全协会2",
label: "网络安全协会2",
},
{
value: "网络安全协会3",
label: "网络安全协会3",
},
{
value: "网络安全协会4",
label: "网络安全协会4",
},
],
}; };
}, },
computed: { computed: {
...@@ -232,6 +225,20 @@ export default { ...@@ -232,6 +225,20 @@ export default {
trigger: "blur", trigger: "blur",
}, },
], */ ], */
email: [
{
required: true,
trigger: "blur",
validator: this.checkEmail,
},
],
mobile: [
{
required: true,
trigger: "blur",
validator: this.checkPhone,
},
],
ifCheck: [ ifCheck: [
{ {
required: true, required: true,
...@@ -246,7 +253,7 @@ export default { ...@@ -246,7 +253,7 @@ export default {
trigger: "blur", trigger: "blur",
}, },
], ],
committeeName: [ committeeId: [
{ {
required: true, required: true,
message: this.$t("validate.required"), message: this.$t("validate.required"),
...@@ -263,6 +270,38 @@ export default { ...@@ -263,6 +270,38 @@ export default {
this.init(); this.init();
}, },
methods: { methods: {
checkPhone(rule, value, callback) {
if (!value) {
return callback(new Error("请输入正确的手机号"));
} else if (value == null) {
return callback(new Error("手机号不能为空"));
} else {
const reg = /^((0\d{2,3}-\d{7,8})|(1[35789]\d{9}))$/;
console.log(reg.test(value));
if (reg.test(value)) {
callback();
} else {
return callback(new Error("请输入正确的手机号或座机号"));
}
}
},
checkEmail(rule, value, callback) {
if (!value) {
return callback(new Error("请输入正确的邮箱号"));
} else if (value == null) {
return callback(new Error("邮箱号不能为空"));
} else {
const reg = /^[a-zA-Z0-9]+([-_.][a-zA-Z0-9]+)*@[a-zA-Z0-9]+([-_.][a-zA-Z0-9]+)*\.[a-z]{2,}$/;
console.log(reg.test(value));
if (reg.test(value)) {
callback();
} else {
return callback(new Error("请输入正确的邮箱号"));
}
}
},
init() { init() {
this.dataForm.id = this.$route.query.id; this.dataForm.id = this.$route.query.id;
this.$nextTick(() => { this.$nextTick(() => {
...@@ -272,7 +311,10 @@ export default { ...@@ -272,7 +311,10 @@ export default {
} }
}); });
}, },
// 获取信息 // 获取信息
///committee/committee/list
getInfo() { getInfo() {
this.$http this.$http
.get(`/user/user/${this.dataForm.id}`) .get(`/user/user/${this.dataForm.id}`)
...@@ -294,7 +336,44 @@ export default { ...@@ -294,7 +336,44 @@ export default {
console.log(this.dataForm); console.log(this.dataForm);
}) })
.catch(() => {}); .catch(() => {});
this.$http
.get("/committee/committee/list")
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg);
}
this.optionsOfCommittee = res.data;
})
.catch(() => {});
this.$http
.get("/area/area/list")
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg);
}
this.optionsOfLocation = this.getTreeData(res.data);
console.log(res.data);
})
.catch(() => {});
}, },
getTreeData(data) {
// 循环遍历json数据
for (var i = 0; i < data.length; i++) {
if (data[i].children.length < 1) {
// children若为空数组,则将children设为undefined
data[i].children = undefined;
} else {
// children若不为空数组,则继续 递归调用 本方法
this.getTreeData(data[i].children);
}
}
return data;
},
// 表单提交 // 表单提交
dataFormSubmitHandle: function () { dataFormSubmitHandle: function () {
this.$refs["dataForm"].validate((valid) => { this.$refs["dataForm"].validate((valid) => {
...@@ -304,6 +383,13 @@ export default { ...@@ -304,6 +383,13 @@ export default {
this.$confirm("确定提交吗?") this.$confirm("确定提交吗?")
.then((_) => { .then((_) => {
if (this.dataForm.ifCheck == 1) {
this.dataForm.member = 1;
} else if (this.dataForm.ifCheck == 2) {
this.dataForm.member = 2;
}
console.log("data", this.dataForm);
this.$http[!this.dataForm.id ? "post" : "put"]( this.$http[!this.dataForm.id ? "post" : "put"](
"/user/user/", "/user/user/",
this.dataForm this.dataForm
...@@ -348,9 +434,28 @@ export default { ...@@ -348,9 +434,28 @@ export default {
}) })
.catch((_) => {}); .catch((_) => {});
}, */ }, */
changeAuditStatus(value) { changeAuditStatus(value) {
this.dataForm.ifCheck = value; this.dataForm.ifCheck = value;
}, },
changename(value) {
this.optionsOfCommittee.forEach((ele) => {
if (value == ele.id) {
this.dataForm.committeeName = ele.name;
}
});
},
changearea(value) {
console.log(value);
if (value.length > 0) {
this.dataForm.areaId = value[value.length - 1];
let areaNames = this.$refs.myCascader.getCheckedNodes()[0].pathLabels;
this.dataForm.areaName = areaNames[areaNames.length - 1];
}
// console.log(this.$refs.myCascader.getCheckedNodes()[0].pathLabels);
},
//返回按钮事件 //返回按钮事件
goback() { goback() {
this.$router.go(-1); this.$router.go(-1);
......
...@@ -22,13 +22,15 @@ ...@@ -22,13 +22,15 @@
></el-input> ></el-input>
</el-form-item> </el-form-item>
<el-form-item <el-form-item
label="排序"
prop="sort" prop="sort"
label="排序"
> >
<el-input <el-input-number
v-model="dataForm.sort" v-model="dataForm.sort"
placeholder="排序" controls-position="right"
></el-input> :min="0"
label="排序"
></el-input-number>
</el-form-item> </el-form-item>
</el-form> </el-form>
<template slot="footer"> <template slot="footer">
......
...@@ -48,6 +48,7 @@ ...@@ -48,6 +48,7 @@
label="排序" label="排序"
header-align="center" header-align="center"
align="center" align="center"
width="150"
></el-table-column> ></el-table-column>
<el-table-column <el-table-column
......
...@@ -3,14 +3,23 @@ ...@@ -3,14 +3,23 @@
<el-form <el-form
:inline="true" :inline="true"
:model="dataForm" :model="dataForm"
@keyup.enter.native="getDataList()" @keyup.enter.native="getdatalist()"
> >
<el-form-item> <el-form-item>
<el-input <el-select
style="width:100%"
v-model="dataForm.committee" v-model="dataForm.committee"
placeholder="委员会名称" placeholder="请选择所属委员会"
clearable clearable
></el-input> >
<el-option
v-for="item in optionsOfCommittee"
:key="item.id"
:label="item.name"
:value="item.id"
>
</el-option>
</el-select>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
...@@ -23,7 +32,7 @@ ...@@ -23,7 +32,7 @@
<el-form-item> <el-form-item>
<el-button <el-button
@click="getDataList()" @click="getdatalist()"
type="primary" type="primary"
>{{ $t('query') }}</el-button> >{{ $t('query') }}</el-button>
</el-form-item> </el-form-item>
...@@ -59,11 +68,12 @@ ...@@ -59,11 +68,12 @@
row-key="id" row-key="id"
border border
:indent="16" :indent="16"
:default-expand-all="true"
:select-on-indeterminate="false" :select-on-indeterminate="false"
@select="select" @select="select"
@select-all="selectAll" @select-all="selectAll"
@selection-change="selectionChange" @selection-change="selectionChange"
:tree-props="{children: 'childList'}" :tree-props="{children: 'userInfoList'}"
> >
<el-table-column <el-table-column
type="selection" type="selection"
...@@ -78,7 +88,7 @@ ...@@ -78,7 +88,7 @@
</el-table-column> </el-table-column>
</el-table> </el-table>
{{ selectArr.map(el => el.id) }} <!-- {{ selectArr.map(el => el.id) }} -->
</div> </div>
</template> </template>
...@@ -87,42 +97,46 @@ import mixinViewModule from "@/mixins/view-module"; ...@@ -87,42 +97,46 @@ import mixinViewModule from "@/mixins/view-module";
export default { export default {
name: "committee-table", name: "committee-table",
mixins: [mixinViewModule], mixins: [mixinViewModule],
props: ["invitedUserNames"],
data() { data() {
return { return {
mixinViewModuleOptions: { mixinViewModuleOptions: {
getDataListURL: "/sys/dept/list", getDataListURL: "/user/user/committeeList",
deleteURL: "/sys/dept", // deleteURL: "/sys/dept",
}, },
tableData: [ tableData: [
{ /* {
id: 1, id: "10",
name: "会长及副会长", name: "会长及副会长",
childList: [ childList: [
{ {
id: 31, id: "1",
name: "王小虎", name: "小明",
}, },
{ {
id: 32, id: "2",
name: "王小虎", name: "小明",
}, },
], ],
}, },
{ {
id: 2, id: "3",
name: "协会监事", name: "协会监事",
childList: [ childList: [
{ {
id: 3, id: "4",
name: "张亮亮", name: "小明同学",
}, },
{ {
id: 4, id: "5",
name: "王小虎", name: "小明的同学小红",
}, },
], ],
}, }, */
], ],
tempaalist: [],
tempbblist: [],
optionsOfCommittee: [],
selectArr: [], selectArr: [],
dataForm: { dataForm: {
committee: "", committee: "",
...@@ -130,21 +144,130 @@ export default { ...@@ -130,21 +144,130 @@ export default {
}, },
}; };
}, },
mounted() {
this.getdatalist();
this.getInfo();
},
methods: { methods: {
getInfo() {
this.$http
.get("/committee/committee/list")
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg);
}
this.optionsOfCommittee = res.data;
})
.catch(() => {});
},
getdatalist() {
this.$http
.get(
"/user/user/committeeList?committee=" +
this.dataForm.committee +
"&name=" +
this.dataForm.name
)
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg);
}
this.tableData = res.data;
// console.log("this.tableData", this.tableData);
})
.then(() => {
this.toggleSelections(this.tableData);
})
.catch(() => {});
},
getInclude1(arr1, arr2) {
let temp = [];
for (const item of arr2) {
arr1.find((i) => i.id === item.id) ? temp.push(item) : "";
}
return temp;
},
toggleSelections(rows) {
// console.log("Wodoap", this.tableData);
if (rows) {
rows.forEach((row) => {
if (row.userInfoList) {
row.userInfoList.map((j) => {
// console.log("Wodoapjjj", j);
this.invitedUserNames.map((i) => {
if (i.id == j.id) {
this.toggleSelection(j, true);
}
});
});
let templist = this.getInclude1(
this.invitedUserNames,
row.userInfoList
);
if (templist.length == row.userInfoList.length) {
this.$refs.table.toggleRowSelection(row);
}
// console.log("log", templist);
}
// console.log(row);
});
} else {
this.$refs.table.clearSelection();
}
},
getTreeData(data) {
// 循环遍历json数据
for (var i = 0; i < data.length; i++) {
if (data[i].userInfoList.length < 1) {
// children若为空数组,则将children设为undefined
data[i].userInfoList = undefined;
} else {
// children若不为空数组,则继续 递归调用 本方法
this.getTreeData(data[i].userInfoList);
}
}
return data;
},
select(selection, row) { select(selection, row) {
// console.log("selection", selection);
//this.$refs.table.toggleRowSelection(1, false);
let aatemplist = [];
let bbtemplist = [];
selection.some((el) => {
if (el.userInfoList) {
aatemplist.push(el);
} else {
bbtemplist.push(el);
}
});
aatemplist.some((ele, index) => {
ele.userInfoList.forEach((el) => {
// console.log("el", el.id);
if (el.id == row.id) {
this.$refs.table.toggleRowSelection(this.tableData[index], false);
}
});
});
// console.log("temp", templist);
if ( if (
selection.some((el) => { selection.some((el) => {
return row.id === el.id; return row.id === el.id;
}) })
) { ) {
if (row.childList) { if (row.userInfoList) {
row.childList.map((j) => { row.userInfoList.map((j) => {
this.toggleSelection(j, true); this.toggleSelection(j, true);
}); });
} }
} else { } else {
if (row.childList) { if (row.userInfoList) {
row.childList.map((j) => { row.userInfoList.map((j) => {
this.toggleSelection(j, false); this.toggleSelection(j, false);
}); });
} }
...@@ -163,8 +286,8 @@ export default { ...@@ -163,8 +286,8 @@ export default {
}); });
if (isSelect) { if (isSelect) {
selection.map((el) => { selection.map((el) => {
if (el.childList) { if (el.userInfoList) {
el.childList.map((j) => { el.userInfoList.map((j) => {
this.toggleSelection(j, true); this.toggleSelection(j, true);
}); });
} }
...@@ -172,8 +295,8 @@ export default { ...@@ -172,8 +295,8 @@ export default {
} }
if (isCancel) { if (isCancel) {
this.tableData.map((el) => { this.tableData.map((el) => {
if (el.childList) { if (el.userInfoList) {
el.childList.map((j) => { el.userInfoList.map((j) => {
this.toggleSelection(j, false); this.toggleSelection(j, false);
}); });
} }
...@@ -182,6 +305,43 @@ export default { ...@@ -182,6 +305,43 @@ export default {
}, },
selectionChange(selection) { selectionChange(selection) {
this.selectArr = selection; this.selectArr = selection;
let childByValueContent = [];
selection.forEach((ele) => {
if (ele.userInfoList == undefined) {
childByValueContent.push(ele);
}
});
let aatemplist = [];
let bbtemplist = [];
selection.some((el) => {
if (el.userInfoList) {
aatemplist.push(el);
} else {
bbtemplist.push(el);
}
});
/* let templist2 = [];
templist2 = this.getInclude1(this.tableData, aa);
console.log("aaa", this.tableData.length);
console.log("bbb", templist2.length); */
this.tableData.forEach((ele, index) => {
let templist = [];
templist = this.getInclude1(ele.userInfoList, bbtemplist);
/* console.log("aaa", ele.userInfoList.length);
console.log("bbb", templist.length); */
if (ele.userInfoList.length == templist.length) {
this.$refs.table.toggleRowSelection(this.tableData[index], true);
} else {
this.$refs.table.toggleRowSelection(this.tableData[index], false);
}
});
this.$emit("childByValue", childByValueContent);
}, },
toggleSelection(row, select) { toggleSelection(row, select) {
if (row) { if (row) {
......
...@@ -39,9 +39,7 @@ ...@@ -39,9 +39,7 @@
@click="deleteHandle()" @click="deleteHandle()"
>{{ $t('deleteBatch') }}</el-button> >{{ $t('deleteBatch') }}</el-button>
</el-form-item> </el-form-item>
<el-form-item>
<el-button @click="detail()">详情测试</el-button>
</el-form-item>
</el-form> </el-form>
<el-table <el-table
v-loading="dataListLoading" v-loading="dataListLoading"
...@@ -57,7 +55,7 @@ ...@@ -57,7 +55,7 @@
width="50" width="50"
></el-table-column> ></el-table-column>
<el-table-column <el-table-column
prop="name" prop="title"
label="会议名称" label="会议名称"
header-align="center" header-align="center"
align="center" align="center"
......
...@@ -15,9 +15,9 @@ ...@@ -15,9 +15,9 @@
class="meeting" class="meeting"
style="width:100%;border:2px solid #ccc;border-radius:5px;margin-bottom:20px" style="width:100%;border:2px solid #ccc;border-radius:5px;margin-bottom:20px"
> >
<el-form-item prop="name"> <el-form-item prop="title">
<el-input <el-input
v-model="dataForm.name" v-model="dataForm.title"
style="font-size:22px;border:0" style="font-size:22px;border:0"
placeholder="请在这里输入会议标题" placeholder="请在这里输入会议标题"
></el-input> ></el-input>
...@@ -39,25 +39,25 @@ ...@@ -39,25 +39,25 @@
</div> </div>
<el-form-item <el-form-item
label="选择发送人员:" label="选择发送人员:"
prop="allPeople" prop="invitedUserIDs"
> >
<el-tooltip <!-- <el-tooltip
:content="dataForm.allPeople" :content="allPeople"
placement="left" placement="left"
:disabled="people.length>0?false:true" :disabled="dataForm.invitedUserNames.length>0?false:true"
> > -->
<div class="peoplehide"> <div class="peoplehide">
<span <span
v-for="(item,index) in people.slice(0,200)" v-for="(item,index) in dataForm.invitedUserNames.slice(0,200)"
:key="index" :key="index"
> >
{{item}} {{item.name}}
<span v-if="index<199&&index<people.length-1"></span> <span v-if="index<199&&index<dataForm.invitedUserNames.length-1"></span>
</span> </span>
<span v-if="people.length>200">...</span> <span v-if="dataForm.invitedUserNames.length>200">...</span>
<el-button <el-button
@click="isShow=true" @click="isShow=true"
class="sendbtn" class="sendbtn"
...@@ -66,7 +66,7 @@ ...@@ -66,7 +66,7 @@
></el-button> ></el-button>
</div> </div>
</el-tooltip> <!-- </el-tooltip> -->
</el-form-item> </el-form-item>
...@@ -86,13 +86,19 @@ ...@@ -86,13 +86,19 @@
label="委员会选择" label="委员会选择"
name="first" name="first"
> >
<committeeTable /> <committeeTable
v-on:childByValue="childByValue"
:invitedUserNames="dataForm.invitedUserNames"
/>
</el-tab-pane> </el-tab-pane>
<el-tab-pane <el-tab-pane
label="市区级选择" label="市区级选择"
name="second" name="second"
> >
<locationTable /> <locationTable
v-on:childByValue="childByValue"
:invitedUserNames="dataForm.invitedUserNames"
/>
</el-tab-pane> </el-tab-pane>
</el-tabs> </el-tabs>
...@@ -139,19 +145,28 @@ export default { ...@@ -139,19 +145,28 @@ export default {
isShow: false, isShow: false,
activeName: "first", activeName: "first",
people: ["111", "222"], allPeople: "",
peoplelist: [],
dataForm: { dataForm: {
id: "", id: "",
name: "", title: "",
content: "", content: "",
allPeople: "", /* allPeople: "", */
invitedUserIDs: [],
invitedUserNames: [],
}, },
}; };
}, },
/* watch: {
invitedUserNames: function (newval, oldval) {
console.log("11", newval);
},
}, */
computed: { computed: {
dataRule() { dataRule() {
return { return {
name: [ title: [
{ {
required: true, required: true,
message: this.$t("validate.required"), message: this.$t("validate.required"),
...@@ -165,41 +180,83 @@ export default { ...@@ -165,41 +180,83 @@ export default {
trigger: "blur", trigger: "blur",
}, },
], ],
allPeople: [ /* allPeople: [
{ {
required: true, required: true,
message: this.$t("validate.required"), message: this.$t("validate.required"),
trigger: "blur", trigger: "blur",
}, },
], ], */
}; };
}, },
}, },
created() { created() {
this.init(); this.init();
this.dataForm.allPeople = this.people.join(",");
}, },
methods: { methods: {
init() { init() {
this.$nextTick(() => { this.$nextTick(() => {
this.$refs["dataForm"].resetFields(); this.$refs["dataForm"].resetFields();
if (this.$route.query.id) { // console.log("uuuuuuu", this.$route.query.id);
if (this.$route.query.id != undefined) {
this.dataForm.id = this.$route.query.id; this.dataForm.id = this.$route.query.id;
// console.log(this.dataForm.id);
if (this.dataForm.id) { if (this.dataForm.id) {
this.getInfo(); this.getInfo();
} }
} }
}); });
}, },
unique(arr) {
return Array.from(new Set(arr));
},
unique2(arr) {
const res = new Map();
return arr.filter((arr) => !res.has(arr.id) && res.set(arr.id, 1));
},
//确定选择人员 //确定选择人员
sub() { sub() {
this.$confirm("确定提交吗?") this.$confirm("确定提交吗?")
.then((_) => { .then((_) => {
this.isShow = false; this.isShow = false;
this.dataForm.invitedUserNames = this.peoplelist;
// console.log("pppp", this.peoplelist);
this.dataForm.invitedUserNames = this.unique2(
this.dataForm.invitedUserNames
);
/* console.log(
"this.dataForm.invitedUserNames",
this.dataForm.invitedUserNames
); */
}) })
.catch((_) => {}); .catch((_) => {});
}, },
childByValue: function (childValue) {
// childValue就是子组件传过来的值
if (childValue) {
//console.log("childValue", childValue);
/* childValue.forEach((ele) => {
this.peoplelist.push(ele);
this.dataForm.invitedUserIDs.push(ele.id);
// this.dataForm.invitedUserNames.push(ele.name);
}); */
this.peoplelist = childValue;
this.dataForm.invitedUserIDs = childValue.map((el) => el.id);
// this.dataForm.invitedUserIDs = childValue;
this.peoplelist = this.unique2(this.peoplelist);
this.dataForm.invitedUserIDs = this.unique(
this.dataForm.invitedUserIDs
);
}
/* this.dataForm.invitedUserNames = this.unique(
this.dataForm.invitedUserNames
); */
// this.allPeople = this.dataForm.invitedUserNames.join(",");
},
// 获取信息 // 获取信息
getInfo() { getInfo() {
this.$http this.$http
...@@ -208,11 +265,17 @@ export default { ...@@ -208,11 +265,17 @@ export default {
if (res.code !== 0) { if (res.code !== 0) {
return this.$message.error(res.msg); return this.$message.error(res.msg);
} }
this.dataForm = { this.dataForm = {
...this.dataForm, ...this.dataForm,
...res.data, ...res.data,
}; };
console.log(this.dataForm); // console.log(this.dataForm);
// this.peoplelist=this.dataForm.
//this.allPeople = this.dataForm.invitedUserNames.join(",");
/* if (this.dataForm.invitedUserIDs == null) {
this.dataForm.invitedUserIDs = [];
} */
}) })
.catch(() => {}); .catch(() => {});
}, },
...@@ -238,6 +301,9 @@ export default { ...@@ -238,6 +301,9 @@ export default {
type: "success", type: "success",
}); });
}) })
.then(() => {
this.$router.go(-1);
})
.catch(() => {}); .catch(() => {});
}) })
.catch((_) => {}); .catch((_) => {});
...@@ -276,7 +342,7 @@ export default { ...@@ -276,7 +342,7 @@ export default {
.catch((_) => {}); .catch((_) => {});
}, },
handleClick(tab, event) { handleClick(tab, event) {
console.log(tab, event); //console.log(tab, event);
}, },
//返回按钮事件 //返回按钮事件
......
...@@ -7,7 +7,36 @@ ...@@ -7,7 +7,36 @@
<div class="title"><span class="substyle">会议内容 </span> </div> <div class="title"><span class="substyle">会议内容 </span> </div>
<div class="meetingsContent"> <div class="meetingsContent">
<el-form> <el-form>
<el-form-item label=""> <div
class="meeting"
style="width:100%;border:2px solid #ccc;border-radius:5px;margin-bottom:20px"
>
<el-form-item prop="title">
<el-input
v-model="dataform1.title"
style="font-size:22px;border:0"
disabled
placeholder="暂无标题"
></el-input>
</el-form-item>
<el-form-item
prop="content"
label=""
>
<el-input
type="textarea"
:rows="14"
resize="none"
v-model="dataform1.content"
disabled
:autosize="{ minRows: 6, maxRows: 14 }"
placeholder="暂无内容"
></el-input>
</el-form-item>
</div>
<!-- <el-form-item label="">
<el-input <el-input
type="textarea" type="textarea"
:autosize="{ minRows: 6, maxRows: 14 }" :autosize="{ minRows: 6, maxRows: 14 }"
...@@ -16,15 +45,13 @@ ...@@ -16,15 +45,13 @@
placeholder="暂无" placeholder="暂无"
disabled disabled
></el-input> ></el-input>
</el-form-item> </el-form-item> -->
<el-form-item <el-form-item label="已发送人员:">
required
label="发送人员:"
>
<el-input <el-input
disabled disabled
type="textarea" type="textarea"
:rows="4" :rows="4"
resize="none"
class="sendpeople" class="sendpeople"
placeholder="暂无" placeholder="暂无"
v-model="dataform1.people" v-model="dataform1.people"
...@@ -83,43 +110,44 @@ ...@@ -83,43 +110,44 @@
width="50" width="50"
></el-table-column> ></el-table-column>
<el-table-column <el-table-column
prop="company" prop="userInfo.company"
label="单位" label="单位"
header-align="center" header-align="center"
align="center" align="center"
></el-table-column> ></el-table-column>
<el-table-column <el-table-column
prop="name" prop="userInfo.name"
label="姓名" label="姓名"
header-align="center" header-align="center"
align="center" align="center"
></el-table-column> ></el-table-column>
<el-table-column <el-table-column
prop="email" prop="userInfo.email"
label="邮箱" label="邮箱"
header-align="center" header-align="center"
align="center" align="center"
></el-table-column> ></el-table-column>
<el-table-column <el-table-column
prop="mobile" prop="userInfo.mobile"
label="手机号" label="手机号"
sortable="custom" sortable="custom"
header-align="center" header-align="center"
align="center" align="center"
></el-table-column> ></el-table-column>
<el-table-column <el-table-column
prop="gender" prop="userInfo.sex"
label="性别" label="性别"
sortable="custom" sortable="custom"
header-align="center" header-align="center"
align="center" align="center"
> >
<template slot-scope="scope"> <template slot-scope="scope">
{{ $getDictLabel("gender", scope.row.gender) }} <span v-if="scope.row.userInfo.sex==1"></span>
<span v-if="scope.row.userInfo.sex==2"></span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="position" prop="userInfo.position"
label="职位" label="职位"
header-align="center" header-align="center"
align="center" align="center"
...@@ -144,6 +172,16 @@ ...@@ -144,6 +172,16 @@
> >
</el-pagination> </el-pagination>
</div> </div>
<div class="footer">
<el-button
style="border:1px solid #17B3A3;color:#17B3A3;width:100px;float:right;margin-top:20px"
@click="goback"
>
返回
</el-button>
</div>
</div> </div>
</el-card> </el-card>
...@@ -157,16 +195,17 @@ export default { ...@@ -157,16 +195,17 @@ export default {
data() { data() {
return { return {
mixinViewModuleOptions: { mixinViewModuleOptions: {
getDataListURL: "/sys/user/page", getDataListURL:
"/meeting/wlmeetingstaff/page?registrationState=1&meetingId=" +
this.$route.query.id,
getDataListIsPage: true, getDataListIsPage: true,
deleteURL: "/sys/user",
deleteIsBatch: true, deleteIsBatch: true,
exportURL: "/sys/user/export", exportURL: "/meeting/wlmeetingstaff/export",
}, },
dataform1: { dataform1: {
meetingContent: "1111", meetingContent: "1111",
people: people: "",
"张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧",
}, },
dataForm: { dataForm: {
company: "", company: "",
...@@ -174,35 +213,38 @@ export default { ...@@ -174,35 +213,38 @@ export default {
}, },
}; };
}, },
created() {
this.init();
},
methods: { methods: {
//返回按钮事件
goback() {
this.$router.go(-1);
},
init() { init() {
console.log(this.$route.query.id); console.log(this.$route.query.id);
this.dataForm.id = this.$route.query.id; this.dataform1.id = this.$route.query.id;
this.$nextTick(() => { this.$nextTick(() => {
this.$refs["dataForm"].resetFields(); // this.$refs["dataForm"].resetFields();
if (this.dataForm.id) { if (this.dataform1.id) {
this.getInfo(); this.getInfo();
} }
}); });
console.log("ppp", this.dataForm.sex);
console.log("pppo", typeof this.dataForm.sex);
}, },
// 获取信息 // 获取信息
getInfo() { getInfo() {
this.$http this.$http
.get(`/meeting/meeting/${this.dataForm.id}`) .get(`/meeting/meeting/${this.dataform1.id}`)
.then(({ data: res }) => { .then(({ data: res }) => {
if (res.code !== 0) { if (res.code !== 0) {
return this.$message.error(res.msg); return this.$message.error(res.msg);
} }
this.dataForm = { this.dataform1 = {
...this.dataForm, ...this.dataform1,
...res.data, ...res.data,
}; };
console.log("ppppppp", this.dataForm); console.log("ppppppp", this.dataform1);
console.log("ppp", this.dataForm.sex); this.dataform1.people = this.dataform1.invitedUserNames.join(",");
this.dataForm.sex = this.dataForm.sex + "";
}) })
.catch(() => {}); .catch(() => {});
}, },
...@@ -211,9 +253,18 @@ export default { ...@@ -211,9 +253,18 @@ export default {
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
/deep/.el-textarea__inner { .meeting {
font-size: 22px; /deep/.el-input__inner {
font-size: 22px !important;
border: 0;
}
/deep/.el-textarea__inner {
font-size: 16px;
border: 0;
padding: 0 0 0 30px;
}
} }
/deep/.el-input.is-disabled .el-input__inner { /deep/.el-input.is-disabled .el-input__inner {
color: #000; color: #000;
background: #fff; background: #fff;
...@@ -245,6 +296,9 @@ export default { ...@@ -245,6 +296,9 @@ export default {
padding-left: 10px; padding-left: 10px;
} }
} }
.footer {
width: 100%;
}
.other { .other {
//background: #eee; //background: #eee;
......
...@@ -26,10 +26,11 @@ ...@@ -26,10 +26,11 @@
<el-form-item> <el-form-item>
<el-form-item> <el-form-item>
<el-cascader <el-cascader
v-model="dataForm.location" v-model="dataForm.area"
placeholder="请选择所属市区级" placeholder="请选择所属市区级"
:options="optionsOfLocation" :options="optionsOfLocation"
:props="{ checkStrictly: true }" @change="changearea"
:props="props"
clearable clearable
></el-cascader> ></el-cascader>
</el-form-item> </el-form-item>
...@@ -195,8 +196,14 @@ export default { ...@@ -195,8 +196,14 @@ export default {
deleteIsBatch: true, deleteIsBatch: true,
exportURL: "/sys/user/export", exportURL: "/sys/user/export",
}, },
props: {
checkStrictly: true,
value: "id",
label: "name",
children: "children",
},
optionsOfLocation: [ optionsOfLocation: [
{ /* {
value: "ningbo", value: "ningbo",
label: "宁波", label: "宁波",
children: [ children: [
...@@ -217,15 +224,50 @@ export default { ...@@ -217,15 +224,50 @@ export default {
label: "镇海区", label: "镇海区",
}, },
], ],
}, }, */
], ],
dataForm: { dataForm: {
username: "", username: "",
deptId: "", area: "",
gender: "", gender: "",
}, },
}; };
}, },
methods: {
getInfo() {
this.$http
.get("/area/area/list")
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg);
}
this.optionsOfLocation = this.getTreeData(res.data);
console.log(res.data);
})
.catch(() => {});
},
changearea(value) {
console.log(value);
this.dataForm.area = value[value.length - 1];
},
getTreeData(data) {
// 循环遍历json数据
for (var i = 0; i < data.length; i++) {
if (data[i].children.length < 1) {
// children若为空数组,则将children设为undefined
data[i].children = undefined;
} else {
// children若不为空数组,则继续 递归调用 本方法
this.getTreeData(data[i].children);
}
}
return data;
},
},
created() {
this.getInfo();
},
components: { components: {
AddOrUpdate, AddOrUpdate,
}, },
......
...@@ -29,21 +29,23 @@ ...@@ -29,21 +29,23 @@
v-model="dataForm.area" v-model="dataForm.area"
placeholder="请选择所属市区级" placeholder="请选择所属市区级"
:options="optionsOfLocation" :options="optionsOfLocation"
:props="{ checkStrictly: true }" @change="changearea"
:props="props"
clearable clearable
></el-cascader> ></el-cascader>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-select <el-select
@change="changename"
v-model="dataForm.committee" v-model="dataForm.committee"
placeholder="请选择所属委员会" placeholder="请选择所属委员会"
clearable clearable
> >
<el-option <el-option
v-for="item in optionsOfCommittee" v-for="item in optionsOfCommittee"
:key="item.value" :key="item.id"
:label="item.label" :label="item.name"
:value="item.value" :value="item.id"
> >
</el-option> </el-option>
</el-select> </el-select>
...@@ -191,12 +193,18 @@ export default { ...@@ -191,12 +193,18 @@ export default {
data() { data() {
return { return {
mixinViewModuleOptions: { mixinViewModuleOptions: {
getDataListURL: "/user/user/page", getDataListURL: "/user/user/page?check=1",
getDataListIsPage: true, getDataListIsPage: true,
exportURL: "/user/user/export", exportURL: "/user/user/export",
deleteURL: "/user/user", deleteURL: "/user/user",
deleteIsBatch: true, deleteIsBatch: true,
}, },
props: {
checkStrictly: true,
value: "id",
label: "name",
children: "children",
},
dataForm: { dataForm: {
company: "", company: "",
name: "", name: "",
...@@ -204,7 +212,7 @@ export default { ...@@ -204,7 +212,7 @@ export default {
committee: "", committee: "",
}, },
optionsOfLocation: [ optionsOfLocation: [
{ /* {
value: "ningbo", value: "ningbo",
label: "宁波", label: "宁波",
children: [ children: [
...@@ -225,10 +233,10 @@ export default { ...@@ -225,10 +233,10 @@ export default {
label: "镇海区", label: "镇海区",
}, },
], ],
}, }, */
], ],
optionsOfCommittee: [ optionsOfCommittee: [
{ /* {
value: "网络安全协会", value: "网络安全协会",
label: "网络安全协会", label: "网络安全协会",
}, },
...@@ -247,11 +255,61 @@ export default { ...@@ -247,11 +255,61 @@ export default {
{ {
value: "网络安全协会4", value: "网络安全协会4",
label: "网络安全协会4", label: "网络安全协会4",
}, }, */
], ],
}; };
}, },
created() {
this.getInfo();
},
methods: { methods: {
getInfo() {
this.$http
.get("/committee/committee/list")
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg);
}
this.optionsOfCommittee = res.data;
})
.catch(() => {});
this.$http
.get("/area/area/list")
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg);
}
this.optionsOfLocation = this.getTreeData(res.data);
})
.catch(() => {});
},
getTreeData(data) {
// 循环遍历json数据
for (var i = 0; i < data.length; i++) {
if (data[i].children.length < 1) {
// children若为空数组,则将children设为undefined
data[i].children = undefined;
} else {
// children若不为空数组,则继续 递归调用 本方法
this.getTreeData(data[i].children);
}
}
return data;
},
changename(value) {
/* this.optionsOfCommittee.forEach((ele) => {
if (value == ele.id) {
this.dataForm.committeeName = ele.name;
}
}); */
this.dataForm.committee = value;
},
changearea(value) {
console.log(value);
this.dataForm.area = value[value.length - 1];
},
taozhuan(id) { taozhuan(id) {
this.$router.push({ this.$router.push({
path: "/memberManageExamine", path: "/memberManageExamine",
......
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