+
@@ -32,8 +34,8 @@
@@ -63,20 +65,71 @@
-
+
批量删除
已选择
- 3
+ {{ selection.length }}
项
- 清空
+ 清空
新增SDK类型
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 取消
+
+
+ 确定
+
+
+
+
+
@@ -84,19 +137,66 @@
import helper from "@/services/helper.js";
import apassList from "@/components/apass-list";
import apassDialog from "@/components/apass-dialog";
+import apassUpload from "@/components/apass-upload";
import showMoreFilter from "@/components/show-more-filter";
export default {
components: {
apassList,
apassDialog,
+ apassUpload,
showMoreFilter,
},
data() {
return {
- paddingLeft: 25,
+ paddingLeft: 0,
listTotal: 0,
- listHeader: [{}],
+ listHeader: [
+ {
+ label: "SDK类型",
+ prop: "style_name",
+ type: "button",
+ width: 240,
+ },
+ {
+ label: "版本号",
+ prop: "version",
+ align: "center",
+ },
+ {
+ label: "是否提供SDK包下载",
+ prop: "is_sdk",
+ align: "center",
+ },
+ {
+ label: "操作人",
+ prop: "user_name",
+ align: "center",
+ },
+ {
+ label: "最后更新时间",
+ prop: "updated",
+ getText: ({ updated }) => this.getTimeText(updated || ""),
+ align: "center",
+ },
+ {
+ label: "操作",
+ type: "buttons",
+ align: "center",
+ width: 240,
+ actionList: [
+ {
+ label: "修改",
+ callback: this.editItem,
+ },
+ {
+ label: "删除",
+ callback: this.deleteItem,
+ class: "warn",
+ },
+ ],
+ },
+ ],
listData: [],
topFilter: {
type: "",
@@ -104,6 +204,24 @@ export default {
},
types: [],
tempFilter: {},
+ detailForm: {
+ type: 0, // 0:新增 1:修改
+ style_name: "",
+ version: "",
+ file_url: "",
+ },
+ detailFormRules: {
+ style_name: [
+ { required: true, message: "请填写SDK类型名称", trigger: "blur" },
+ { max: 20, message: "长度应小于20个字符", trigger: "change" },
+ ],
+ },
+ deleteDialogInfo: {
+ msg: "",
+ submit: null,
+ },
+ saveSection: false,
+ selection: [],
};
},
methods: {
@@ -114,12 +232,44 @@ export default {
};
this.tempFilter = filter;
+ this.saveSection = true;
+
+ this.$http
+ .get("/apaas/support/sdk/styles/list", {
+ params: {
+ style: fullFilter.type,
+ start: fullFilter.time && fullFilter.time[0],
+ end: fullFilter.time && fullFilter.time[1],
+ limit: fullFilter.size,
+ page: fullFilter.page,
+ },
+ })
+ .then(({ data }) => {
+ if (data.success === 1) {
+ this.listTotal = data.total;
+ this.listData = data.data || [];
+
+ this.$nextTick(() => {
+ this.selection.forEach((item) => {
+ let target = this.listData.find((v) => v.id === item.id);
+
+ if (target) {
+ this.setCurrentRow(target, true);
+ }
+ });
+ this.saveSection = false;
+ });
+ }
+ });
- console.log(fullFilter);
+ this.$http.get("/apaas/support/sdk/styleNames/list").then(({ data }) => {
+ if (data.success === 1) {
+ this.types = data.data || [];
+ }
+ });
},
topFilterClear() {
this.topFilter = {
- name: "",
type: "",
time: "",
};
@@ -131,38 +281,191 @@ export default {
refreshPage() {
this.$refs.list.resetCurrentPage();
},
- deleteSlectedItem() {
- console.log("deleteSlectedItem");
+ deleteSlection() {
+ this.deleteDialogInfo.msg = `确认删除要删除所选项吗?`;
+ this.deleteDialogInfo.submit = () => {
+ this.deleteRequest(this.selection.map((row) => row.id));
+ };
+ this.$refs.deleteDialog.show();
+ },
+ clearSelection() {
+ this.$refs.list.clearSelection();
},
- cleanSlectedItem() {
- console.log("cleanSlectedItem");
+ setCurrentRow(row, flag) {
+ this.$refs.list.setSelectedRow(row, flag);
},
addNewSdk() {
- console.log("addNewSdk");
+ this.detailForm = {
+ type: 0,
+ style_name: "",
+ version: "",
+ file_url: "",
+ };
+ this.$refs.detailDialog.show();
+ },
+ detailCancelAction() {
+ this.$refs.detailDialog.hide();
+ },
+ detailSubmitAction() {
+ if (this.detailForm.type === 0) {
+ this.$http
+ .post("/apaas/support/sdk/styles/create", {
+ style_name: this.detailForm.style_name,
+ version: this.detailForm.version,
+ file_url: this.detailForm.file_url,
+ })
+ .then(({ data }) => {
+ if (data.success === 1) {
+ this.$message.success("新增成功");
+ this.refreshPage();
+ this.$refs.detailDialog.hide();
+ } else {
+ this.$message.error("新增失败");
+ }
+ })
+ .catch((error) => {
+ console.log(error);
+ this.$message.error("新增失败");
+ });
+ } else {
+ this.$http
+ .put("/apaas/support/sdk/styles/put", {
+ id: this.detailForm.id,
+ style_name: this.detailForm.style_name,
+ version: this.detailForm.version,
+ file_url: this.detailForm.file_url,
+ })
+ .then(({ data }) => {
+ if (data.success === 1) {
+ this.$message.success("修改成功");
+ this.refreshPage();
+ this.$refs.detailDialog.hide();
+ } else {
+ this.$message.error("修改失败");
+ }
+ })
+ .catch((error) => {
+ console.log(error);
+ this.$message.error("修改失败");
+ });
+ }
+ },
+ editItem(item) {
+ this.detailForm = {
+ type: 1,
+ id: item.id,
+ style_name: item.style_name,
+ version: item.version,
+ file_url: item.file_url,
+ };
+ /* this.$http
+ .get("/apaas/support/sdk/styles/detail", {
+ params: {
+ id: item.id,
+ },
+ })
+ .then(({ data }) => {
+ if (data.success === 1) {
+ this.detailForm = data.data;
+ }
+ }); */
+ this.$refs.detailDialog.show();
+ },
+ deleteItem(item) {
+ this.deleteDialogInfo.msg = `确认删除${item.style_name}吗?`;
+ this.deleteDialogInfo.submit = () => {
+ this.deleteRequest([item.id]);
+ };
+ this.$refs.deleteDialog.show();
+ },
+ deleteRequest(ids) {
+ this.$http
+ .delete("/apaas/support/sdk/styles/delete", {
+ body: {
+ ids: ids,
+ },
+ })
+ .then(({ data }) => {
+ if (data.success === 1) {
+ this.$message.success("删除成功");
+ this.selection = [];
+ this.refreshPage();
+ } else {
+ this.$message.error("删除失败");
+ }
+ })
+ .catch((error) => {
+ console.log(error);
+ this.$message.error("删除失败");
+ });
+ },
+ getTimeText(time) {
+ return helper.dateStringTransform(time);
+ },
+ selectAction(values) {
+ if (this.saveSection) {
+ return;
+ }
+
+ let cleanPage = values.length === 0; // 是否清空当前页所有选中
+ let selection = [...this.selection];
+
+ if (cleanPage) {
+ selection = selection.filter((item) => {
+ return !this.listData.find((v) => {
+ return v.id === item.id;
+ });
+ });
+ } else {
+ selection.push(...values);
+ }
+
+ this.selection = selection;
},
},
};
diff --git a/src/pages/user/my-coin.vue b/src/pages/user/my-coin.vue
index 9d3c536333f097956210773f5050ab1443498a73..11d8cae134e873555448725cdc2712a1d718441d 100644
--- a/src/pages/user/my-coin.vue
+++ b/src/pages/user/my-coin.vue
@@ -24,8 +24,8 @@
账户余额
- {{ helper.numberFormat(user_info.answer_num)
- }}
+ {{ helper.numberFormat(user_info.account_balance)
+ }}
万
@@ -36,8 +36,8 @@
充值笔数
- {{ helper.numberFormat(user_info.view_num)
- }}
+ {{ helper.numberFormat(user_info.recharge_count)
+ }}
万
@@ -67,6 +67,7 @@
end-placeholder="结束日期"
value-format="yyyy-MM-dd"
:clearable="false"
+ @change="getCoinList"
>
{
+ 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 `123123`;
+ return `${str.serial_number}`;
},
},
{
- prop: "content",
+ prop: "amount",
label: "充值金额(金币/个)",
align: "center",
type: "html",
getHtml: (str) => {
- return `123123123`;
+ return `${str.amount}`;
},
},
{
- prop: "answer_num",
+ prop: "balance",
label: "账户余额(金币/个)",
align: "center",
},
diff --git a/src/pages/user/order/order_detail.vue b/src/pages/user/order/order_detail.vue
index fd2aee4be18e7be9c6d1f2f5463bdb3582060252..89930cf292a6f966396f97fdbb54840abff05ce3 100644
--- a/src/pages/user/order/order_detail.vue
+++ b/src/pages/user/order/order_detail.vue
@@ -2,7 +2,9 @@
个人中心
- 订单管理
+
+ 订单管理
+
订单详情
@@ -12,24 +14,49 @@
申请状态
待审核
+ v-if="
+ orderDetail.approval_first_level == 0 &&
+ orderDetail.pay_status != -1
+ "
+ >
+ 待审核
+
审核中
+ v-else-if="
+ orderDetail.approval_first_level == 1 &&
+ orderDetail.approval_second_level == 0 &&
+ orderDetail.pay_status != -1
+ "
+ >
+ 审核中
+
审核通过
+ v-else-if="
+ orderDetail.approval_first_level == 1 &&
+ orderDetail.approval_second_level == 1 &&
+ orderDetail.pay_status != -1
+ "
+ >
+ 审核通过
+
审核未通过
+ v-else-if="
+ (orderDetail.approval_first_level == -1 ||
+ orderDetail.approval_second_level == -1) &&
+ orderDetail.pay_status != -1
+ "
+ >
+ 审核未通过
+
已取消
+ >
+ 已取消
+
申请时间
-
{{ helper.dateStringTransform(orderDetail.add_time) }}
+
+ {{ helper.dateStringTransform(orderDetail.add_time) }}
+
取消时间
-
{{ helper.dateStringTransform(orderDetail.cancel_time) }}
+
+ {{ helper.dateStringTransform(orderDetail.cancel_time) }}
+
服务评价:
-
+
填写评价:
@@ -72,69 +110,131 @@
>
- 取消
+
+ 取消
+
确定提交
+ >
+ 确定提交
+
- 服务评价
+
+ 服务评价
+
查看评价
+ >查看评价
收起评价
+ >收起评价
再次申请
+ >再次申请
取消申请
+ >取消申请
服务评分:
-
+
评价详情:
{{ message.content }}
-