Commit 3b6abece authored by 张俊's avatar 张俊

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

parents 49b2f150 5e701a5b
...@@ -661,8 +661,8 @@ border-radius:8px; ...@@ -661,8 +661,8 @@ border-radius:8px;
.apaas_button .el-button--danger { .apaas_button .el-button--danger {
color: #fff; color: #fff;
background-color: #e15260; background-color: #ad3a4a;
border-color: #e15260; border-color: #ad3a4a;
} }
.apaas_button .el-button.is-disabled, .apaas_button .el-button.is-disabled,
...@@ -1194,4 +1194,7 @@ border-radius:8px; ...@@ -1194,4 +1194,7 @@ border-radius:8px;
} }
.el-checkbox__input:hover .el-checkbox__inner { .el-checkbox__input:hover .el-checkbox__inner {
border-color: #515fe7; border-color: #515fe7;
}
.el-date-editor .el-range-input {
width: 36%;
} }
\ No newline at end of file
...@@ -80,9 +80,12 @@ ...@@ -80,9 +80,12 @@
</div> </div>
<div class="list-container" v-else> <div class="list-container" v-else>
<list-table <list-table
ref="listTable"
:header="listHeader" :header="listHeader"
:data="listData" :data="listData"
:padding-left="listPaddingLeft" :padding-left="listPaddingLeft"
:select="listSelect"
@select="selectAction"
></list-table> ></list-table>
</div> </div>
...@@ -146,6 +149,10 @@ export default { ...@@ -146,6 +149,10 @@ export default {
type: String, type: String,
default: () => "请输入关键字", default: () => "请输入关键字",
}, },
listSelect: {
type: Boolean,
default: false,
},
}, },
data: () => ({ data: () => ({
showListFilter: false, showListFilter: false,
...@@ -223,6 +230,15 @@ export default { ...@@ -223,6 +230,15 @@ export default {
}); });
}, 200); }, 200);
}, },
selectAction(selectedItems) {
this.$emit("list-select", selectedItems);
},
clearSelection() {
this.$refs.listTable.clearSelection();
},
setSelectedRow(row, flag) {
this.$refs.listTable.setSelectedRow(row, flag);
},
}, },
mounted() { mounted() {
this.initOtherFilter(); this.initOtherFilter();
......
<template> <template>
<div class="apass_table"> <div class="apass_table">
<el-table <el-table
ref="apassTable"
:data="data" :data="data"
@sort-change="sortChange" @sort-change="sortChange"
@row-click="rowClick" @row-click="rowClick"
@selection-change="selectAction"
:row-class-name="rowClassName" :row-class-name="rowClassName"
> >
<el-table-column <el-table-column
v-if="paddingLeft > 10" v-if="paddingLeft > 10"
:width="paddingLeft - 10" :width="paddingLeft - 10"
></el-table-column> ></el-table-column>
<el-table-column type="selection" width="80" align="center" v-if="select">
<!-- checkbox -->
</el-table-column>
<el-table-column <el-table-column
v-for="(item, index) in header" v-for="(item, index) in header"
:label="item.label" :label="item.label"
...@@ -303,6 +308,10 @@ export default { ...@@ -303,6 +308,10 @@ export default {
type: Function, type: Function,
default: null, default: null,
}, },
select: {
type: Boolean,
default: false,
},
}, },
data() { data() {
return { return {
...@@ -395,6 +404,15 @@ export default { ...@@ -395,6 +404,15 @@ export default {
leaveMoreActionList() { leaveMoreActionList() {
this.showMoreActionList = false; this.showMoreActionList = false;
}, },
selectAction(selectedItems) {
this.$emit("select", selectedItems);
},
clearSelection() {
this.$refs.apassTable.clearSelection();
},
setSelectedRow(row, flag) {
this.$refs.apassTable.toggleRowSelection(row, flag);
},
}, },
}; };
</script> </script>
......
<template>
<el-upload
drag
action="/apaas/static/file/upload"
:data="{
directory: 'sdk',
uniqueCode: false,
}"
:file-list="fileList"
:before-upload="beforeUpload"
:on-success="uploadSuccess"
>
<i class="el-icon-upload"></i>
<div class="el-upload__text">
<p>将文件拖到此处,或<em>点击上传</em></p>
<p class="upload_tip" v-if="tip" v-text="tip"></p>
</div>
</el-upload>
</template>
<script>
export default {
model: {
prop: "url",
event: "change",
},
props: {
url: {
type: String,
default: "",
},
tip: {
type: String,
default: "",
},
},
computed: {
fileList() {
let list = [];
if (this.url) {
let path = this.url.split("/");
list = [
{
name: path[path.length - 1],
url: this.url,
},
];
}
return list;
},
},
methods: {
getFileType(fileName) {
let startIndex = fileName.lastIndexOf(".");
if (startIndex != -1) {
return fileName
.substring(startIndex + 1, fileName.length)
.toLowerCase();
} else {
return "";
}
},
beforeUpload(file) {
const filtType = this.getFileType(file.name);
if (filtType === "rar" || filtType === "zip") {
return true;
} else {
this.$message.error("仅支持rar和zip格式!");
return false;
}
},
uploadSuccess({ data }) {
this.$emit("change", data);
},
},
};
</script>
<style scoped>
.upload_tip {
font-size: 12px;
line-height: 20px;
color: #a9aec0;
}
</style>
...@@ -2,11 +2,11 @@ ...@@ -2,11 +2,11 @@
<div class="order_list"> <div class="order_list">
<div class="order_th_pad"> <div class="order_th_pad">
<el-row class="order_th"> <el-row class="order_th">
<el-col :span="8">服务信息</el-col> <el-col :span="7">服务信息</el-col>
<el-col :span="5">规格</el-col> <el-col :span="5">规格</el-col>
<el-col :span="3">购买时长</el-col> <el-col :span="3">购买时长</el-col>
<el-col :span="3">总价</el-col> <el-col :span="3">总价</el-col>
<el-col :span="2">申请状态</el-col> <el-col :span="3">申请状态</el-col>
<el-col :span="3">操作</el-col> <el-col :span="3">操作</el-col>
</el-row> </el-row>
</div> </div>
......
...@@ -66,7 +66,7 @@ ...@@ -66,7 +66,7 @@
<el-col :span="6"> <el-col :span="6">
<el-form-item prop="cpu" class="form_item input_has_right"> <el-form-item prop="cpu" class="form_item input_has_right">
<div class="form_item_title">CPU:</div> <div class="form_item_title">CPU:</div>
<el-select v-model="formNew.cpu" placeholder="请选择CPU使用量"> <el-select v-model="formNew.cpu" @change="changeCPU" placeholder="请选择CPU使用量">
<el-option <el-option
v-for="item in optionsCPU" v-for="item in optionsCPU"
:key="item.value" :key="item.value"
...@@ -1101,7 +1101,6 @@ export default { ...@@ -1101,7 +1101,6 @@ export default {
}, },
tabClick() {}, tabClick() {},
getNewList(val) { getNewList(val) {
console.log(val);
this.formNew.apply_file_name = val[0].name; this.formNew.apply_file_name = val[0].name;
this.formNew.apply_file = val[0].url; this.formNew.apply_file = val[0].url;
}, },
...@@ -1111,7 +1110,6 @@ export default { ...@@ -1111,7 +1110,6 @@ export default {
}, },
handleChange() {}, handleChange() {},
getForm(val) { getForm(val) {
console.log(val);
if (val !== "") { if (val !== "") {
let paramsOld = this.workSpaceOptions[val]; let paramsOld = this.workSpaceOptions[val];
this.workSpaceId = paramsOld.Id; this.workSpaceId = paramsOld.Id;
...@@ -1328,6 +1326,22 @@ export default { ...@@ -1328,6 +1326,22 @@ export default {
} }
} }
}, },
changeCPU(val) {
console.log(val);
this.formOld.memory = "";
this.formNew.memory = "";
if (val == "8") {
this.optionsRAM = [
{ value: "16", label: "16" },
{ value: "32", label: "32" },
]
} else if (val == "16") {
this.optionsRAM = [
{ value: "32", label: "32" },
{ value: "64", label: "64" },
]
}
}
}, },
}; };
</script> </script>
......
...@@ -24,8 +24,8 @@ ...@@ -24,8 +24,8 @@
<div class="card_word"> <div class="card_word">
<p class="card_name">账户余额</p> <p class="card_name">账户余额</p>
<p> <p>
{{ helper.numberFormat(user_info.answer_num) {{ helper.numberFormat(user_info.account_balance)
}}<span v-if="user_info.answer_num > 10000" class="card_wan"> }}<span v-if="user_info.account_balance > 10000" class="card_wan">
</span> </span>
</p> </p>
...@@ -36,8 +36,8 @@ ...@@ -36,8 +36,8 @@
<div class="card_word"> <div class="card_word">
<p class="card_name">充值笔数</p> <p class="card_name">充值笔数</p>
<p> <p>
{{ helper.numberFormat(user_info.view_num) {{ helper.numberFormat(user_info.recharge_count)
}}<span v-if="user_info.view_num > 10000" class="card_wan"> }}<span v-if="user_info.recharge_count > 10000" class="card_wan">
</span> </span>
</p> </p>
...@@ -67,6 +67,7 @@ ...@@ -67,6 +67,7 @@
end-placeholder="结束日期" end-placeholder="结束日期"
value-format="yyyy-MM-dd" value-format="yyyy-MM-dd"
:clearable="false" :clearable="false"
@change="getCoinList"
></el-date-picker> ></el-date-picker>
</div> </div>
<apass-table <apass-table
...@@ -103,12 +104,11 @@ export default { ...@@ -103,12 +104,11 @@ export default {
user_info: { user_info: {
user_name: "", user_name: "",
role: "", role: "",
question_num: 0, account_balance: 0,
answer_num: 0, recharge_count: 0,
view_num: 0,
picture_path: "", picture_path: "",
}, },
tableData: [{}, {}], tableData: [],
table_header: [], table_header: [],
total_list: 0, total_list: 0,
currentPage: 1, currentPage: 1,
...@@ -125,8 +125,8 @@ export default { ...@@ -125,8 +125,8 @@ export default {
this.pagination.page += val; this.pagination.page += val;
this.refreshData(); this.refreshData();
}, },
getUserCoin() { getUserCoins() {
this.$api.user.getUserQA().then((response) => { this.$api.user.getUserCoins().then((response) => {
if (response.data.success == 1) { if (response.data.success == 1) {
this.user_info = response.data.data; this.user_info = response.data.data;
} }
...@@ -140,39 +140,47 @@ export default { ...@@ -140,39 +140,47 @@ export default {
let query = { let query = {
start: this.date.length != 0 ? this.date[0] : "", start: this.date.length != 0 ? this.date[0] : "",
end: this.date.length != 0 ? this.date[1] : "", end: this.date.length != 0 ? this.date[1] : "",
limit: this.currentlimit,
page: this.currentPage,
}; };
console.log(query) this.$api.user.getCoinList(query).then((response) => {
this.$api.user.getUserQA().then((response) => {
if (response.data.success == 1) { if (response.data.success == 1) {
this.user_info = response.data.data; if (response.data.data && response.data.data.length != 0) {
this.tableData = response.data.data
} else {
this.tableData = [];
this.currentPage = 1;
}
this.total_list = response.data.total;
} }
}); });
}, },
}, },
mounted() { mounted() {
this.getUserCoin(); this.getUserCoins();
this.getCoinList(); this.getCoinList();
this.table_header = [ this.table_header = [
{ {
prop: "title", prop: "serial_number",
label: "充值流水ID", label: "充值流水ID",
align: "center", align: "center",
type: "html", type: "html",
getHtml: (str) => { getHtml: (str) => {
return `<span style="color:#0f2683;font-weight:bold;width: 100%;overflow: hidden;white-space: nowrap;text-overflow: ellipsis;" title="${str.title}">123123</span>`; return `<span style="color:#0f2683;font-weight:bold;width: 100%;overflow: hidden;white-space: nowrap;text-overflow: ellipsis;" title="${str.serial_number}">${str.serial_number}</span>`;
}, },
}, },
{ {
prop: "content", prop: "amount",
label: "充值金额(金币/个)", label: "充值金额(金币/个)",
align: "center", align: "center",
type: "html", type: "html",
getHtml: (str) => { getHtml: (str) => {
return `<span style="width: 100%;overflow: hidden;white-space: nowrap;text-overflow: ellipsis;">123123123</span>`; return `<span style="width: 100%;overflow: hidden;white-space: nowrap;text-overflow: ellipsis;">${str.amount}</span>`;
}, },
}, },
{ {
prop: "answer_num", prop: "balance",
label: "账户余额(金币/个)", label: "账户余额(金币/个)",
align: "center", align: "center",
}, },
......
This diff is collapsed.
...@@ -1144,8 +1144,12 @@ export default { ...@@ -1144,8 +1144,12 @@ export default {
bodys = JSON.stringify(request); bodys = JSON.stringify(request);
} else if (this.zhfwQqt == "x-www-form-urlencoded") { } else if (this.zhfwQqt == "x-www-form-urlencoded") {
let request = this.$refs.fwcs_zhfw_www.getTableData().concat(); let request = this.$refs.fwcs_zhfw_www.getTableData().concat();
let arr = [];
request.pop(); request.pop();
bodys = JSON.stringify(request); request.forEach(item => {
arr.push({key: item.requestEncoding, val: item.requestValue, field_type: "text"})
});
bodys = JSON.stringify(arr);
} }
} }
} }
......
...@@ -71,10 +71,10 @@ const user = { ...@@ -71,10 +71,10 @@ const user = {
// my coins // my coins
getUserCoins() { getUserCoins() {
return axios.get(``) return axios.get(`/apaas/backmgt/user/myAccount`)
}, },
getCoinList() { getCoinList(params) {
return axios.get(``) return axios.get(`/apaas/backmgt/user/rechargeRecords?start=${params.start}&end=${params.end}&limit=${params.limit}&page=${params.page}`)
} }
} }
......
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