diff --git a/src/views/resource/oss.vue b/src/views/resource/oss.vue
index 765f06e..99c2e17 100644
--- a/src/views/resource/oss.vue
+++ b/src/views/resource/oss.vue
@@ -29,7 +29,13 @@
调试
+
+ 启用
@@ -44,6 +50,12 @@
{{row.categoryName}}
+
+
+
@@ -51,6 +63,7 @@
import {getList, getDetail, add, update, remove, enable} from "@/api/resource/oss";
import {mapGetters} from "vuex";
import func from "@/util/func";
+ import {send} from "@/api/resource/sms";
export default {
data() {
@@ -58,6 +71,7 @@
form: {},
query: {},
loading: true,
+ box: false,
page: {
pageSize: 10,
currentPage: 1,
@@ -74,6 +88,7 @@
index: true,
viewBtn: true,
selection: true,
+ menuWidth: 300,
labelWidth: 100,
dialogWidth: 880,
column: [
@@ -190,7 +205,33 @@
},
]
},
- data: []
+ data: [],
+ debugForm: {
+ code: '',
+ },
+ debugOption: {
+ submitText: "提交",
+ column: [
+ {
+ label: "资源编号",
+ prop: "code",
+ disabled: true,
+ span: 24,
+ },
+ {
+ label: "上传背景",
+ prop: "backgroundUrl",
+ type: 'upload',
+ listType: 'picture-img',
+ action: '/api/blade-resource/oss/endpoint/put-file',
+ propsHttp: {
+ res: 'data',
+ url: 'link',
+ },
+ span: 24,
+ },
+ ]
+ }
};
},
watch: {
@@ -204,10 +245,13 @@
item.display = category === 4;
}
});
+ },
+ 'debugForm.code'() {
+ this.debugOption.column[1].action = `/api/blade-resource/oss/endpoint/put-file?code=${this.debugForm.code}`;
}
},
computed: {
- ...mapGetters(["permission"]),
+ ...mapGetters(["userInfo", "permission"]),
permissionList() {
return {
addBtn: this.vaildData(this.permission.oss_add),
@@ -303,6 +347,18 @@
this.$refs.crud.toggleSelection();
});
},
+ handleDebug(row) {
+ this.box = true;
+ this.debugForm.code = row.ossCode;
+ this.debugForm.backgroundUrl = '';
+ },
+ handleSubmit(form, done) {
+ this.$message({
+ type: "success",
+ message: `获取到图片地址:[${form.backgroundUrl}]`
+ });
+ done();
+ },
handleDelete() {
if (this.selectionList.length === 0) {
this.$message.warning("请选择至少一条数据");
diff --git a/src/views/resource/sms.vue b/src/views/resource/sms.vue
index 472f810..829093d 100644
--- a/src/views/resource/sms.vue
+++ b/src/views/resource/sms.vue
@@ -35,7 +35,7 @@
@click="handleDebug(scope.row)">调试
启用
@@ -71,7 +71,6 @@
query: {},
loading: true,
box: false,
- code: '',
page: {
pageSize: 10,
currentPage: 1,