no message

master
mabo 2021-07-02 18:04:17 +08:00
parent 31349634f6
commit c403fce786
1 changed files with 5 additions and 74 deletions

View File

@ -59,8 +59,6 @@
:data="data" :data="data"
ref="table" ref="table"
sortable="custom" sortable="custom"
@on-sort-change="changeSort"
@on-selection-change="changeSelect"
></Table> ></Table>
<Row type="flex" justify="end" class="page"> <Row type="flex" justify="end" class="page">
<Page <Page
@ -77,29 +75,6 @@
></Page> ></Page>
</Row> </Row>
</Card> </Card>
<Modal
:title="modalTitle"
v-model="modalVisible"
:mask-closable="false"
:width="500"
>
<Form
ref="underForm"
:model="underForm"
:label-width="100"
:rules="formValidate"
>
<FormItem label="下架原因" prop="reason">
<Input v-model="underForm.reason" clearable style="width: 100%" />
</FormItem>
</Form>
<div slot="footer">
<Button type="text" @click="modalVisible = false">取消</Button>
<Button type="primary" :loading="submitLoading" @click="lower(form.id)"
>提交</Button
>
</div>
</Modal>
</div> </div>
</template> </template>
@ -110,11 +85,7 @@ export default {
components: {}, components: {},
data() { data() {
return { return {
id: "", //id
openSearch: true, //
loading: true, // loading: true, //
modalVisible: false, //
modalTitle: "", //
drop: false, drop: false,
dropDownContent: "展开", dropDownContent: "展开",
dropDownIcon: "ios-arrow-down", dropDownIcon: "ios-arrow-down",
@ -124,24 +95,8 @@ export default {
pageSize: 10, // pageSize: 10, //
sort: "create_time", // sort: "create_time", //
order: "desc", // order: "desc", //
saveType: "TEMPLATE"
}, },
underForm: { //
reason: "",
},
form: {
//
goodsName: "",
sn: "",
marketEnable: "",
price: "",
sellerName: "",
},
//
formValidate: {},
submitLoading: false, //
selectList: [], //
selectCount: 0, //
columns: [ // columns: [ //
{ {
title: "ID", title: "ID",
@ -202,7 +157,7 @@ export default {
"Button", "Button",
{ {
props: { props: {
type: "primary", type: "success",
size: "small", size: "small",
}, },
style: { style: {
@ -244,22 +199,14 @@ export default {
}, },
methods: { methods: {
init() { init() {
let here = this.$route.matched.find((v) => v.name === this.$route.name);
this.pageType = here.props.default ? here.props.default.type : "";
if (this.pageType === "TEMPLATE") {
this.searchForm.saveType = "TEMPLATE";
} else {
this.searchForm.saveType = "DRAFT";
}
this.getDataList(); this.getDataList();
}, },
//
editGoods(v) { editGoods(v) {
this.searchForm.saveType === "TEMPLATE" ? this.$router.push({ name: "goods-template-operation-edit", query: { draftId: v.id } })
this.$router.push({ name: "goods-template-operation-edit", query: { draftId: v.id } }):
this.$router.push({ name: "goods-draft-operation-edit", query: { draftId: v.id } });
}, },
removeDraft (id) { removeDraft (id) {
let showType = this.searchForm.saveType === "TEMPLATE" ? "模版" : "草稿"; let showType = "模版";
this.$Modal.confirm({ this.$Modal.confirm({
title: "确认审核", title: "确认审核",
content: "您确认要删除id为 " + id + " 的" + showType + "吗?", content: "您确认要删除id为 " + id + " 的" + showType + "吗?",
@ -278,7 +225,6 @@ export default {
changePage(v) { changePage(v) {
this.searchForm.pageNumber = v; this.searchForm.pageNumber = v;
this.getDataList(); this.getDataList();
this.clearSelectAll();
}, },
changePageSize(v) { changePageSize(v) {
this.searchForm.pageSize = v; this.searchForm.pageSize = v;
@ -296,21 +242,6 @@ export default {
// //
this.getDataList(); this.getDataList();
}, },
changeSort(e) {
this.searchForm.sort = e.key;
this.searchForm.order = e.order;
if (e.order === "normal") {
this.searchForm.order = "";
}
this.getDataList();
},
clearSelectAll() {
this.$refs.table.selectAll(false);
},
changeSelect(e) {
this.selectList = e;
this.selectCount = e.length;
},
dropDown() { dropDown() {
if (this.drop) { if (this.drop) {
this.dropDownContent = "展开"; this.dropDownContent = "展开";