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

order,commodity,cloud,menus,user_info,fwzc

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