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

Merge branch 'ldx' into dev

parents d0b635e2 a1d3e3c1
...@@ -122,7 +122,7 @@ ...@@ -122,7 +122,7 @@
@click="viewDetail(cellItem.order_id)" @click="viewDetail(cellItem.order_id)"
>查看详情</el-button> >查看详情</el-button>
<div <div
v-if="cellItem.approval_second_level == 1 && cellItem.pay_status != -1" v-if="cellItem.approval_second_level == 1 && cellItem.pay_status != -1 || cellItem.pay_status == -1"
class="cell_option_spec" class="cell_option_spec"
@click="nextApply" @click="nextApply"
>再次申请</div> >再次申请</div>
...@@ -140,9 +140,7 @@ ...@@ -140,9 +140,7 @@
<el-rate <el-rate
v-model="message.score" v-model="message.score"
disabled disabled
show-score :colors="colors"
text-color="#ff9900"
score-template="{value}"
></el-rate> ></el-rate>
</div> </div>
<div class="msg_title">评价详情:</div> <div class="msg_title">评价详情:</div>
...@@ -174,6 +172,13 @@ export default { ...@@ -174,6 +172,13 @@ export default {
helper: helper, helper: helper,
message: {}, message: {},
}), }),
watch: {
cellItem: {
handler() {
this.showMsgBox = false;
}
}
},
methods: { methods: {
addEvaluation() { addEvaluation() {
if (this.textarea == "" && this.serviceRate == null) { if (this.textarea == "" && this.serviceRate == null) {
...@@ -274,7 +279,7 @@ export default { ...@@ -274,7 +279,7 @@ export default {
path: "/shop/shop_car_apply", path: "/shop/shop_car_apply",
query: query, query: query,
}); });
} else if (this.cellItem.order_type == 2) { } else if (this.cellItem.order_type == 3) {
this.$router.push({ this.$router.push({
path: "/shop/shop_cloud", path: "/shop/shop_cloud",
}); });
...@@ -512,10 +517,10 @@ export default { ...@@ -512,10 +517,10 @@ export default {
margin: 0 0 10px; margin: 0 0 10px;
} }
.msg_rate { .msg_rate {
margin: 0 0 10px 20px; margin: 0 0 20px 0;
} }
.msg_text { .msg_text {
margin-left: 20px; /* margin-left: 20px; */
color: #242c43; color: #242c43;
} }
</style> </style>
......
...@@ -80,7 +80,7 @@ ...@@ -80,7 +80,7 @@
import OrderList from "@/components/order-list/order-list-list"; import OrderList from "@/components/order-list/order-list-list";
export default { export default {
components: { components: {
OrderList OrderList,
}, },
data: () => ({ data: () => ({
stateList: [ stateList: [
...@@ -89,7 +89,7 @@ export default { ...@@ -89,7 +89,7 @@ export default {
{ value: "2", label: "审核中" }, { value: "2", label: "审核中" },
{ value: "3", label: "已获取" }, { value: "3", label: "已获取" },
{ value: "4", label: "未通过" }, { value: "4", label: "未通过" },
{ value: "5", label: "已取消" } { value: "5", label: "已取消" },
], ],
activeName: "0", activeName: "0",
buttonList: [], buttonList: [],
...@@ -97,23 +97,23 @@ export default { ...@@ -97,23 +97,23 @@ export default {
pagination: { pagination: {
rowsPerPage: 10, rowsPerPage: 10,
page: 1, page: 1,
total: 0 total: 0,
}, },
pageOptions: [ pageOptions: [
{ {
value: "10", value: "10",
label: "10" label: "10",
}, },
{ {
value: "20", value: "20",
label: "20" label: "20",
}, },
{ {
value: "50", value: "50",
label: "50" label: "50",
} },
], ],
datas: [] datas: [],
}), }),
mounted() { mounted() {
this.getBtns(); this.getBtns();
...@@ -121,13 +121,13 @@ export default { ...@@ -121,13 +121,13 @@ export default {
}, },
methods: { methods: {
getBtns() { getBtns() {
this.$api.user.getOrderBtnTypes().then(response => { this.$api.user.getOrderBtnTypes().then((response) => {
if (response.data.success == 1) { if (response.data.success == 1) {
let buttonList = response.data.data; let buttonList = response.data.data;
buttonList.forEach(item => { buttonList.forEach((item) => {
item.state = false; item.state = false;
}); });
buttonList.unshift({ id: "", name: "全部", state: false }); buttonList.unshift({ id: 0, name: "全部", state: false });
buttonList.push({ id: "cloud", name: "云资源", state: false }); buttonList.push({ id: "cloud", name: "云资源", state: false });
buttonList.push({ id: "app", name: "应用镜像", state: false }); buttonList.push({ id: "app", name: "应用镜像", state: false });
this.buttonList = buttonList; this.buttonList = buttonList;
...@@ -147,12 +147,14 @@ export default { ...@@ -147,12 +147,14 @@ export default {
} }
this.buttonList[0].state = !this.buttonList[0].state; this.buttonList[0].state = !this.buttonList[0].state;
} }
this.pagination.page = 1;
this.getData(); this.getData();
}, },
// search debonce 500ms // search debonce 500ms
searchVal() { searchVal() {
if (this.times !== null) clearTimeout(this.times); if (this.times !== null) clearTimeout(this.times);
this.times = setTimeout(() => { this.times = setTimeout(() => {
this.pagination.page = 1;
this.getData(); this.getData();
}, 500); }, 500);
}, },
...@@ -161,9 +163,13 @@ export default { ...@@ -161,9 +163,13 @@ export default {
let service = 0; let service = 0;
let app = 0; let app = 0;
let resource = 0; let resource = 0;
this.buttonList.forEach(item => { this.buttonList.forEach((item) => {
if (item.state == true) { if (item.state == true) {
if (item.id == "cloud") { if (item.id == 0) {
resource = 1;
app = 1;
service = 1;
} else if (item.id == "cloud") {
resource = 1; resource = 1;
} else if (item.id == "app") { } else if (item.id == "app") {
app = 1; app = 1;
...@@ -186,9 +192,10 @@ export default { ...@@ -186,9 +192,10 @@ export default {
types: arr, types: arr,
service: service, service: service,
app: app, app: app,
resource: resource resource: resource,
}; };
this.$api.user.orderList(params).then(response => { this.$api.user.orderList(params).then((response) => {
this.datas = [];
this.datas = response.data.data; this.datas = response.data.data;
this.pagination.total = response.data.total; this.pagination.total = response.data.total;
}); });
...@@ -203,8 +210,8 @@ export default { ...@@ -203,8 +210,8 @@ export default {
}, },
updateList() { updateList() {
this.getData(); this.getData();
} },
} },
}; };
</script> </script>
<style scoped> <style scoped>
...@@ -301,20 +308,20 @@ export default { ...@@ -301,20 +308,20 @@ export default {
.order_block .el-tabs--border-card > .el-tabs__content { .order_block .el-tabs--border-card > .el-tabs__content {
padding: 0; padding: 0;
} }
.input_right .el-input__inner { .order_block .input_right .el-input__inner {
border-radius: 20px; border-radius: 20px;
} }
.input_right .el-input--prefix .el-input__inner { .order_block .input_right .el-input--prefix .el-input__inner {
padding-left: 40px; padding-left: 40px;
} }
.input_right .el-input__prefix, .order_block .input_right .el-input__prefix,
.el-input__suffix { .el-input__suffix {
left: 10px; left: 10px;
} }
.input_right .el-input--prefix .el-input__inner { .order_block .input_right .el-input--prefix .el-input__inner {
outline: none; outline: none;
} }
.input_right .el-input__inner:focus-within { .order_block .input_right .el-input__inner:focus-within {
border: 1px solid #626de9; border: 1px solid #626de9;
} }
.order_page_control .el-button { .order_page_control .el-button {
......
...@@ -30,7 +30,7 @@ export default { ...@@ -30,7 +30,7 @@ export default {
mounted() {}, mounted() {},
methods: { methods: {
updateList() { updateList() {
this.emit("updateList"); this.$emit("updateList");
} }
} }
}; };
......
...@@ -138,13 +138,16 @@ export default { ...@@ -138,13 +138,16 @@ export default {
.com_card_msg_num1 { .com_card_msg_num1 {
color: #242c43; color: #242c43;
font-size: 16px; font-size: 16px;
font-weight: bold;
} }
.com_card_btn { .com_card_btn {
margin-top: 35px; margin-top: 35px;
display: flex; display: flex;
justify-content: space-around; justify-content: space-between;
} }
.btn_1 { .btn_1 {
width: 110px;
padding: 10px;
background-color: #d0d5e7; background-color: #d0d5e7;
border: solid 2px #a5afd6; border: solid 2px #a5afd6;
color: #0f2683; color: #0f2683;
...@@ -155,6 +158,8 @@ export default { ...@@ -155,6 +158,8 @@ export default {
color: #0f2683; color: #0f2683;
} }
.btn_2 { .btn_2 {
width: 110px;
padding: 10px;
background-color: #0f2683; background-color: #0f2683;
color: #f8f9fd; color: #f8f9fd;
} }
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
<div class="com_cell_message"> <div class="com_cell_message">
<div class="com_cell_msg_title"> <div class="com_cell_msg_title">
{{ cellData.name }} {{ cellData.name }}
<span v-if="cellData.mapService" class="tags map_service">mapService</span> <span v-if="cellData.data_service_type1 == 6" class="tags map_service">mapService</span>
<span v-if="cellData.openness == 1" class="tags shared">共享</span> <span v-if="cellData.openness == 1" class="tags shared">共享</span>
<span v-else-if="cellData.openness == 2" class="tags restricted">受限</span> <span v-else-if="cellData.openness == 2" class="tags restricted">受限</span>
<span v-else class="tags sensitive">敏感</span> <span v-else class="tags sensitive">敏感</span>
......
...@@ -688,31 +688,31 @@ export default { ...@@ -688,31 +688,31 @@ export default {
} }
</style> </style>
<style> <style>
.input_right .el-input__inner { .head_flex .input_right .el-input__inner {
border-radius: 20px; border-radius: 20px;
} }
.input_right .el-input--prefix .el-input__inner { .head_flex .input_right .el-input--prefix .el-input__inner {
padding-left: 40px; padding-left: 40px;
} }
.input_right .el-input__prefix, .head_flex .input_right .el-input__prefix,
.el-input__suffix { .el-input__suffix {
left: 10px; left: 10px;
} }
.input_right .el-input--prefix .el-input__inner { .head_flex .input_right .el-input--prefix .el-input__inner {
outline: none; outline: none;
} }
.input_right .el-input__inner:focus-within { .head_flex .input_right .el-input__inner:focus-within {
border: 1px solid #626de9; border: 1px solid #626de9;
} }
.btn_right_check .el-checkbox__input.is-checked .el-checkbox__inner, .head_flex .btn_right_check .el-checkbox__input.is-checked .el-checkbox__inner,
.el-checkbox__input.is-indeterminate .el-checkbox__inner { .el-checkbox__input.is-indeterminate .el-checkbox__inner {
background-color: #626de9; background-color: #626de9;
border-color: #626de9; border-color: #626de9;
} }
.btn_right_check .el-checkbox__input.is-checked + .el-checkbox__label { .head_flex .btn_right_check .el-checkbox__input.is-checked + .el-checkbox__label {
color: #626de9; color: #626de9;
} }
.btn_right_check .el-checkbox__input.is-focus .el-checkbox__inner { .head_flex .btn_right_check .el-checkbox__input.is-focus .el-checkbox__inner {
border-color: #626de9; border-color: #626de9;
} }
</style> </style>
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
<el-breadcrumb-item>{{ name }}</el-breadcrumb-item> <el-breadcrumb-item>{{ name }}</el-breadcrumb-item>
</el-breadcrumb> </el-breadcrumb>
<block-radius> <block-radius>
<el-form ref="form" :inline="true" :model="form" class="form_block"> <el-form ref="form" :inline="true" :rules="ruleBasis" :model="form" class="form_block">
<el-row> <el-row>
<el-col :span="11"> <el-col :span="11">
<el-form-item class="form_item"> <el-form-item class="form_item">
...@@ -14,13 +14,13 @@ ...@@ -14,13 +14,13 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="11" :offset="1"> <el-col :span="11" :offset="1">
<el-form-item class="form_item"> <el-form-item class="form_item" prop="link_man">
<div class="form_item_title">部门联系人:</div> <div class="form_item_title">部门联系人:</div>
<el-input v-model="form.link_man" placeholder="请输入联系人姓名"></el-input> <el-input v-model="form.link_man" placeholder="请输入联系人姓名"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="11"> <el-col :span="11">
<el-form-item class="form_item"> <el-form-item class="form_item" prop="phone">
<div class="form_item_title">联系电话:</div> <div class="form_item_title">联系电话:</div>
<el-input v-model="form.phone" placeholder="请输入联系人电话"></el-input> <el-input v-model="form.phone" placeholder="请输入联系人电话"></el-input>
</el-form-item> </el-form-item>
...@@ -127,6 +127,7 @@ ...@@ -127,6 +127,7 @@
v-model="formNew.dataDisk" v-model="formNew.dataDisk"
controls-position="right" controls-position="right"
:min="0" :min="0"
:max="1000"
placeholder="请选择增加数据盘的数量" placeholder="请选择增加数据盘的数量"
></el-input-number> ></el-input-number>
<div class="input_right"></div> <div class="input_right"></div>
...@@ -138,6 +139,7 @@ ...@@ -138,6 +139,7 @@
v-model="formNew.perDataDisk" v-model="formNew.perDataDisk"
controls-position="right" controls-position="right"
:min="0" :min="0"
:max="1000"
placeholder="请选择每块数据盘的容量" placeholder="请选择每块数据盘的容量"
></el-input-number> ></el-input-number>
<div class="input_right">GB</div> <div class="input_right">GB</div>
...@@ -215,6 +217,7 @@ ...@@ -215,6 +217,7 @@
v-model="formNew.appDuration" v-model="formNew.appDuration"
controls-position="right" controls-position="right"
:min="0" :min="0"
:max="1000"
></el-input-number> ></el-input-number>
<el-select <el-select
v-model="formNew.durType" v-model="formNew.durType"
...@@ -382,6 +385,7 @@ ...@@ -382,6 +385,7 @@
v-model="formOld.dataDisk" v-model="formOld.dataDisk"
controls-position="right" controls-position="right"
:min="0" :min="0"
:max="1000"
placeholder="请选择增加数据盘的数量" placeholder="请选择增加数据盘的数量"
></el-input-number> ></el-input-number>
<div class="input_right"></div> <div class="input_right"></div>
...@@ -393,6 +397,7 @@ ...@@ -393,6 +397,7 @@
v-model="formOld.perDataDisk" v-model="formOld.perDataDisk"
controls-position="right" controls-position="right"
:min="0" :min="0"
:max="1000"
placeholder="请选择每块数据盘的容量" placeholder="请选择每块数据盘的容量"
></el-input-number> ></el-input-number>
<div class="input_right">GB</div> <div class="input_right">GB</div>
...@@ -521,6 +526,7 @@ ...@@ -521,6 +526,7 @@
v-model="formOld.appDuration" v-model="formOld.appDuration"
controls-position="right" controls-position="right"
:min="0" :min="0"
:max="1000"
></el-input-number> ></el-input-number>
<el-select <el-select
v-model="formOld.durType" v-model="formOld.durType"
...@@ -866,6 +872,19 @@ export default { ...@@ -866,6 +872,19 @@ export default {
phone: "", phone: "",
link_man: "", link_man: "",
}, },
ruleBasis: {
link_man: [
{ required: true, message: "请输入部门联系人", trigger: "blur" },
{ max: 6, message: "长度应小于6个字符", trigger: "blur" },
],
phone: [
{ required: true, message: "请输入手机号码", trigger: "blur" },
{
pattern: /^(?:(?:\+|00)86)?1[3-9]\d{9}$/,
message: "请输入正确的手机号码",
},
],
},
activeName: "0", activeName: "0",
formNew: { formNew: {
namespace: "", namespace: "",
...@@ -1282,7 +1301,8 @@ export default { ...@@ -1282,7 +1301,8 @@ export default {
.cloud_form { .cloud_form {
} }
.form_title { .form_title {
font-size: 18px; font-size: 16px;
font-weight: bold;
margin: 10px 0; margin: 10px 0;
padding: 0 0 0 15px; padding: 0 0 0 15px;
position: relative; position: relative;
...@@ -1296,7 +1316,7 @@ export default { ...@@ -1296,7 +1316,7 @@ export default {
background-color: #515fe7; background-color: #515fe7;
border-radius: 2px; border-radius: 2px;
left: 0; left: 0;
top: 4px; top: 2px;
} }
.form_item { .form_item {
width: calc(100% - 20px); width: calc(100% - 20px);
...@@ -1344,7 +1364,9 @@ export default { ...@@ -1344,7 +1364,9 @@ export default {
} }
.select_title { .select_title {
padding: 20px 15px; padding: 20px 15px;
font-weight: 700; font-size: 16px;
font-weight: bold;
color: #242c43;
} }
.now_spec { .now_spec {
padding: 10px 15px; padding: 10px 15px;
...@@ -1610,6 +1632,6 @@ export default { ...@@ -1610,6 +1632,6 @@ export default {
} }
.cloud_form .el-input-number.is-controls-right .el-input__inner { .cloud_form .el-input-number.is-controls-right .el-input__inner {
padding-left: 15px; padding-left: 15px;
padding-right: 40px; padding-right: 40px;
} }
</style> </style>
...@@ -474,7 +474,6 @@ export default { ...@@ -474,7 +474,6 @@ export default {
}, },
// get data // get data
getDataFromApiSync() { getDataFromApiSync() {
console.log("get data >>>");
this.getDataFromApi().then( this.getDataFromApi().then(
data => { data => {
this.selectedTabsPage = JSON.parse(JSON.stringify(data.newArr)); this.selectedTabsPage = JSON.parse(JSON.stringify(data.newArr));
......
...@@ -119,7 +119,7 @@ export default { ...@@ -119,7 +119,7 @@ export default {
treeData: [], treeData: [],
defaultProps: { defaultProps: {
children: "Child", children: "Child",
label: "menu_name" label: "menu_name",
}, },
formDetail: { formDetail: {
menu_name: "", menu_name: "",
...@@ -128,7 +128,7 @@ export default { ...@@ -128,7 +128,7 @@ export default {
detail: "", detail: "",
menu_order: "", menu_order: "",
create_user: "", create_user: "",
create_date: "" create_date: "",
}, },
formStaged: [], formStaged: [],
formContrast: { formContrast: {
...@@ -138,12 +138,12 @@ export default { ...@@ -138,12 +138,12 @@ export default {
detail: "", detail: "",
menu_order: "", menu_order: "",
create_user: "", create_user: "",
create_date: "" create_date: "",
}, },
rules: { rules: {
menu_name: [ menu_name: [
{ required: true, message: "请填写菜单名称", trigger: "blur" }, { required: true, message: "请填写菜单名称", trigger: "blur" },
{ min: 0, max: 16, message: "菜单名称不超过16位", trigger: "blur" } { min: 0, max: 16, message: "菜单名称不超过16位", trigger: "blur" },
], ],
visit_url: [ visit_url: [
{ required: true, message: "请填写菜单访问地址", trigger: "blur" }, { required: true, message: "请填写菜单访问地址", trigger: "blur" },
...@@ -151,27 +151,29 @@ export default { ...@@ -151,27 +151,29 @@ export default {
min: 0, min: 0,
max: 50, max: 50,
message: "访问地址长度不超过50个字", message: "访问地址长度不超过50个字",
trigger: "blur" trigger: "blur",
} },
], ],
team_name: [ team_name: [
{ min: 0, max: 16, message: "菜单组别不超过16个字", trigger: "blur" } { min: 0, max: 16, message: "菜单组别不超过16个字", trigger: "blur" },
] ],
}, },
nodeId: "", nodeId: "",
previousSibling: false, previousSibling: false,
nextSibling: false, nextSibling: false,
newI: 0, newI: 0,
helper: helper, helper: helper,
canSave: false canSave: false,
create_user: "",
}; };
}, },
watch: { watch: {
checkText(val) { checkText(val) {
this.$refs.tree.filter(val); this.$refs.tree.filter(val);
} },
}, },
mounted() { mounted() {
this.getCreateUser();
this.getTree(); this.getTree();
}, },
methods: { methods: {
...@@ -182,13 +184,13 @@ export default { ...@@ -182,13 +184,13 @@ export default {
nodeClick(data, node) { nodeClick(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) => {
if (item.id == this.nodeId) { if (item.id == this.nodeId) {
return true; return true;
} }
}); });
if (result) { if (result) {
this.formStaged.forEach(item => { this.formStaged.forEach((item) => {
if (item.id == this.nodeId) { if (item.id == this.nodeId) {
item.data = this.formDetail; item.data = this.formDetail;
} }
...@@ -209,16 +211,16 @@ export default { ...@@ -209,16 +211,16 @@ export default {
} }
let cid = String(data.menu_id); let cid = String(data.menu_id);
if (cid.indexOf("new") > -1) { if (cid.indexOf("new") > -1) {
this.formStaged.forEach(item => { this.formStaged.forEach((item) => {
if (item.id == cid) { if (item.id == cid) {
this.formDetail = item.data; this.formDetail = item.data;
} }
}); });
} else { } else {
let query = { let query = {
id: this.nodeId id: this.nodeId,
}; };
this.$api.authority.getMenu(query).then(response => { this.$api.authority.getMenu(query).then((response) => {
if (response.data.success == 1) { if (response.data.success == 1) {
this.formDetail = response.data.data; this.formDetail = response.data.data;
this.formDetail.create_date = helper.dateStringTransform( this.formDetail.create_date = helper.dateStringTransform(
...@@ -228,29 +230,32 @@ export default { ...@@ -228,29 +230,32 @@ export default {
} else { } else {
this.$message({ this.$message({
message: response.data.errMsg, message: response.data.errMsg,
type: "error" type: "error",
}); });
} }
}); });
} }
}, },
getCreateUser() {
this.$api.user.getNowUser().then((response) => {
if (response.data.success == 1) {
this.create_user = response.data.data.user_name;
} else {
console.log(response.data.errMsg);
}
});
},
appendNode() { appendNode() {
let newChild = { let newChild = {
menu_id: "new" + this.newI, menu_id: "new" + this.newI,
menu_name: "新菜单", menu_name: "新菜单",
Child: [] Child: [],
}; };
this.newI++; this.newI++;
this.$refs.tree.append(newChild, this.nodeId); this.$refs.tree.append(newChild, this.nodeId);
this.$refs.tree.setCurrentKey(newChild.menu_id); this.$refs.tree.setCurrentKey(newChild.menu_id);
let node = this.$refs.tree.getNode(newChild.menu_id); let node = this.$refs.tree.getNode(newChild.menu_id);
this.$api.user.getNowUser().then(response => { this.formDetail.create_user = this.create_user;
if (response.data.success == 1) {
this.formDetail.create_user = response.data.data.user_name;
} else {
console.log(response.data.errMsg);
}
});
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.team_name = node.parent.data.team_name;
...@@ -262,7 +267,7 @@ export default { ...@@ -262,7 +267,7 @@ export default {
this.formDetail.visit_url = ""; this.formDetail.visit_url = "";
this.$message({ this.$message({
message: "不要忘了完善信息哦", message: "不要忘了完善信息哦",
type: "success" type: "success",
}); });
this.nodeClick(newChild, node); this.nodeClick(newChild, node);
}, },
...@@ -270,7 +275,7 @@ export default { ...@@ -270,7 +275,7 @@ export default {
let newChild = { let newChild = {
menu_id: "new" + this.newI, menu_id: "new" + this.newI,
menu_name: "新菜单", menu_name: "新菜单",
Child: [] Child: [],
}; };
this.$refs.tree.insertAfter( this.$refs.tree.insertAfter(
newChild, newChild,
...@@ -278,14 +283,8 @@ export default { ...@@ -278,14 +283,8 @@ export default {
); );
this.newI++; this.newI++;
this.$refs.tree.setCurrentKey(newChild.menu_id); 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); let node = this.$refs.tree.getNode(newChild.menu_id);
this.formDetail.create_user = this.create_user;
this.formDetail.menu_order = this.treeData.length; this.formDetail.menu_order = this.treeData.length;
this.formDetail.menu_name = newChild.menu_name; this.formDetail.menu_name = newChild.menu_name;
this.formDetail.team_name = "apaas"; this.formDetail.team_name = "apaas";
...@@ -297,22 +296,37 @@ export default { ...@@ -297,22 +296,37 @@ export default {
this.formDetail.visit_url = ""; this.formDetail.visit_url = "";
this.$message({ this.$message({
message: "不要忘了完善信息哦", message: "不要忘了完善信息哦",
type: "success" type: "success",
}); });
this.nodeClick(newChild, node); this.nodeClick(newChild, node);
}, },
resetForm() { resetForm() {
this.formDetail.menu_name = this.formContrast.menu_name; if (this.nodeId.indexOf("new") > -1) {
this.formDetail.visit_url = this.formContrast.visit_url; let node = this.$refs.tree.getNode(this.nodeId);
this.formDetail.team_name = this.formContrast.team_name; this.formDetail.menu_name = "";
this.formDetail.detail = this.formContrast.detail; this.formDetail.visit_url = "";
this.formDetail.menu_order = this.formContrast.menu_order; this.formDetail.team_name = "";
this.formDetail.create_user = this.formContrast.create_user; this.formDetail.detail = "";
this.formDetail.create_date = this.formContrast.create_date; this.formDetail.menu_order = node.parent.childNodes.length;
this.canSave = false; this.formDetail.create_user = this.create_user;
this.formDetail.create_date = helper.dateFormat(
"YYYY-mm-dd HH:MM:SS",
new Date()
);
this.canSave = false;
} else {
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) => {
if (response.data.success == 1) { if (response.data.success == 1) {
this.treeData = response.data.data; this.treeData = response.data.data;
this.nodeId = ""; this.nodeId = "";
...@@ -325,7 +339,7 @@ export default { ...@@ -325,7 +339,7 @@ export default {
}); });
}, },
saveNode() { saveNode() {
this.$refs.formDetail.validate(valid => { this.$refs.formDetail.validate((valid) => {
if (valid) { if (valid) {
let query = { let query = {
menu_id: this.nodeId, menu_id: this.nodeId,
...@@ -334,16 +348,16 @@ export default { ...@@ -334,16 +348,16 @@ export default {
visit_url: this.formDetail.visit_url, visit_url: this.formDetail.visit_url,
team_name: this.formDetail.team_name, team_name: this.formDetail.team_name,
issystem: 1, issystem: 1,
menu_order: this.formDetail.menu_order menu_order: this.formDetail.menu_order,
}; };
if (this.nodeId.substring(0, 3) == "new") { if (this.nodeId.substring(0, 3) == "new") {
let node = this.$refs.tree.getNode(this.nodeId); let node = this.$refs.tree.getNode(this.nodeId);
query.parent_id = node.parent.data.menu_id; query.parent_id = node.parent.data.menu_id;
this.$api.authority.addMenu(query).then(response => { this.$api.authority.addMenu(query).then((response) => {
if (response.data.success == 1) { if (response.data.success == 1) {
this.$message({ this.$message({
message: "插入菜单成功", message: "插入菜单成功",
type: "success" type: "success",
}); });
this.getTree(); this.getTree();
this.emptyObject(); this.emptyObject();
...@@ -352,11 +366,11 @@ export default { ...@@ -352,11 +366,11 @@ export default {
} }
}); });
} else { } else {
this.$api.authority.editMenu(query).then(response => { this.$api.authority.editMenu(query).then((response) => {
if (response.data.success == 1) { if (response.data.success == 1) {
this.$message({ this.$message({
message: "修改菜单成功", message: "修改菜单成功",
type: "success" type: "success",
}); });
this.getTree(); this.getTree();
this.emptyObject(); this.emptyObject();
...@@ -368,7 +382,7 @@ export default { ...@@ -368,7 +382,7 @@ export default {
} else { } else {
this.$message({ this.$message({
message: "请完善信息", message: "请完善信息",
type: "error" type: "error",
}); });
} }
}); });
...@@ -379,13 +393,13 @@ export default { ...@@ -379,13 +393,13 @@ export default {
this.emptyObject(); this.emptyObject();
} else { } else {
let params = { let params = {
id: this.nodeId id: this.nodeId,
}; };
this.$api.authority.delMenu(params).then(response => { this.$api.authority.delMenu(params).then((response) => {
if (response.data.success == 1) { if (response.data.success == 1) {
this.$message({ this.$message({
message: "删除菜单成功", message: "删除菜单成功",
type: "success" type: "success",
}); });
this.getTree(); this.getTree();
this.emptyObject(); this.emptyObject();
...@@ -406,19 +420,19 @@ export default { ...@@ -406,19 +420,19 @@ export default {
data: [ data: [
{ {
id: node.data.menu_id, id: node.data.menu_id,
sort: nodeNext.data.menu_order sort: nodeNext.data.menu_order,
}, },
{ {
id: nodeNext.data.menu_id, id: nodeNext.data.menu_id,
sort: node.data.menu_order sort: node.data.menu_order,
} },
] ],
}; };
this.$api.authority.positionMenu(params).then(response => { this.$api.authority.positionMenu(params).then((response) => {
if (response.data.success == 1) { if (response.data.success == 1) {
this.$message({ this.$message({
message: "更新菜单成功", message: "更新菜单成功",
type: "success" type: "success",
}); });
this.getTree(); this.getTree();
this.emptyObject(); this.emptyObject();
...@@ -434,8 +448,8 @@ export default { ...@@ -434,8 +448,8 @@ export default {
for (var i in this.formDetail) { for (var i in this.formDetail) {
this.formDetail[i] = ""; this.formDetail[i] = "";
} }
} },
} },
}; };
</script> </script>
<style scoped> <style scoped>
......
...@@ -7,104 +7,114 @@ ...@@ -7,104 +7,114 @@
</el-breadcrumb> </el-breadcrumb>
<block-radius class="detail"> <block-radius class="detail">
<div class="detail_head"> <div class="detail_head">
<div class="detail_head_cell detail_head_status border_right"> <div class="detail_head_msg">
<p class="detail_head_cell_title">申请状态</p> <div class="detail_head_cell detail_head_status border_right">
<p <p class="detail_head_cell_title">申请状态</p>
class="detail_head_cell_val text_yellow" <p
v-if="orderDetail.approval_first_level == 0 && orderDetail.pay_status != -1" class="detail_head_cell_val text_yellow"
>待审核</p> v-if="orderDetail.approval_first_level == 0 && orderDetail.pay_status != -1"
<p >待审核</p>
class="detail_head_cell_val text_yellow" <p
v-else-if="orderDetail.approval_first_level == 1&& orderDetail.approval_second_level == 0 && orderDetail.pay_status != -1" class="detail_head_cell_val text_yellow"
>审核中</p> v-else-if="orderDetail.approval_first_level == 1&& orderDetail.approval_second_level == 0 && orderDetail.pay_status != -1"
<p >审核中</p>
class="detail_head_cell_val text_blue" <p
v-else-if="orderDetail.approval_first_level == 1 && orderDetail.approval_second_level == 1 && orderDetail.pay_status != -1" class="detail_head_cell_val text_blue"
>审核通过</p> v-else-if="orderDetail.approval_first_level == 1 && orderDetail.approval_second_level == 1 && orderDetail.pay_status != -1"
<p >审核通过</p>
class="detail_head_cell_val text_red" <p
v-else-if="(orderDetail.approval_first_level == -1 || orderDetail.approval_second_level == -1) && orderDetail.pay_status != -1" class="detail_head_cell_val text_red"
>审核未通过</p> v-else-if="(orderDetail.approval_first_level == -1 || orderDetail.approval_second_level == -1) && orderDetail.pay_status != -1"
<p >审核未通过</p>
class="detail_head_cell_val text_blackblue" <p
v-else-if="orderDetail.pay_status == -1" class="detail_head_cell_val text_blackblue"
>订单已取消</p> v-else-if="orderDetail.pay_status == -1"
</div> >已取消</p>
<div class="detail_head_cell detail_head_no border_right"> </div>
<p class="detail_head_cell_title">订单编号</p> <div class="detail_head_cell detail_head_no border_right">
<p class="detail_head_cell_val">{{ orderDetail.order_id }}</p> <p class="detail_head_cell_title">订单编号</p>
</div> <p class="detail_head_cell_val">{{ orderDetail.order_id }}</p>
<div class="detail_head_cell detail_head_time"> </div>
<p class="detail_head_cell_title">申请时间</p> <div class="detail_head_cell detail_head_time">
<p class="detail_head_cell_val">{{ helper.dateStringTransform(orderDetail.add_time) }}</p> <p class="detail_head_cell_title">申请时间</p>
</div> <p class="detail_head_cell_val">{{ helper.dateStringTransform(orderDetail.add_time) }}</p>
<div class="btn_group"> </div>
<el-popover <div
v-if="orderDetail.order_type != 3 && orderDetail.approval_second_level == 1 && orderDetail.pay_status != -1 && orderDetail.is_estimated == 0" v-if="orderDetail.pay_status == -1"
placement="right-start" class="detail_head_cell detail_head_time border_left"
width="300"
v-model="visible"
trigger="click"
> >
<p>服务评价:</p> <p class="detail_head_cell_title">取消时间</p>
<div class="pop_rate"> <p
<el-rate v-model="serviceRate" :colors="colors" show-score score-template="{value}"></el-rate> class="detail_head_cell_val"
</div> >{{ helper.dateStringTransform(orderDetail.cancel_time) }}</p>
<p>填写评价:</p> </div>
<div class="evaluation_text"> <div class="btn_group">
<el-input <el-popover
type="textarea" v-if="orderDetail.is_estimated == 0 && orderDetail.approval_second_level == 1 && orderDetail.pay_status != -1"
placeholder="请输入内容" placement="right-start"
v-model="textarea" width="300"
maxlength="200" v-model="visible"
show-word-limit trigger="click"
:autosize="{ minRows: 6, maxRows: 10 }" >
></el-input> <p>服务评价:</p>
</div> <div class="pop_rate">
<div class="pop_btn_group"> <el-rate v-model="serviceRate" :colors="colors" show-score score-template="{value}"></el-rate>
<el-button size="small" class="pop_cancel" type="text" @click="visible = false">取消</el-button> </div>
<el-button type="primary" class="pop_submit" size="small" @click="addEvaluation">确定提交</el-button> <p>填写评价:</p>
</div> <div class="evaluation_text">
<el-button class="evaluation" slot="reference">服务评价</el-button> <el-input
</el-popover> type="textarea"
<el-button placeholder="请输入内容"
v-else-if="orderDetail.order_type != 3 && orderDetail.approval_second_level == 1 && orderDetail.pay_status != -1 && orderDetail.is_estimated == 1 && !showMsgBox" v-model="textarea"
class="approval_status_btn" maxlength="500"
@click="getMessage" show-word-limit
>查看评价</el-button> :autosize="{ minRows: 6, maxRows: 10 }"
<el-button ></el-input>
v-else-if="orderDetail.order_type != 3 && orderDetail.approval_second_level == 1 && orderDetail.pay_status != -1 && orderDetail.is_estimated == 1 && showMsgBox" </div>
class="approval_status_btn" <div class="pop_btn_group">
@click="showMsgBox = false" <el-button size="small" class="pop_cancel" type="text" @click="visible = false">取消</el-button>
>收起评价</el-button> <el-button
<el-button type="primary"
v-if="orderDetail.approval_second_level == 1 && orderDetail.pay_status != -1" class="pop_submit"
class="again" size="small"
@click="nextApply" @click="addEvaluation"
>再次申请</el-button> >确定提交</el-button>
<el-button </div>
v-if="(orderDetail.approval_first_level == 0 && orderDetail.pay_status != -1) || (orderDetail.approval_first_level == 1 && orderDetail.approval_second_level == 0 && orderDetail.pay_status != -1)" <el-button class="evaluation" slot="reference">服务评价</el-button>
class="again" </el-popover>
@click="cancelDetail" <el-button
>取消申请</el-button> v-else-if="orderDetail.order_type != 3 && orderDetail.approval_second_level == 1 && orderDetail.pay_status != -1 && orderDetail.is_estimated == 1 && !showMsgBox"
</div> class="approval_status_btn"
</div> @click="getMessage"
<el-collapse-transition> >查看评价</el-button>
<div v-if="showMsgBox" class="evaluation_msg"> <el-button
<div class="msg_title">服务评分:</div> v-else-if="orderDetail.order_type != 3 && orderDetail.approval_second_level == 1 && orderDetail.pay_status != -1 && orderDetail.is_estimated == 1 && showMsgBox"
<div class="msg_rate"> class="approval_status_btn"
<el-rate @click="showMsgBox = false"
v-model="message.score" >收起评价</el-button>
disabled <el-button
show-score v-if="orderDetail.approval_second_level == 1 && orderDetail.pay_status != -1 || orderDetail.pay_status == -1"
text-color="#ff9900" class="again"
score-template="{value}" @click="nextApply"
></el-rate> >再次申请</el-button>
<el-button
v-if="(orderDetail.approval_first_level == 0 && orderDetail.pay_status != -1) || (orderDetail.approval_first_level == 1 && orderDetail.approval_second_level == 0 && orderDetail.pay_status != -1)"
class="again"
@click="cancelDetail"
>取消申请</el-button>
</div> </div>
<div class="msg_title">评价详情:</div>
<div class="msg_text">{{ message.content }}</div>
</div> </div>
</el-collapse-transition> <el-collapse-transition>
<div v-if="showMsgBox" class="evaluation_msg">
<div class="msg_title">服务评分:</div>
<div class="msg_rate">
<el-rate v-model="message.score" disabled :colors="colors"></el-rate>
</div>
<div class="msg_title">评价详情:</div>
<div class="msg_text">{{ message.content }}</div>
</div>
</el-collapse-transition>
</div>
<div class="detail_title">{{ orderDetail.order_type == 1 ? "服务" : "应用"}}信息</div> <div class="detail_title">{{ orderDetail.order_type == 1 ? "服务" : "应用"}}信息</div>
<div class="detail_service"> <div class="detail_service">
<el-row class="detail_service_row"> <el-row class="detail_service_row">
...@@ -544,10 +554,12 @@ export default { ...@@ -544,10 +554,12 @@ export default {
background-color: #f6f7fb; background-color: #f6f7fb;
border-radius: 8px; border-radius: 8px;
border: solid 2px #e3e5ef; border: solid 2px #e3e5ef;
padding: 22px 20px;
position: relative; position: relative;
margin-bottom: 20px; margin-bottom: 20px;
} }
.detail_head_msg {
padding: 20px;
}
.detail_head_cell { .detail_head_cell {
display: inline-block; display: inline-block;
height: 50px; height: 50px;
...@@ -565,6 +577,9 @@ export default { ...@@ -565,6 +577,9 @@ export default {
.border_right { .border_right {
border-right: 1px #e3e5ef solid; border-right: 1px #e3e5ef solid;
} }
.border_left {
border-left: 1px #e3e5ef solid;
}
.detail_head_cell_title { .detail_head_cell_title {
font-size: 14px; font-size: 14px;
color: #8890a7; color: #8890a7;
...@@ -814,18 +829,19 @@ export default { ...@@ -814,18 +829,19 @@ export default {
} }
.evaluation_msg { .evaluation_msg {
height: 100%; height: 100%;
border-top: 1px #ededed solid; border-top: solid 2px #e3e5ef;
padding: 20px; padding: 20px;
background-color: #fff;
} }
.msg_title { .msg_title {
color: #8890a7; color: #8890a7;
margin: 0 0 10px; margin: 0 0 10px;
} }
.msg_rate { .msg_rate {
margin: 0 0 10px 20px; margin: 0 0 20px 0;
} }
.msg_text { .msg_text {
margin-left: 20px; /* margin-left: 20px; */
color: #242c43; color: #242c43;
} }
</style> </style>
......
...@@ -125,7 +125,6 @@ ...@@ -125,7 +125,6 @@
</el-form> </el-form>
</div> </div>
<div class="btn_footer"> <div class="btn_footer">
<el-button class="previous" @click="previous">取消</el-button>
<el-button class="registe" @click="registe">修改</el-button> <el-button class="registe" @click="registe">修改</el-button>
</div> </div>
<el-dialog <el-dialog
...@@ -193,7 +192,7 @@ import UploadFile from "@/components/general/upload_file"; ...@@ -193,7 +192,7 @@ import UploadFile from "@/components/general/upload_file";
export default { export default {
components: { components: {
BlockRadius, BlockRadius,
UploadFile UploadFile,
}, },
data() { data() {
var checkNewPass = (rule, value, callback) => { var checkNewPass = (rule, value, callback) => {
...@@ -240,24 +239,24 @@ export default { ...@@ -240,24 +239,24 @@ export default {
email: "", email: "",
organization: "", organization: "",
userType: "", userType: "",
userTypeName: "" userTypeName: "",
}, },
visible1: true, visible1: true,
visible2: true, visible2: true,
form: { form: {
passwordOld: "", passwordOld: "",
passwordNew: "", passwordNew: "",
nextname: "" nextname: "",
}, },
passRules: { passRules: {
passwordNew: [ passwordNew: [
{ required: true, message: "请输入新密码", trigger: "blur" }, { required: true, message: "请输入新密码", trigger: "blur" },
{ validator: checkNewPass, trigger: "blur" } { validator: checkNewPass, trigger: "blur" },
], ],
nextname: [ nextname: [
{ required: true, message: "请再次输入新密码", trigger: "blur" }, { required: true, message: "请再次输入新密码", trigger: "blur" },
{ validator: checkNextPass, trigger: "blur" } { validator: checkNextPass, trigger: "blur" },
] ],
}, },
imgList: [], imgList: [],
formBusiness: { formBusiness: {
...@@ -266,7 +265,7 @@ export default { ...@@ -266,7 +265,7 @@ export default {
ip_white: [], ip_white: [],
ip_black: [], ip_black: [],
private_token: "", private_token: "",
description: "" description: "",
}, },
whiteAddShow: false, whiteAddShow: false,
blackAddShow: false, blackAddShow: false,
...@@ -278,33 +277,36 @@ export default { ...@@ -278,33 +277,36 @@ export default {
accountNo: [ accountNo: [
{ required: true, message: "请输入账号", trigger: "blur" }, { required: true, message: "请输入账号", trigger: "blur" },
{ max: 16, message: "长度请小于16个字符", trigger: "blur" }, { max: 16, message: "长度请小于16个字符", trigger: "blur" },
{ validator: user_name_pass, trigger: "blur" } { validator: user_name_pass, trigger: "blur" },
], ],
nickname: [ nickname: [
{ required: true, message: "请输入昵称", trigger: "blur" }, { required: true, message: "请输入昵称", trigger: "blur" },
{ max: 8, message: "长度请小于8个字符", trigger: "blur" } { max: 8, message: "长度请小于8个字符", trigger: "blur" },
], ],
contactPerson: [ contactPerson: [
{ max: 6, message: "长度请小于6个字符", trigger: "blur" } { max: 6, message: "长度请小于6个字符", trigger: "blur" },
], ],
phone: [ phone: [
{ pattern: /^1[34578]\d{9}$/, message: "请输入正确的手机号码" } {
pattern: /^(?:(?:\+|00)86)?1[3-9]\d{9}$/,
message: "请输入正确的手机号码",
},
], ],
email: [ email: [
{ {
pattern: /^([a-zA-Z0-9]+[_|\_|\.]?)*[a-zA-Z0-9]+@([a-zA-Z0-9]+[-|_|\_|\.]?)*[a-zA-Z0-9]+\.[a-zA-Z]{2,3}$/, pattern: /^([a-zA-Z0-9]+[_|\_|\.]?)*[a-zA-Z0-9]+@([a-zA-Z0-9]+[-|_|\_|\.]?)*[a-zA-Z0-9]+\.[a-zA-Z]{2,3}$/,
message: "请输入正确的邮箱" message: "请输入正确的邮箱",
} },
] ],
}, },
rules_bussiness: { rules_bussiness: {
businessSystemName: [ businessSystemName: [
{ max: 16, message: "长度请小于16个字符", trigger: "blur" } { max: 16, message: "长度请小于16个字符", trigger: "blur" },
], ],
description: [ description: [
{ max: 500, message: "长度请小于500个字符", trigger: "blur" } { max: 500, message: "长度请小于500个字符", trigger: "blur" },
] ],
} },
}; };
}, },
mounted() { mounted() {
...@@ -312,7 +314,7 @@ export default { ...@@ -312,7 +314,7 @@ export default {
}, },
methods: { methods: {
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.is_admin = response.data.data.is_admin;
this.userId = response.data.data.user_id; this.userId = response.data.data.user_id;
...@@ -323,7 +325,7 @@ export default { ...@@ -323,7 +325,7 @@ export default {
}); });
}, },
getUserInfo() { getUserInfo() {
this.$api.user.getUserDetail({ id: this.userId }).then(response => { this.$api.user.getUserDetail({ id: this.userId }).then((response) => {
if (response.data.success == 1) { if (response.data.success == 1) {
let data = response.data.data; let data = response.data.data;
this.user_data.accountNo = data.user_id; this.user_data.accountNo = data.user_id;
...@@ -340,7 +342,7 @@ export default { ...@@ -340,7 +342,7 @@ export default {
? "组织管理员" ? "组织管理员"
: this.user_data.userType == 3 : this.user_data.userType == 3
? "普通用户" ? "普通用户"
: "普通用户开发者"; : "开发者";
this.user_data.is_apply = data.is_apply; this.user_data.is_apply = data.is_apply;
this.imgList = []; this.imgList = [];
this.imgList.push(data.picture_path); this.imgList.push(data.picture_path);
...@@ -357,11 +359,10 @@ export default { ...@@ -357,11 +359,10 @@ export default {
getNewList(val) { getNewList(val) {
this.imgList[0] = val[0].url; this.imgList[0] = val[0].url;
}, },
previous() {},
registe() { registe() {
let query = {}; let query = {};
if (this.activeName == 0) { if (this.activeName == 0) {
this.$refs["form"].validate(valid => { this.$refs["form"].validate((valid) => {
if (valid) { if (valid) {
query = { query = {
pageType: "personalFile", // this page is user info pageType: "personalFile", // this page is user info
...@@ -371,19 +372,20 @@ export default { ...@@ -371,19 +372,20 @@ export default {
email: this.user_data.email, email: this.user_data.email,
is_admin: this.user_data.userType, is_admin: this.user_data.userType,
link_man: this.user_data.contactPerson, link_man: this.user_data.contactPerson,
picture_path: this.imgList[0] picture_path: this.imgList[0],
}; };
this.$api.authority.setUserInfo(query).then(response => { this.$api.authority.setUserInfo(query).then((response) => {
if (response.data.success == 1) { if (response.data.success == 1) {
this.$message({ this.$message({
message: "修改个人信息成功", message: "修改个人信息成功",
type: "success" type: "success",
}); });
this.getUserInfo(); this.getUserInfo();
this.getCurrentUser();
} else { } else {
this.$message({ this.$message({
message: "修改个人信息失败", message: "修改个人信息失败",
type: "error" type: "error",
}); });
} }
}); });
...@@ -392,7 +394,7 @@ export default { ...@@ -392,7 +394,7 @@ export default {
} }
}); });
} else if (this.activeName == 1) { } else if (this.activeName == 1) {
this.$refs["formBusiness"].validate(valid => { this.$refs["formBusiness"].validate((valid) => {
console.log(valid); console.log(valid);
if (valid) { if (valid) {
query = { query = {
...@@ -402,19 +404,20 @@ export default { ...@@ -402,19 +404,20 @@ export default {
domain_name: this.formBusiness.domainName, domain_name: this.formBusiness.domainName,
ip_whitelist: this.formBusiness.ip_white, ip_whitelist: this.formBusiness.ip_white,
ip_blacklist: this.formBusiness.ip_black, ip_blacklist: this.formBusiness.ip_black,
description: this.formBusiness.description description: this.formBusiness.description,
}; };
this.$api.authority.setUserInfo(query).then(response => { this.$api.authority.setUserInfo(query).then((response) => {
if (response.data.success == 1) { if (response.data.success == 1) {
this.$message({ this.$message({
message: "修改个人信息成功", message: "修改个人信息成功",
type: "success" type: "success",
}); });
this.getUserInfo(); this.getUserInfo();
this.getCurrentUser();
} else { } else {
this.$message({ this.$message({
message: "修改个人信息失败", message: "修改个人信息失败",
type: "error" type: "error",
}); });
} }
}); });
...@@ -424,6 +427,16 @@ export default { ...@@ -424,6 +427,16 @@ export default {
}); });
} }
}, },
getCurrentUser() {
this.$api.user.getNowUser().then(({ data }) => {
if (data.success == 1) {
this.$store.commit("userInfofun", data.data);
this.now_user = this.level;
} else {
console.log(data.errMsg);
}
});
},
changePassword() { changePassword() {
this.diaPassWord = true; this.diaPassWord = true;
}, },
...@@ -434,38 +447,40 @@ export default { ...@@ -434,38 +447,40 @@ export default {
this.visible2 = !this.visible2; this.visible2 = !this.visible2;
}, },
cancelChangePwd() { cancelChangePwd() {
this.$refs.form1.resetFields();
this.diaPassWord = false; this.diaPassWord = false;
}, },
check_pass_form(){ check_pass_form() {
this.$refs['form1'].validate((valid) => { this.$refs["form1"].validate((valid) => {
if (valid) { if (valid) {
this.submitChangePwd() this.submitChangePwd();
} else { } else {
this.$message.error('请检查表单') this.$message.error("请检查表单");
return false; return false;
} }
}); });
}, },
submitChangePwd() { submitChangePwd() {
let query = { let query = {
id: this.user_data.accountNo, id: this.user_data.accountNo,
form: { form: {
origin_password: this.form.passwordOld, origin_password: this.form.passwordOld,
new_password: this.form.passwordNew new_password: this.form.passwordNew,
} },
}; };
this.$api.user.editUserPassword(query).then(response => { this.$api.user.editUserPassword(query).then((response) => {
if (response.data.success == 1) { if (response.data.success == 1) {
this.$message({ this.$message({
message: "修改密码成功", message: "修改密码成功",
type: "success" type: "success",
}); });
this.$refs.form1.resetFields();
this.diaPassWord = false; this.diaPassWord = false;
this.getUserInfo(); this.getUserInfo();
} else { } else {
this.$message({ this.$message({
message: "修改密码失败", message: response.data.errMsg,
type: "error" type: "error",
}); });
} }
}); });
...@@ -475,17 +490,18 @@ export default { ...@@ -475,17 +490,18 @@ export default {
}, },
submitUpLevel() { submitUpLevel() {
this.upLevelDia = false; this.upLevelDia = false;
this.$api.authority.updateLevel().then(response => { this.$api.authority.updateLevel().then((response) => {
if (response.data.success == 1) { if (response.data.success == 1) {
this.$message({ this.$message({
message: "申请升级开发者成功", message: "申请升级开发者成功",
type: "success" type: "success",
}); });
this.getUserInfo(); this.getUserInfo();
this.getCurrentUser();
} else { } else {
this.$message({ this.$message({
message: "申请升级开发者失败", message: "申请升级开发者失败",
type: "error" type: "error",
}); });
} }
}); });
...@@ -496,22 +512,23 @@ export default { ...@@ -496,22 +512,23 @@ export default {
cancelButtonText: "取消", cancelButtonText: "取消",
cancelButtonClass: "msg_btn_gray", cancelButtonClass: "msg_btn_gray",
confirmButtonClass: "msg_btn", confirmButtonClass: "msg_btn",
type: "warning" type: "warning",
}) })
.then(() => { .then(() => {
this.$api.authority this.$api.authority
.resetUserKey({ user_id: this.user_data.accountNo }) .resetUserKey({ user_id: this.user_data.accountNo })
.then(response => { .then((response) => {
if (response.data.success == 1) { if (response.data.success == 1) {
this.$message({ this.$message({
message: "重置密钥成功", message: "重置密钥成功",
type: "success" type: "success",
}); });
this.getUserInfo(); this.getUserInfo();
this.getCurrentUser();
} else { } else {
this.$message({ this.$message({
message: "重置密钥失败", message: "重置密钥失败",
type: "error" type: "error",
}); });
} }
}); });
...@@ -519,7 +536,7 @@ export default { ...@@ -519,7 +536,7 @@ export default {
.catch(() => { .catch(() => {
this.$message({ this.$message({
type: "info", type: "info",
message: "已取消重置" message: "已取消重置",
}); });
}); });
}, },
...@@ -535,7 +552,7 @@ export default { ...@@ -535,7 +552,7 @@ export default {
document.execCommand("copy"); document.execCommand("copy");
this.$message({ this.$message({
message: "复制成功", message: "复制成功",
type: "success" type: "success",
}); });
} }
document.body.removeChild(input); document.body.removeChild(input);
...@@ -548,14 +565,14 @@ export default { ...@@ -548,14 +565,14 @@ export default {
this.whiteAddShow this.whiteAddShow
? this.$message({ ? this.$message({
message: "请按回车完善本次ip填写", message: "请按回车完善本次ip填写",
type: "error" type: "error",
}) })
: (this.whiteAddShow = true); : (this.whiteAddShow = true);
} else if (type == "black") { } else if (type == "black") {
this.blackAddShow this.blackAddShow
? this.$message({ ? this.$message({
message: "请按回车完善本次ip填写", message: "请按回车完善本次ip填写",
type: "error" type: "error",
}) })
: (this.blackAddShow = true); : (this.blackAddShow = true);
} }
...@@ -575,8 +592,8 @@ export default { ...@@ -575,8 +592,8 @@ export default {
self.blackAddShow = false; self.blackAddShow = false;
self.newIpBlack = ""; self.newIpBlack = "";
} }
} },
} },
}; };
</script> </script>
<style scoped> <style scoped>
......
...@@ -165,9 +165,14 @@ ...@@ -165,9 +165,14 @@
</div> </div>
<div ref="ApplyDesc" slot="ApplyDesc" class="params_apply_desc">{{ desc }}</div> <div ref="ApplyDesc" slot="ApplyDesc" class="params_apply_desc">{{ desc }}</div>
<div ref="ResourceOverview" slot="ResourceOverview" class="params_resource_overview"> <div ref="ResourceOverview" slot="ResourceOverview" class="params_resource_overview">
<div v-if="now_user == 0"> <div v-if="now_user == 0 && use_uid != ''">
当您觉得使用空间不足时,可以选择至服务超市- 当您觉得使用空间不足时,可以选择至服务超市-
<span @click="goto('/shop/cloud')" class="link_span">云资源服务页面</span>的升级现有工作区域来完成配置扩容操作。 <span
v-if="apploy_msg.first_level == -1 || (apploy_msg.first_level == 1 && apploy_msg.second_level != 0)"
@click="goto('/shop/cloud')"
class="link_span"
>云资源服务页面</span>
<span v-else>云资源服务页面</span>的升级现有工作区域来完成配置扩容操作。
</div> </div>
<el-row class="params_charts"> <el-row class="params_charts">
<el-col :span="8" class="params_col"> <el-col :span="8" class="params_col">
......
...@@ -24,7 +24,19 @@ ...@@ -24,7 +24,19 @@
:key="item.id" :key="item.id"
@click="clickBtn(index)" @click="clickBtn(index)"
:class="activeBtn == index ? 'fwcs_btn_act':'fwcs_btn_dis'" :class="activeBtn == index ? 'fwcs_btn_act':'fwcs_btn_dis'"
>{{ item.name }}</el-button> >
<img
v-if="activeBtn == index"
:src="require('../../assets/imgs/' + item.active + '.png')"
class="fwcs_btn_img"
/>
<img
v-else
:src="require('../../assets/imgs/' + item.default + '.png')"
class="fwcs_btn_img"
/>
{{ 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">
...@@ -1005,6 +1017,32 @@ export default { ...@@ -1005,6 +1017,32 @@ export default {
this.$api.workbench.getServiceTypeList().then((response) => { this.$api.workbench.getServiceTypeList().then((response) => {
if (response.data.success == 1) { if (response.data.success == 1) {
this.btnList = response.data.data; this.btnList = response.data.data;
this.btnList.forEach((item) => {
switch (item.id) {
case 5:
item.default = "nav_ic_shujufw";
item.active = "nav_ic_shujufw_sel";
break;
case 6:
item.default = "nav_ic_shikongfw";
item.active = "nav_ic_shikongfw_sel";
break;
case 7:
item.default = "nav_ic_shipinfw";
item.active = "nav_ic_shipinfw_sel";
break;
case 10:
item.default = "nav_ic_ganzhifw";
item.active = "nav_ic_ganzhifw_sel";
break;
case 21:
item.default = "nav_ic_zonghefw";
item.active = "nav_ic_zonghefw_sel";
break;
default:
break;
}
});
let skfwRadios = this.btnList[1].childDomains; let skfwRadios = this.btnList[1].childDomains;
skfwRadios.splice(2, 1); skfwRadios.splice(2, 1);
this.skfwRadios = skfwRadios; this.skfwRadios = skfwRadios;
...@@ -1157,6 +1195,11 @@ export default { ...@@ -1157,6 +1195,11 @@ export default {
background-color: #e3e5ef; background-color: #e3e5ef;
color: #8890a7; color: #8890a7;
} }
.fwcs_btn_img {
position: relative;
top: 2px;
margin-right: 4px;
}
.gray_line { .gray_line {
width: 100%; width: 100%;
margin: 20px auto; margin: 20px auto;
......
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