Commit c75e5cd6 authored by 刘殿昕's avatar 刘殿昕

Merge branch 'ldx' into dev

parents b13d1a0c 14ec2c15
...@@ -404,7 +404,6 @@ export default { ...@@ -404,7 +404,6 @@ export default {
}; };
}, },
mounted() { mounted() {
console.log(this.datas);
this.getDataFromApiSync(); this.getDataFromApiSync();
}, },
watch: { watch: {
...@@ -462,7 +461,6 @@ export default { ...@@ -462,7 +461,6 @@ export default {
this.selectedTabsPage = arrs; this.selectedTabsPage = arrs;
} }
this.metaData = [...this.selectedTabsPage]; this.metaData = [...this.selectedTabsPage];
console.log(this.selectedTabsPage);
}, },
err => { err => {
console.log("失败" + err); console.log("失败" + err);
...@@ -489,7 +487,6 @@ export default { ...@@ -489,7 +487,6 @@ export default {
if (this.url == "") { if (this.url == "") {
let newArr = []; let newArr = [];
if (this.datas) { if (this.datas) {
console.log(this.datas);
newArr = this.datas; newArr = this.datas;
} }
let total = newArr.length; let total = newArr.length;
...@@ -503,7 +500,6 @@ export default { ...@@ -503,7 +500,6 @@ export default {
arr.forEach(item => { arr.forEach(item => {
obj = obj[item]; obj = obj[item];
}); });
console.log(query);
obj(query) obj(query)
.then(response => { .then(response => {
let newArr = response.data.data; let newArr = response.data.data;
...@@ -556,7 +552,6 @@ export default { ...@@ -556,7 +552,6 @@ export default {
// 设置元素select // 设置元素select
setMeta(arr, row, state) { setMeta(arr, row, state) {
let self = this; let self = this;
console.log(arr, row, state);
for (let i = 0; i < arr.length; i++) { for (let i = 0; i < arr.length; i++) {
if (arr[i].id == row.id) { if (arr[i].id == row.id) {
if (arr[i].selected) { if (arr[i].selected) {
...@@ -597,7 +592,6 @@ export default { ...@@ -597,7 +592,6 @@ export default {
}, },
// 获取父元素 // 获取父元素
getParent(arr, pid) { getParent(arr, pid) {
console.log(arr);
let self = this; let self = this;
for (let i = 0; i < arr.length; i++) { for (let i = 0; i < arr.length; i++) {
if (arr[i].id == pid) { if (arr[i].id == pid) {
...@@ -697,7 +691,6 @@ export default { ...@@ -697,7 +691,6 @@ export default {
this.changeUp(arr, val.id, val.inputValue, val.fileUrl, val.header); this.changeUp(arr, val.id, val.inputValue, val.fileUrl, val.header);
this.selectedTabsPage = arr; this.selectedTabsPage = arr;
this.$emit("changeTable", this.selectedTabsPage); this.$emit("changeTable", this.selectedTabsPage);
console.log(arr, this.selectedTabsPage);
if ( if (
this.autoAdd && this.autoAdd &&
val.inputValue != "" && val.inputValue != "" &&
......
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
<el-col :span="16" class="col_sty_l"> <el-col :span="16" class="col_sty_l">
<div class="left_station"> <div class="left_station">
<div class="btn_club"> <div class="btn_club">
<button v-if="nodeId==''" class="btn btn_dis"> <button v-if="nodeId==''" class="btn btn_act1" @click="appendParent()">
<i class="el-icon-plus"></i>&nbsp;新建 <i class="el-icon-plus"></i>&nbsp;新建
</button> </button>
<button v-else class="btn btn_act1" @click="appendNode()"> <button v-else class="btn btn_act1" @click="appendNode()">
...@@ -52,10 +52,10 @@ ...@@ -52,10 +52,10 @@
<button v-else class="btn btn_dis"> <button v-else class="btn btn_dis">
<i class="el-icon-check"></i>&nbsp;保存 <i class="el-icon-check"></i>&nbsp;保存
</button> </button>
<button v-if="!reset" class="btn btn_dis"> <button v-if="canSave" class="btn btn_act4" @click="resetForm()">
<i class="el-icon-refresh-left"></i>&nbsp;重置 <i class="el-icon-refresh-left"></i>&nbsp;重置
</button> </button>
<button v-else class="btn btn_act4" @click="resetForm()"> <button v-else class="btn btn_dis">
<i class="el-icon-refresh-left"></i>&nbsp;重置 <i class="el-icon-refresh-left"></i>&nbsp;重置
</button> </button>
<button v-if="nodeId==''" class="btn btn_dis"> <button v-if="nodeId==''" class="btn btn_dis">
...@@ -108,50 +108,21 @@ import helper from "@/services/helper.js"; ...@@ -108,50 +108,21 @@ import helper from "@/services/helper.js";
export default { export default {
data() { data() {
var validateMenuName = (rule, value, callback) => { var validateMenuName = (rule, value, callback) => {
if (value != this.formContrast.menu_name) {
this.reset = true;
}
if (value == "") { if (value == "") {
this.mcHold = false;
callback(new Error("请填写菜单名称")); callback(new Error("请填写菜单名称"));
} else if (value.length > 8) { } else if (value.length > 8) {
this.mcHold = false;
callback(new Error("菜单名称不超过8位")); callback(new Error("菜单名称不超过8位"));
} else { } else {
this.mcHold = true;
callback(); callback();
} }
}; };
var validatePageUrl = (rule, value, callback) => { var validatePageUrl = (rule, value, callback) => {
if (value != this.formContrast.visit_url) {
this.reset = true;
}
if (value == "") { if (value == "") {
this.ymHold = false;
callback(new Error("请填写菜单访问地址")); callback(new Error("请填写菜单访问地址"));
} else { } else {
this.ymHold = true;
callback(); callback();
} }
}; };
var validateDescribe = (rule, value, callback) => {
if (value != this.formContrast.detail) {
this.reset = true;
}
callback();
};
var validateTeamName = (rule, value, callback) => {
if (value != this.formContrast.team_name) {
this.reset = true;
}
callback();
};
var validateMenuOrder = (rule, value, callback) => {
if (value != this.formContrast.menu_order) {
this.reset = true;
}
callback();
};
return { return {
checkText: "", checkText: "",
treeData: [], treeData: [],
...@@ -181,16 +152,10 @@ export default { ...@@ -181,16 +152,10 @@ export default {
rules: { rules: {
menu_name: [{ validator: validateMenuName, trigger: "input" }], menu_name: [{ validator: validateMenuName, trigger: "input" }],
visit_url: [{ validator: validatePageUrl, trigger: "input" }], visit_url: [{ validator: validatePageUrl, trigger: "input" }],
team_name: [{ validator: validateTeamName, trigger: "input" }],
detail: [{ validator: validateDescribe, trigger: "input" }],
menu_order: [{ validator: validateMenuOrder, trigger: "input" }]
}, },
nodeId: "", nodeId: "",
previousSibling: false, previousSibling: false,
nextSibling: false, nextSibling: false,
mcHold: false,
ymHold: false,
reset: false,
newI: 0, newI: 0,
helper: helper, helper: helper,
canSave: false canSave: false
...@@ -210,6 +175,7 @@ export default { ...@@ -210,6 +175,7 @@ export default {
return data.label.indexOf(value) !== -1; return data.label.indexOf(value) !== -1;
}, },
nodeClick(data, node) { nodeClick(data, node) {
console.log(data, node);
this.canSave = false; this.canSave = false;
if (this.nodeId.indexOf("new") > -1) { if (this.nodeId.indexOf("new") > -1) {
let result = this.formStaged.some(item => { let result = this.formStaged.some(item => {
...@@ -227,6 +193,7 @@ export default { ...@@ -227,6 +193,7 @@ export default {
this.formStaged.push({ id: this.nodeId, data: this.formDetail }); this.formStaged.push({ id: this.nodeId, data: this.formDetail });
} }
this.nodeId = data.menu_id; this.nodeId = data.menu_id;
console.log(node);
if (node.previousSibling != undefined) { if (node.previousSibling != undefined) {
this.previousSibling = true; this.previousSibling = true;
} else { } else {
...@@ -284,14 +251,48 @@ export default { ...@@ -284,14 +251,48 @@ export default {
}); });
this.formDetail.menu_order = node.parent.childNodes.length; this.formDetail.menu_order = node.parent.childNodes.length;
this.formDetail.menu_name = newChild.menu_name; this.formDetail.menu_name = newChild.menu_name;
this.formDetail.team_name = node.parent.data.team_name;
this.formDetail.create_date = helper.dateFormat(
"YYYY-mm-dd HH:MM:SS",
new Date()
);
this.formDetail.detail = "";
this.formDetail.visit_url = "";
this.$message({
message: "不要忘了完善信息哦",
type: "success"
});
this.nodeClick(newChild, node);
},
appendParent() {
let newChild = {
menu_id: "new" + this.newI,
menu_name: "新菜单",
Child: []
};
this.$refs.tree.insertAfter(
newChild,
this.treeData[this.treeData.length - 1].menu_id
);
this.newI++;
this.$refs.tree.setCurrentKey(newChild.menu_id);
this.$api.user.getNowUser().then(response => {
if (response.data.success == 1) {
this.formDetail.create_user = response.data.data.user_name;
} else {
console.log(response.data.errMsg);
}
});
let node = this.$refs.tree.getNode(newChild.menu_id);
this.formDetail.menu_order = this.treeData.length;
this.formDetail.menu_name = newChild.menu_name;
this.formDetail.team_name = "apaas";
this.formDetail.create_date = helper.dateFormat( this.formDetail.create_date = helper.dateFormat(
"YYYY-mm-dd HH:MM:SS", "YYYY-mm-dd HH:MM:SS",
new Date() new Date()
); );
this.formDetail.detail = ""; this.formDetail.detail = "";
this.formDetail.team_name = "";
this.formDetail.visit_url = ""; this.formDetail.visit_url = "";
this.mcHold = true;
this.$message({ this.$message({
message: "不要忘了完善信息哦", message: "不要忘了完善信息哦",
type: "success" type: "success"
...@@ -299,7 +300,14 @@ export default { ...@@ -299,7 +300,14 @@ export default {
this.nodeClick(newChild, node); this.nodeClick(newChild, node);
}, },
resetForm() { resetForm() {
this.formDetail = this.formContrast; this.formDetail.menu_name = this.formContrast.menu_name;
this.formDetail.visit_url = this.formContrast.visit_url;
this.formDetail.team_name = this.formContrast.team_name;
this.formDetail.detail = this.formContrast.detail;
this.formDetail.menu_order = this.formContrast.menu_order;
this.formDetail.create_user = this.formContrast.create_user;
this.formDetail.create_date = this.formContrast.create_date;
this.canSave = false;
}, },
getTree() { getTree() {
this.$api.authority.getMenuList().then(response => { this.$api.authority.getMenuList().then(response => {
......
...@@ -5,11 +5,7 @@ ...@@ -5,11 +5,7 @@
<el-breadcrumb-item>{{ $t("lang.profile") }}</el-breadcrumb-item> <el-breadcrumb-item>{{ $t("lang.profile") }}</el-breadcrumb-item>
</el-breadcrumb> </el-breadcrumb>
<block-radius class="info_block"> <block-radius class="info_block">
<el-tabs <el-tabs v-if="is_admin == 3 || is_admin == 4" v-model="activeName" @tab-click="changeTab">
v-if="user_data.is_admin == 3 || user_data.is_admin == 4"
v-model="activeName"
@tab-click="changeTab"
>
<el-tab-pane label="个人信息详情" name="0"></el-tab-pane> <el-tab-pane label="个人信息详情" name="0"></el-tab-pane>
<el-tab-pane label="业务系统详情" name="1"></el-tab-pane> <el-tab-pane label="业务系统详情" name="1"></el-tab-pane>
</el-tabs> </el-tabs>
...@@ -168,6 +164,7 @@ export default { ...@@ -168,6 +164,7 @@ export default {
}, },
data: () => ({ data: () => ({
activeName: "0", activeName: "0",
is_admin: 0,
user_data: { user_data: {
accountNo: "", accountNo: "",
password: "12345678", password: "12345678",
...@@ -225,6 +222,7 @@ export default { ...@@ -225,6 +222,7 @@ export default {
getCurrentUser() { getCurrentUser() {
this.$api.user.getNowUser().then(response => { this.$api.user.getNowUser().then(response => {
if (response.data.success == 1) { if (response.data.success == 1) {
this.is_admin = response.data.data.is_admin;
this.getUserInfo(response.data.data.user_id); this.getUserInfo(response.data.data.user_id);
} else { } else {
console.log(response.data.errMsg); console.log(response.data.errMsg);
...@@ -238,8 +236,8 @@ export default { ...@@ -238,8 +236,8 @@ export default {
this.user_data.accountNo = data.user_id; this.user_data.accountNo = data.user_id;
this.user_data.nickname = data.user_name; this.user_data.nickname = data.user_name;
this.user_data.contactPerson = data.link_man; this.user_data.contactPerson = data.link_man;
this.user_data.phone = data.user_id; this.user_data.phone = data.phone;
this.user_data.email = data.user_id; this.user_data.email = data.email;
this.user_data.organization = data.department; this.user_data.organization = data.department;
this.user_data.userType = data.is_admin; this.user_data.userType = data.is_admin;
this.imgList.push(data.picture_path); this.imgList.push(data.picture_path);
...@@ -254,11 +252,47 @@ export default { ...@@ -254,11 +252,47 @@ export default {
}, },
changeTab() {}, changeTab() {},
getNewList(val) { getNewList(val) {
console.log(val);
this.imgList[0] = val.url; this.imgList[0] = val.url;
}, },
previous() {}, previous() {},
registe() {}, registe() {
let query = {};
if (this.activeName == 0) {
console.log(this.user_data, this.imgList);
query = {
pageType: "personalFile", // this page is user info
user_id: this.user_data.accountNo,
user_name: this.user_data.nickname,
phone: this.user_data.phone,
email: this.user_data.email,
is_admin: this.user_data.userType,
link_man: this.user_data.contactPerson,
picture_path: this.imgList[0]
};
} else if (this.activeName == 1) {
query = {
pageType: "systemFile", // this page is system info
system_name: this.formBusiness.businessSystemName,
domain_name: this.formBusiness.domainName,
ip_whitelist: this.formBusiness.ip_white,
ip_blacklist: this.formBusiness.ip_black,
description: this.formBusiness.description
};
}
this.$api.authority.setUserInfo(query).then(response => {
if (response.data.success == 1) {
this.$message({
message: "修改个人信息成功",
type: "success"
});
} else {
this.$message({
message: "修改个人信息失败",
type: "error"
});
}
});
},
changePassword() { changePassword() {
this.diaPassWord = true; this.diaPassWord = true;
}, },
......
...@@ -10,11 +10,11 @@ ...@@ -10,11 +10,11 @@
<block-radius> <block-radius>
<el-row> <el-row>
<el-button <el-button
v-for="item in btnList" v-for="(item, index) in btnList"
:key="item.id" :key="item.id"
@click="clickBtn(item.id)" @click="clickBtn(index)"
:class="activeBtn == item.id ? 'fwcs_btn_act':'fwcs_btn_dis'" :class="activeBtn == index ? 'fwcs_btn_act':'fwcs_btn_dis'"
>{{ item.text }}</el-button> >{{ item.name }}</el-button>
</el-row> </el-row>
<div class="gray_line"></div> <div class="gray_line"></div>
<div v-if="activeBtn == 4"> <div v-if="activeBtn == 4">
...@@ -353,14 +353,8 @@ export default { ...@@ -353,14 +353,8 @@ export default {
}, },
data() { data() {
return { return {
btnList: [ btnList: [],
{ icon: "", text: "数据服务", id: 0 }, activeBtn: null,
{ icon: "", text: "时空服务", id: 1 },
{ icon: "", text: "视频服务", id: 2 },
{ icon: "", text: "感知服务", id: 3 },
{ icon: "", text: "综合服务", id: 4 }
],
activeBtn: 0,
serviceUrl: "", serviceUrl: "",
select: "GET", select: "GET",
optionType: [ optionType: [
...@@ -734,7 +728,7 @@ export default { ...@@ -734,7 +728,7 @@ export default {
cover: this.cover[0], cover: this.cover[0],
openness: this.form.resource, openness: this.form.resource,
descript: this.form.desc, descript: this.form.desc,
data_service_type1: this.activeBtn, data_service_type1: this.btnList[this.activeBtn].id,
data_service_type2: data_service_type2:
this.activeBtn == 1 this.activeBtn == 1
? this.skfwRadios ? this.skfwRadios
...@@ -808,9 +802,20 @@ export default { ...@@ -808,9 +802,20 @@ export default {
console.log(response.data.errMsg); console.log(response.data.errMsg);
} }
}); });
},
getServiceType1() {
this.$api.workbench.getServiceTypeList().then(response => {
if (response.data.success == 1) {
this.btnList = response.data.data;
this.activeBtn = 0;
} else {
console.log(response.data.errMsg);
}
});
} }
}, },
mounted() { mounted() {
this.getServiceType1();
this.getArea(); this.getArea();
} }
}; };
...@@ -824,7 +829,6 @@ export default { ...@@ -824,7 +829,6 @@ export default {
margin-bottom: 20px; margin-bottom: 20px;
} }
.fwcs_btn_act { .fwcs_btn_act {
width: 100px;
background-color: #e56600; background-color: #e56600;
color: #ffffff; color: #ffffff;
} }
......
...@@ -26,6 +26,11 @@ const authority = { ...@@ -26,6 +26,11 @@ const authority = {
getOrganizationList() { getOrganizationList() {
return axios.get(`/apaas/backmgt/department/list`); return axios.get(`/apaas/backmgt/department/list`);
}, },
// User
setUserInfo(params) {
return axios.put(`/apaas/backmgt/user/put`, params);
},
} }
export default authority; export default authority;
...@@ -13,6 +13,11 @@ const workbench = { ...@@ -13,6 +13,11 @@ const workbench = {
getServiceAreaList() { getServiceAreaList() {
return axios.get(`/apaas/service/v3/service/manager/servarea`) return axios.get(`/apaas/service/v3/service/manager/servarea`)
}, },
// service type
getServiceTypeList() {
return axios.get(`/apaas/service/v3/service/manager/servtype`)
},
} }
export default workbench; export default workbench;
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