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;
.apaas_button .el-button--danger {
color: #fff;
background-color: #e15260;
border-color: #e15260;
background-color: #ad3a4a;
border-color: #ad3a4a;
}
.apaas_button .el-button.is-disabled,
......@@ -1195,3 +1195,6 @@ border-radius:8px;
.el-checkbox__input:hover .el-checkbox__inner {
border-color: #515fe7;
}
.el-date-editor .el-range-input {
width: 36%;
}
\ No newline at end of file
......@@ -80,9 +80,12 @@
</div>
<div class="list-container" v-else>
<list-table
ref="listTable"
:header="listHeader"
:data="listData"
:padding-left="listPaddingLeft"
:select="listSelect"
@select="selectAction"
></list-table>
</div>
......@@ -146,6 +149,10 @@ export default {
type: String,
default: () => "请输入关键字",
},
listSelect: {
type: Boolean,
default: false,
},
},
data: () => ({
showListFilter: false,
......@@ -223,6 +230,15 @@ export default {
});
}, 200);
},
selectAction(selectedItems) {
this.$emit("list-select", selectedItems);
},
clearSelection() {
this.$refs.listTable.clearSelection();
},
setSelectedRow(row, flag) {
this.$refs.listTable.setSelectedRow(row, flag);
},
},
mounted() {
this.initOtherFilter();
......
<template>
<div class="apass_table">
<el-table
ref="apassTable"
:data="data"
@sort-change="sortChange"
@row-click="rowClick"
@selection-change="selectAction"
:row-class-name="rowClassName"
>
<el-table-column
v-if="paddingLeft > 10"
:width="paddingLeft - 10"
></el-table-column>
<el-table-column type="selection" width="80" align="center" v-if="select">
<!-- checkbox -->
</el-table-column>
<el-table-column
v-for="(item, index) in header"
:label="item.label"
......@@ -303,6 +308,10 @@ export default {
type: Function,
default: null,
},
select: {
type: Boolean,
default: false,
},
},
data() {
return {
......@@ -395,6 +404,15 @@ export default {
leaveMoreActionList() {
this.showMoreActionList = false;
},
selectAction(selectedItems) {
this.$emit("select", selectedItems);
},
clearSelection() {
this.$refs.apassTable.clearSelection();
},
setSelectedRow(row, flag) {
this.$refs.apassTable.toggleRowSelection(row, flag);
},
},
};
</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 @@
<div class="order_list">
<div class="order_th_pad">
<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="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-row>
</div>
......
......@@ -66,7 +66,7 @@
<el-col :span="6">
<el-form-item prop="cpu" class="form_item input_has_right">
<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
v-for="item in optionsCPU"
:key="item.value"
......@@ -1101,7 +1101,6 @@ export default {
},
tabClick() {},
getNewList(val) {
console.log(val);
this.formNew.apply_file_name = val[0].name;
this.formNew.apply_file = val[0].url;
},
......@@ -1111,7 +1110,6 @@ export default {
},
handleChange() {},
getForm(val) {
console.log(val);
if (val !== "") {
let paramsOld = this.workSpaceOptions[val];
this.workSpaceId = paramsOld.Id;
......@@ -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>
......
......@@ -24,8 +24,8 @@
<div class="card_word">
<p class="card_name">账户余额</p>
<p>
{{ helper.numberFormat(user_info.answer_num)
}}<span v-if="user_info.answer_num > 10000" class="card_wan">
{{ helper.numberFormat(user_info.account_balance)
}}<span v-if="user_info.account_balance > 10000" class="card_wan">
</span>
</p>
......@@ -36,8 +36,8 @@
<div class="card_word">
<p class="card_name">充值笔数</p>
<p>
{{ helper.numberFormat(user_info.view_num)
}}<span v-if="user_info.view_num > 10000" class="card_wan">
{{ helper.numberFormat(user_info.recharge_count)
}}<span v-if="user_info.recharge_count > 10000" class="card_wan">
</span>
</p>
......@@ -67,6 +67,7 @@
end-placeholder="结束日期"
value-format="yyyy-MM-dd"
:clearable="false"
@change="getCoinList"
></el-date-picker>
</div>
<apass-table
......@@ -103,12 +104,11 @@ export default {
user_info: {
user_name: "",
role: "",
question_num: 0,
answer_num: 0,
view_num: 0,
account_balance: 0,
recharge_count: 0,
picture_path: "",
},
tableData: [{}, {}],
tableData: [],
table_header: [],
total_list: 0,
currentPage: 1,
......@@ -125,8 +125,8 @@ export default {
this.pagination.page += val;
this.refreshData();
},
getUserCoin() {
this.$api.user.getUserQA().then((response) => {
getUserCoins() {
this.$api.user.getUserCoins().then((response) => {
if (response.data.success == 1) {
this.user_info = response.data.data;
}
......@@ -140,39 +140,47 @@ export default {
let query = {
start: this.date.length != 0 ? this.date[0] : "",
end: this.date.length != 0 ? this.date[1] : "",
limit: this.currentlimit,
page: this.currentPage,
};
console.log(query)
this.$api.user.getUserQA().then((response) => {
this.$api.user.getCoinList(query).then((response) => {
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() {
this.getUserCoin();
this.getUserCoins();
this.getCoinList();
this.table_header = [
{
prop: "title",
prop: "serial_number",
label: "充值流水ID",
align: "center",
type: "html",
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: "充值金额(金币/个)",
align: "center",
type: "html",
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: "账户余额(金币/个)",
align: "center",
},
......
This diff is collapsed.
......@@ -1144,8 +1144,12 @@ export default {
bodys = JSON.stringify(request);
} else if (this.zhfwQqt == "x-www-form-urlencoded") {
let request = this.$refs.fwcs_zhfw_www.getTableData().concat();
let arr = [];
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 = {
// my coins
getUserCoins() {
return axios.get(``)
return axios.get(`/apaas/backmgt/user/myAccount`)
},
getCoinList() {
return axios.get(``)
getCoinList(params) {
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