Commit fd612534 authored by 徐一鸣's avatar 徐一鸣

Merge branch 'dev' of cloud.wodcloud.com:apaas/apaas-v3-ui into dev

parents 40513595 c7b519d6
......@@ -410,6 +410,9 @@ export default {
this.filterLists[3].childDomains = data.organizations
? data.organizations
: [];
if (this.urlFilter == "7") {
this.filterLists[1].childDomains = [];
}
setTimeout(() => {
this.judgeHeight();
}, 0);
......
......@@ -639,7 +639,7 @@
<div class="btn_footer fyzj_item">
<div class="fyzj">
<p class="fyzj_p">
<span v-if="getSumCoin > userInfo.account_balance" class="yebz">
<span v-if="getSumCoin > user_info.account_balance" class="yebz">
余额不足,请联系超级管理员进行充值
</span>
费用总计:<span class="fyzj_span">
......@@ -651,12 +651,16 @@
<span @click="dialogFymx = true" class="ckfymx_a">
查看费用明细
</span>
<span class="ckfymx_qian">账户余额:{{ userInfo.account_balance }} 金币</span>
<span class="ckfymx_qian"
>账户余额:{{ user_info.account_balance }} 金币</span
>
</p>
</div>
<el-button
:class="getSumCoin <= userInfo.account_balance ? 'submit' : 'nosubmit'"
:disabled="getSumCoin > userInfo.account_balance"
:class="
getSumCoin <= user_info.account_balance ? 'submit' : 'nosubmit'
"
:disabled="getSumCoin > user_info.account_balance"
@click="submitApp"
>
提交申请
......@@ -959,12 +963,14 @@
<div class="fyzj_1">
费用总计:
<p>
<span class="fyzj_1_num"> 2 </span
<span class="fyzj_1_num"> {{ getSumCoin }} </span
><span class="fyzj_1_jb">金币</span>
</p>
</div>
<p class="fyzj_2">
账户余额:<span class="fyzj_2_num">{{ userInfo.account_balance }} 金币</span>
账户余额:<span class="fyzj_2_num"
>{{ user_info.account_balance }} 金币</span
>
</p>
</div>
<div class="clear_xxx"></div>
......@@ -1031,7 +1037,6 @@ import TableUm from "@/components/table/table-um";
import InfoList from "@/components/infoList";
import ApassDialog from "@/components/apass-dialog";
import helper from "@/services/helper.js";
import { mapState } from "vuex";
export default {
components: {
......@@ -1053,39 +1058,40 @@ export default {
a_deductions = this.deductions;
if (this.formNew.cpu == "8") {
if (this.formNew.memory == "16") {
let priceObj = this.cpu_memory.find(item => {
let priceObj = this.cpu_memory.find((item) => {
return item.cpu == 8 && item.memory == 16;
})
sumCM += priceObj.price;
});
sumCM += Number(priceObj.price);
} else if (this.formNew.memory == "32") {
let priceObj = this.cpu_memory.find(item => {
let priceObj = this.cpu_memory.find((item) => {
return item.cpu == 8 && item.memory == 32;
})
sumCM += priceObj.price;
});
sumCM += Number(priceObj.price);
}
} else if (this.formNew.cpu == "16") {
if (this.formNew.memory == "32") {
let priceObj = this.cpu_memory.find(item => {
let priceObj = this.cpu_memory.find((item) => {
return item.cpu == 16 && item.memory == 32;
})
sumCM += priceObj.price;
});
sumCM += Number(priceObj.price);
} else if (this.formNew.memory == "64") {
let priceObj = this.cpu_memory.find(item => {
let priceObj = this.cpu_memory.find((item) => {
return item.cpu == 16 && item.memory == 64;
})
sumCM += priceObj.price;
});
sumCM += Number(priceObj.price);
}
}
sumCM = sumCM * Number(this.formNew.appDuration);
if (
this.formNew.dataDisk >= 1 &&
this.formNew.perDataDisk >= 1 &&
this.formNew.appDuration >= 1
) {
sumDisk +=
this.formNew.dataDisk *
this.formNew.perDataDisk *
this.formNew.appDuration *
this.hard_disk[0].price;
Number(this.formNew.dataDisk) *
Number(this.formNew.perDataDisk) *
Number(this.formNew.appDuration) *
Number(this.hard_disk[0].price);
this.jifeiList1[2] = {
name: "数据盘",
num: `${this.formNew.dataDisk}个数据盘,每个数据盘${this.formNew.perDataDisk}GB`,
......@@ -1112,39 +1118,40 @@ export default {
a_deductions = this.deductions;
if (this.formOld.cpu == "8") {
if (this.formOld.memory == "16") {
let priceObj = this.cpu_memory.find(item => {
let priceObj = this.cpu_memory.find((item) => {
return item.cpu == 8 && item.memory == 16;
})
sumCM += priceObj.price;
});
sumCM += Number(priceObj.price);
} else if (this.formOld.memory == "32") {
let priceObj = this.cpu_memory.find(item => {
let priceObj = this.cpu_memory.find((item) => {
return item.cpu == 8 && item.memory == 32;
})
sumCM += priceObj.price;
});
sumCM += Number(priceObj.price);
}
} else if (this.formOld.cpu == "16") {
if (this.formOld.memory == "32") {
let priceObj = this.cpu_memory.find(item => {
let priceObj = this.cpu_memory.find((item) => {
return item.cpu == 16 && item.memory == 32;
})
sumCM += priceObj.price;
});
sumCM += Number(priceObj.price);
} else if (this.formOld.memory == "64") {
let priceObj = this.cpu_memory.find(item => {
let priceObj = this.cpu_memory.find((item) => {
return item.cpu == 16 && item.memory == 64;
})
sumCM += priceObj.price;
});
sumCM += Number(priceObj.price);
}
}
sumCM = sumCM * Number(this.formOld.appDuration);
if (
this.formOld.dataDisk >= 1 &&
this.formOld.perDataDisk >= 1 &&
this.formOld.appDuration >= 1
) {
sumDisk +=
this.formOld.dataDisk *
this.formOld.perDataDisk *
this.formOld.appDuration *
this.hard_disk[0].price;
Number(this.formOld.dataDisk) *
Number(this.formOld.perDataDisk) *
Number(this.formOld.appDuration) *
Number(this.hard_disk[0].price);
this.jifeiList1[2] = {
name: "数据盘",
num: `${this.formOld.dataDisk}个数据盘,每个数据盘${this.formOld.perDataDisk}GB`,
......@@ -1168,11 +1175,11 @@ export default {
this.formOld.appDuration >= 1 ? this.formOld.appDuration : 0
}个月`;
}
this.amounts_payable = (sumCM + sumDisk).toFixed(2);
console.log(sumCM, sumDisk)
this.amounts_payable = Number((Number(sumCM) + Number(sumDisk)).toFixed(2));
// this.total_money = sumCM + sumDisk - a_deductions;
return this.amounts_payable;
},
...mapState(["userInfo"]),
},
data() {
var checkName = (rule, value, callback) => {
......@@ -1239,7 +1246,7 @@ export default {
perCPU: undefined,
perRAMs: undefined,
perRAM: undefined,
appDuration: undefined,
appDuration: 1,
durType: 1,
apply_file: "",
apply_file_name: "",
......@@ -1332,7 +1339,7 @@ export default {
perCPU: undefined,
perRAMs: undefined,
perRAM: undefined,
appDuration: undefined,
appDuration: 1,
durType: 1,
apply_file: "",
apply_file_name: "",
......@@ -1470,14 +1477,23 @@ export default {
],
cpu_memory: [],
hard_disk: [],
user_info: {},
};
},
mounted() {
this.getUser();
this.getNameSpaceList();
this.getSpecifications();
this.getUserCoins();
},
methods: {
getUserCoins() {
this.$api.user.getUserCoins().then((response) => {
if (response.data.success == 1) {
this.user_info = response.data.data;
}
});
},
getQueryId() {
if (this.$route.query.namespace && this.$route.query.namespace != "") {
this.activeName = "1";
......@@ -1594,7 +1610,6 @@ export default {
sum: "2000金币",
},
];
this.deductions = this.userInfo.account_balance;
} else {
this.formShow = false;
}
......@@ -1666,25 +1681,23 @@ export default {
apply_connect_mobile: this.form.phone,
memory: Number(this.formNew.memory),
containers: this.formNew.containerGroup,
disk_num: this.formNew.dataDisk,
disk_cap: this.formNew.perDataDisk,
one_cpu_min: this.formNew.perCPU,
one_cpu_max: this.formNew.perCPUs,
one_memory_min: this.formNew.perRAM,
one_memory_max: this.formNew.perRAMs,
one_cpu_min: this.formNew.perCPU ? this.formNew.perCPU : 0,
one_cpu_max: this.formNew.perCPUs ? this.formNew.perCPUs : 0,
one_memory_min: this.formNew.perRAM ? this.formNew.perRAM : 0,
one_memory_max: this.formNew.perRAMs ? this.formNew.perRAMs : 0,
},
disks: [
{
disk_num: this.formNew.dataDisk + "",
disk_cap: this.formNew.perDataDisk + "",
store_type: this.formNew.store_type + "",
disk_num: this.formNew.dataDisk ? this.formNew.dataDisk + "" : "0",
disk_cap: this.formNew.perDataDisk ? this.formNew.perDataDisk + "" : "0",
store_type: "nfs-client",
},
],
payment: {
// total_money: this.total_money,
disk_single_money: this.disk_single_money,
eci_single_money: this.eci_single_money,
total_money: this.amounts_payable,
disk_single_money: String(this.disk_single_money),
eci_single_money: String(this.eci_single_money),
total_money: String(this.amounts_payable),
},
};
this.$api.serviceShop.applicationCloud(query).then((response) => {
......@@ -1714,19 +1727,25 @@ export default {
apply_connect_mobile: this.form.phone,
memory: Number(this.formOld.memory),
containers: this.formOld.containerGroup,
one_cpu_min: this.formOld.perCPU,
one_cpu_max: this.formOld.perCPUs,
one_memory_min: this.formOld.perRAM,
one_memory_max: this.formOld.perRAMs,
one_cpu_min: this.formOld.perCPU ? this.formOld.perCPU : 0,
one_cpu_max: this.formOld.perCPUs ? this.formOld.perCPUs : 0,
one_memory_min: this.formOld.perRAM ? this.formOld.perRAM : 0,
one_memory_max: this.formOld.perRAMs ? this.formOld.perRAMs : 0,
},
disks: [
{
disk_num: this.formOld.dataDisk,
disk_cap: this.formOld.perDataDisk,
disk_num: this.formOld.dataDisk ? this.formOld.dataDisk + "" : "0",
disk_cap: this.formOld.perDataDisk ? this.formOld.perDataDisk + "" : "0",
store_type: "nfs-client",
},
],
remove_disks: this.delDataDiskList.map((item) => item.id),
payment: {
// total_money: this.total_money,
disk_single_money: String(this.disk_single_money),
eci_single_money: String(this.eci_single_money),
total_money: String(this.amounts_payable),
},
};
this.$api.serviceShop.updateCloud(query).then((response) => {
if (response.data.success == 1) {
......
......@@ -60,7 +60,7 @@
<el-col :span="15" class="shopping_cart_options_num">
<div class="fyzj">
<p class="fyzj_p">
<span v-if="getSumCoin > userInfo.account_balance" class="yebz">
<span v-if="getSumCoin > user_info.account_balance" class="yebz">
余额不足,请联系超级管理员进行充值
</span>
费用总计:<span class="fyzj_span">
......@@ -73,7 +73,7 @@
{{ list.length }} 项服务,已选择
<span class="dwa_djf">{{ getNum }}</span>
<span class="ckfymx_qian"
>账户余额:{{ userInfo.account_balance }} 金币</span
>账户余额:{{ user_info.account_balance }} 金币</span
>
</p>
</div>
......@@ -81,7 +81,7 @@
</el-col>
<el-col :span="4" class="shopping_cart_options_cell">
<el-button
v-if="getNum != 0 && getSumCoin <= userInfo.account_balance"
v-if="getNum != 0 && getSumCoin <= user_info.account_balance"
@click="oneClickApplication"
class="shopping_cart_options_cell_btn_act"
>一键申请</el-button
......@@ -101,7 +101,6 @@
<script>
import ShoppingCartList from "@/components/shopping-cart/shopping-cart-list";
import { mapState } from "vuex";
export default {
components: {
......@@ -114,9 +113,11 @@ export default {
checkListIn: [],
list: [],
listIn: [],
user_info: {},
}),
mounted() {
this.getList();
this.getUserCoins();
},
computed: {
getNum() {
......@@ -132,9 +133,9 @@ export default {
this.checkList.forEach((item, index) => {
if (item) {
if (this.list[index].service_id != 0) {
sum += (this.list[index].service.spcs_info.money * this.list[index].duration).toFixed(2);
sum += Number((this.list[index].service.spcs_info.money * this.list[index].duration).toFixed(2));
} else {
sum += (this.list[index].application.price * this.list[index].duration).toFixed(2);
sum += Number((this.list[index].application.price * this.list[index].duration).toFixed(2));
}
}
});
......@@ -143,7 +144,6 @@ export default {
getCartState() {
return this.$store.state.cartState;
},
...mapState(["userInfo"]),
},
watch: {
getCartState(newVal) {
......@@ -151,6 +151,13 @@ export default {
},
},
methods: {
getUserCoins() {
this.$api.user.getUserCoins().then((response) => {
if (response.data.success == 1) {
this.user_info = response.data.data;
}
});
},
getList() {
this.$api.serviceShop.getShoppingCart().then((response) => {
if (response.data.success == "1") {
......
......@@ -179,7 +179,7 @@ export default {
.post(
`/apaas/backmgt/user/recharge`,{
"user_id":this.user_info1.user_id,
     "num":parseInt(this.money_num)
     "num":this.money_num+''
}
).then((res)=>{
if(res.data.success){
......
......@@ -56,13 +56,13 @@ export default {
this.name = "视频服务";
this.urlFilter = "7";
this.url = "";
this.filterNames = [];
this.filterNames = ["", "服务领域", "服务来源组织"];
break;
case "perception_service_list":
this.name = "感知服务";
this.urlFilter = "10";
this.url = "";
this.filterNames = [];
this.url = "/shop/gzfwDetail";
this.filterNames = ["", "服务领域", "服务来源组织"];
break;
case "comprehensive_app_list":
this.name = "融合服务";
......
......@@ -51,7 +51,7 @@
>
<div class="dia_reason">
<el-form ref="form1" :model="reason_form" :rules="reason_rules">
<el-form-item class="dia_item">
<el-form-item class="dia_item" prop="reason">
<p>删除理由:</p>
<el-input
type="textarea"
......@@ -292,6 +292,7 @@ export default {
this.table_header = [];
if (val == "/qa/questions") {
this.form_data[1].label = "发布人搜索";
this.form_data[1].placeholder = "请输入发布人名称";
this.form_data[2].label = "发布时间";
this.table_header = [
{
......@@ -355,6 +356,7 @@ export default {
this.getQList();
} else if (val == "/qa/answers") {
this.form_data[1].label = "回复人搜索";
this.form_data[1].placeholder = "请输入回复人名称";
this.form_data[2].label = "回复时间";
this.table_header = [
{
......
......@@ -67,9 +67,11 @@
<div v-for="(item, index) in data_list" :key="index" class="qa_cell">
<div class="qa_cell_in">
<div :class="activeName == 2 ? 'qa_is_del' : 'qa_init'">
<p v-if="activeName == 1" class="cell_answer">
{{ item.answer }}
</p>
<p
v-if="item.answer != ''"
class="cell_answer"
v-html="item.answer"
></p>
<p
@click="gotodeta(item.question_id)"
:class="activeName == 0 ? 'cell_title' : 'cell_ans_title'"
......@@ -77,18 +79,14 @@
{{ item.title }}
</p>
<p class="cell_cont">
{{
item.answer
? item.question_content.replace(/<[^<>]+>/g, "")
: item.content.replace(/<[^<>]+>/g, "")
}}
{{ item.content.replace(/<[^<>]+>/g, "") }}
</p>
<p v-if="activeName == 2" class="cell_other">
<span>
删除时间:{{ helper.dateStringTransform(item.deleted_time) }}
</span>
<span>删除人:{{ item.delete_user }}</span>
<span>删除理由:{{ item.reason }}</span>
<span>删除理由:{{ item.delete_reason }}</span>
</p>
<p v-else class="cell_other">
<span>{{ helper.dateStringTransform(item.created) }}</span>
......@@ -324,24 +322,27 @@ export default {
},
delQ() {
let items = [{ id: this.delItem.id }];
console.log(items);
this.diaDelItem = false;
this.$api.user.delQuestions(items).then((response) => {
if (response.data.success == 1) {
this.$message({
message: "删除成功",
type: "success",
});
this.refreshData();
}
});
},
delA() {
let items = [{ id: this.delItem.id }];
this.diaDelItem = false;
this.$api.user.delAnswers(items).then((response) => {
if (response.data.success == 1) {
this.$message({
message: "删除成功",
type: "success",
});
this.refreshData();
}
});
},
......
......@@ -1004,14 +1004,6 @@ export default {
color: "#58617a",
url:'/search_engine',
},
{
text: "数据采集",
pic: require("@/assets/imgs/home_tool_ic_sscj.png"),
bg: "#fff2e2",
color: "#ea7d19",
url:'https://apaas3.wodcloud.com/sjcj/ui/',
target: 1,
},
],
service_arr: [
["服务列表", "申请服务", "云资源"],
......@@ -1038,12 +1030,6 @@ export default {
role: 2,
url: "/authority/organization"
},
{
pic: require("@/assets/imgs/home_tool_ic_shuju.png"),
text: "数据采集管理",
role: 2,
url: "https://apaas3.wodcloud.com/sjcj/ui/#/data_acquisition/file"
},
{
pic: require("@/assets/imgs/home_tool_ic_message.png"),
text: "消息与推送管理",
......
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