Browse Source

新增编辑商品

master
tianyi 1 month ago
parent
commit
4bb685b6c7
  1. 41
      src/api/app.js
  2. 89
      src/views/app/shop/addType.vue
  3. 690
      src/views/app/shop/dictManage.vue
  4. 81
      src/views/app/shop/editDictType.vue
  5. 6
      src/views/app/shop/shop.vue
  6. 312
      src/views/sys/oss-manage/ossManage.vue

41
src/api/app.js

@ -46,6 +46,45 @@ export const deleteCompany = (params) => {
return postRequest('/app/company/delByIds', params)
}
// 新增分类接口
export const addType = (params) => {
return postBodyRequest('/app/productCategory/batchSaveCategoryAndAttribute', params)
}
//编辑分类
export const editType = (params) => {
return postRequest('/app/productCategory/edit', params)
}
//子分类列表
export const categoryList = (params) => {
return postRequest('/app/productAttribute/selectByCategoryId', params)
}
//子分类规格值列表
export const categorySonList = (params) => {
return getRequest('/app/productAttributeValue/selectByAttributeId', params)
}
//新增商品
export const productSave = (params) => {
return postBodyRequest('/app/product/save', params)
}
//编辑商品
export const productEdit = (params) => {
return postBodyRequest('/app/product/edit', params)
}
//商品列表
export const getShareList = (params) => {
return postBodyRequest('/app/product/getShareList', params)
}
//删除分类
export const deleteType = (params) => {
return postRequest('/app/productCategory/delById', params)
}
export const getCompanyData = (params) => {
return getRequest('/app/company/getByCondition', params)
}
@ -150,7 +189,7 @@ export const addLogisticsRoute = (params) => {
//获取商品分类
export const goodsType = (params) => {
return postBodyRequest('/app/productCategory/list', params)
return getRequest('/app/productCategory/list', params)
}
//编辑线路

89
src/views/app/shop/addType.vue

@ -1,63 +1,29 @@
<template>
<div>
<Modal
title="添加字典"
v-model="visible"
:mask-closable="false"
:width="500"
>
<Form
ref="form"
:model="form"
:label-width="85"
:rules="formValidate"
>
<FormItem label="字典名称" prop="title">
<Input v-model="form.title" />
</FormItem>
<FormItem label="字典类型" prop="type" class="block-tool">
<Tooltip
placement="right"
:max-width="220"
transfer
content="建议设置为英文名且需唯一 非开发人员谨慎修改"
>
<Input v-model="form.type" />
</Tooltip>
</FormItem>
<FormItem label="备注" prop="description">
<Input v-model="form.description" />
<Modal title="添加字典" v-model="visible" :mask-closable="false" :width="500">
<Form ref="form" :model="form" :label-width="85" :rules="formValidate">
<FormItem label="分类名称" prop="title">
<Input v-model="form.categoryName" />
</FormItem>
<FormItem label="排序值" prop="sortOrder">
<Tooltip
trigger="hover"
placement="right"
content="值越小越靠前,支持小数"
>
<InputNumber
:max="1000"
:min="0"
v-model="form.sortOrder"
></InputNumber>
<Tooltip trigger="hover" placement="right" content="值越小越靠前,支持小数">
<InputNumber :max="1000" :min="0" v-model="form.sort"></InputNumber>
</Tooltip>
</FormItem>
</Form>
<div slot="footer">
<Button type="text" @click="visible = false">取消</Button>
<Button
type="primary"
:loading="submitLoading"
@click="submit"
>提交</Button
>
<Button type="primary" :loading="submitLoading" @click="submit">提交</Button>
</div>
</Modal>
</div>
</template>
<script>
import { addDict } from "@/api/index";
export default {
import {
addType
} from "@/api/app";
export default {
name: "addDictType",
components: {},
props: {
@ -74,34 +40,36 @@ export default {
visible: this.value,
submitLoading: false,
form: {
title: "",
type: "",
description: "",
sortOrder: 0,
categoryName: "",
sort: 0,
shopId: ''
},
formValidate: {
//
title: [{ required: true, message: "请输入", trigger: "blur" }],
type: [{ required: true, message: "请输入", trigger: "blur" }],
sortOrder: [
{
categoryName: [{
required: true,
message: "请输入",
trigger: "blur"
}],
sort: [{
required: true,
type: "number",
message: "请输入排序值",
trigger: "blur",
},
],
}, ],
},
};
},
methods: {
init() {},
init(v) {
this.form.shopId = v
},
submit() {
this.$refs.form.validate((valid) => {
if (valid) {
//
this.submitLoading = true;
addDict(this.form).then((res) => {
addType(this.form).then((res) => {
this.submitLoading = false;
if (res.success) {
this.$Message.success("操作成功");
@ -118,7 +86,7 @@ export default {
}
//
this.$refs.form.resetFields();
this.form.sortOrder = this.dataLength;
this.form.sort = this.dataLength;
this.visible = value;
},
},
@ -133,10 +101,9 @@ export default {
mounted() {
this.init();
},
};
};
</script>
<style lang="less">
@import "@/styles/drawer-common.less";
@import "@/styles/drawer-common.less";
</style>

690
src/views/app/shop/dictManage.vue

@ -1,6 +1,56 @@
<style lang="less">
@import "@/styles/tree&table-common.less";
@import "./dictManage.less";
.btn{
width: 80px;
height: 30px;
text-align: center;
line-height: 30px;
background: #008ba0;
color:#fff;
border-right:1px solid #fff;
}
.content-left {
width: 80px;
background: #eee;
height: 475px;
overflow: scroll;
scrollbar-width: none;
}
.left-box {
width: 100%;
height: 50px;
font-size: 14px;
text-align: center;
line-height: 50px;
border-bottom: 1px solid #fff;
}
.left-box-hover {
width: 100%;
height: 50px;
font-size: 14px;
text-align: center;
line-height: 50px;
border-bottom: 1px solid #fff;
background-color: #fff;
}
.red {
border-right: 3px solid red;
}
.content-low{
height: 50px;
padding: 3px 5px;
border:1px solid #eee;
display: inline;
margin-right: 5px;
font-weight: bold;
}
.checked{
background: #60F3FF;
color: #fff !important;
}
</style>
<template>
<div class="search">
@ -58,7 +108,7 @@
</Row>
<Row align="middle" justify="space-between" class="operation">
<div>
<Button @click="add" type="primary" icon="md-add">添加数据</Button>
<Button @click="add" type="primary" icon="md-add">新增商品</Button>
<Button @click="delAll" icon="md-trash">批量删除</Button>
</div>
<div class="icons">
@ -94,7 +144,7 @@
<Table :loading="loading" border :columns="columns" :data="data" :size="tableSize" sortable="custom"
@on-sort-change="changeSort" @on-selection-change="showSelect" ref="table"></Table>
<Row type="flex" justify="end" class="page">
<Page :current="searchForm.pageNumber" :total="total" :page-size="searchForm.pageSize"
<Page :current="searchForm.pageNum" :total="total" :page-size="searchForm.pageSize"
@on-change="changePage" @on-page-size-change="changePageSize" :page-size-opts="[10, 20, 50]"
size="small" show-total show-elevator show-sizer></Page>
</Row>
@ -102,68 +152,175 @@
</Row>
</Card>
<addType :dataLength="dataLength" v-model="showAddDict" @on-submit="getAllDict" />
<addType ref="addTypePage" :dataLength="dataLength" v-model="showAddDict" @on-submit="getGoodsType" />
<editDictType :data="dictForm" v-model="showEditDict" @on-submit="editDictSuccess" />
<editDictType ref="editTypePage" :data="dictForm" v-model="showEditDict" @on-submit="editDictSuccess" />
<Modal :title="modalTitle" v-model="modalVisible" :mask-closable="false" :width="500">
<Modal :title="modalTitle" v-model="modalVisible" :mask-closable="false" :width="screenWidth *0.9">
<Form ref="form" :model="form" :label-width="80" :rules="formValidate">
<Col span="6">
<FormItem label="商品图标" class="form-noheight">
<upload-pic-input v-model="addGoodsForm.productPicture"></upload-pic-input>
</FormItem>
</Col>
<Col span="6">
<FormItem label="名称" prop="title">
<Input v-model="form.title" />
<Input v-model="addGoodsForm.productName" />
</FormItem>
<FormItem label="数据值" prop="value">
<Input v-model="form.value" />
</Col>
<Col span="6">
<FormItem label="店铺分类" class="form-noheight">
<Input v-model="editTitle" disabled />
</FormItem>
<FormItem label="备注" prop="description">
<Input v-model="form.description" />
</Col>
<Col span="6">
<FormItem label="商品规格" class="form-noheight">
<div>
<div v-for="(item,index) in addGoodsForm.attributeListPrice" style="display: flex;margin-top:5px;">
<Input v-model="item.specName" v-if="item.specName != ''&& addGoodsForm.attributeListPrice.length != 1" style="padding-right: 10px;" disabled />
<Input v-model="item.specPrice" style="padding-right: 10px;" placeholder="商品价格" />
<Input v-model="item.specNum" style="padding-right: 10px;" placeholder="商品库存"/>
<button @click="deldantiaoguige(index)" v-if="addGoodsForm.attributeListPrice.length>1" style="width: 120px;height: 30px;line-height: 30px;color: red;border:none;background: #fff;">删除</button>
</div>
<div @click="checkSpec('guige')" style="margin-top:5px;width: 80px;height: 30px;text-align: center;line-height: 30px;background: #008ba0;color:#fff;">
选择规格
</div>
</div>
</FormItem>
<FormItem label="排序值" prop="sortOrder">
<Tooltip trigger="hover" placement="right" content="值越小越靠前,支持小数">
<InputNumber :max="1000" :min="0" v-model="form.sortOrder"></InputNumber>
</Tooltip>
</Col>
<Col span="6">
<FormItem label="拼团信息" class="form-noheight">
<div>
<div v-for="(item,index) in addGoodsForm.productGroupBuyPrices" style="display: flex;margin-top:5px;">
<Input v-model="item.groupCount" style="padding-right: 10px;" placeholder="成团人数" />
<Input v-model="item.groupPrice" style="padding-right: 10px;" placeholder="成团价格"/>
<button @click="delGroup(index)" v-if="addGoodsForm.productGroupBuyPrices.length>1" style="width: 120px;height: 30px;line-height: 30px;color: red;border:none;background: #fff;">删除</button>
</div>
<div @click="addGroup()" style="margin-top:5px;width: 80px;height: 30px;text-align: center;line-height: 30px;background: #008ba0;color:#fff;">
新增拼团
</div>
</div>
</FormItem>
<FormItem label="是否启用" prop="status">
<i-switch size="large" v-model="form.status" :true-value="0" :false-value="-1">
<span slot="open">启用</span>
<span slot="close">禁用</span>
</i-switch>
</Col>
<Col span="6">
<FormItem label="餐盒费" class="form-noheight">
<Input v-model="addGoodsForm.lunchBox" />
</FormItem>
</Col>
<Col span="6">
<FormItem label="商品属性" class="form-noheight">
<div style="display: flex;flex-direction: column;">
<div v-for="(value,key) in Array.from(addGoodsForm.attributeList1)" style="display: flex;">
{{value[0]}}:
<div v-for="(item,index) in value[1].title">
{{item}}
</div>
</div>
<div @click="checkSpec('shuxing')" style="width: 80px;height: 30px;text-align: center;line-height: 30px;background: #008ba0;color:#fff;">
选择属性
</div>
</div>
</FormItem>
</Col>
<Col span="6">
<FormItem label="起售数量" class="form-noheight">
<Input v-model="addGoodsForm.startPayNum" type="number" placeholder="每笔订单起购数量" />
</FormItem>
</Col>
<Col span="8">
<FormItem label="可售时间" class="form-noheight">
<div>
<div style="line-height: 37px;">
<input type="radio" :checked="addGoodsForm.sellTime==0" name="sellTime" @click="checkSellTime('0')" />全时段售卖
<input type="radio" :checked="addGoodsForm.sellTime==1" name="sellTime" @click="checkSellTime('1')" />自定义时段
</div>
</div>
<div style="display: flex;" v-if="addGoodsForm.sellTime == 1">
<TimePicker format="HH:mm" v-model="addGoodsForm.sellBeginTime" @on-change="selectDateRange" placeholder="选择起始时间"/>
<div style="width: 10px;height: 10px;"></div>
<TimePicker format="HH:mm" v-model="addGoodsForm.sellEndTime" @on-change="selectDateRange" placeholder="选择结束时间"/>
</div>
</FormItem>
</Col>
<Col span="8">
<FormItem label="详细图文" class="form-noheight">
<div style="width:500px;height:400px;">
<editor v-model="addGoodsForm.productIntro" height="250"></editor>
</div>
</FormItem>
</Col>
</Form>
<div slot="footer">
<Button type="text" @click="modalVisible = false">取消</Button>
<Button type="primary" :loading="submitLoading" @click="handelSubmit">提交</Button>
</div>
</Modal>
<Modal :title="modalTitle" v-model="modalclass" :mask-closable="false" :width="700">
<div style="height:500px;">
<div class="content-left" style="float: left;">
<div class="left-box" v-for="(item,index) in categoryData" :key="index"
:class="item.parentId ? 'left-box-hover':''" @click="clickLeftBtn(index)">
<span style="width: 100%;height: 50px;line-height: 50px;display: inline-block;overflow: hidden;"
:class="item.parentId ? 'red' :''">{{item.title}}</span>
</div>
</div>
<div v-for="(item,index) in categorySonData" :key="index" @click="checkSpecValue(index)" class="content-low" :class="item.checked?'checked':''">
{{item.title}}
</div>
</div>
<div slot="footer">
<Button type="text" @click="modalclass = false">取消</Button>
<Button type="primary" :loading="submitLoading" @click="guigeSubmit">提交</Button>
</div>
</Modal>
</div>
</template>
<script>
import {
goodsType,
deleteDict,
searchDict,
getAllDictDataList,
addDictData,
editDictData,
deleteData,
} from "@/api/index";
import {
goodsType,
deleteType,
categoryList,
categorySonList,
productSave,
getShareList,
productEdit
} from "@/api/app";
import addType from "./addType.vue";
import editDictType from "./editDictType.vue";
import uploadPicInput from "@/views/my-components/hiver/upload-pic-input";
import editor from "@/views/my-components/hiver/editor";
import dict from "@/views/my-components/hiver/dict";
export default {
name: "dic-manage",
components: {
addType,
editDictType
editDictType,
uploadPicInput,
dict,
editor
},
data() {
return {
Visiable: false,
specValueArr:[],
attrValueArr:[],
modalclassType:'',
shopId: '',
tableSize: "default",
dataLength: 0,
showAddDict: false,
dictForm: {},
showEditDict: false,
openSearch: true,
categoryIndex: 0,
openTip: true,
treeLoading: false, //
maxHeight: "500px",
@ -174,19 +331,30 @@
span: 18,
expandIcon: "ios-arrow-back",
selectNode: {},
categoryData:[],
categorySonData:[],
treeData: [], //
selectList: [], //
searchForm: {
// data
name: "",
status: "",
pageNumber: 1, //
pageSize: 10, //
sort: "sortOrder", //
order: "asc", //
categoryId: "",
shopId:'',
order: "",
pageNum: 1,
pageSize: "10",
searchStr: "",
sort: ""
// name: "",
// status: "",
// pageSize: 10, //
// sort: "sort", //
// order: "asc", //
},
modalType: 0, //
modalVisible: false, //
modalclass:false,
modalTitle: "", //
form: {
//
@ -194,26 +362,36 @@
value: "",
status: 0,
description: "",
sortOrder: 0,
sort: 0,
},
addGoodsForm:{
id:'',
shopId:'',
categoryId:'', //id
categoryName:'', //
productPicture:'', //
productName:'', //
lunchBox:0, //
startPayNum:'', //
attributeListPrice:[{ //
specPrice:"",
specNum:9999
}],
sellTime:0, //
sellBeginTime:'', //---
sellEndTime:'', //---
attributeList:'',
productGroupBuyPrices:[],
attributeList1:new Map(), //
productIntro:"" //
},
formValidate: {
//
title: [{
required: true,
message: "请输入",
trigger: "blur"
}],
value: [{
productName: [{
required: true,
message: "请输入",
trigger: "blur"
}],
sortOrder: [{
required: true,
type: "number",
message: "请输入排序值",
trigger: "blur",
}, ],
}]
},
columns: [
//
@ -228,65 +406,67 @@
align: "center",
},
{
title: "名称",
key: "title",
minWidth: 160,
sortable: true,
},
{
title: "数据值",
key: "value",
title: "图片",
key: "productPicture",
minWidth: 160,
sortable: true,
render: (h, params) => {
return h("img", {
attrs: {
src: params.row.productPicture,
},
{
title: "备注",
key: "description",
width: 150,
sortable: true,
style: {
cursor: "zoom-in",
width: "80px",
height: "60px",
margin: "10px 0",
"object-fit": "contain",
},
{
title: "排序值",
key: "sortOrder",
width: 100,
align: "center",
sortable: true,
sortType: "asc",
on: {
click: () => {
this.showPic(params.row);
},
{
title: "状态",
key: "status",
align: "center",
width: 120,
render: (h, params) => {
let re = "";
if (params.row.status == 0) {
return h("div", [
h("Badge", {
props: {
status: "success",
text: "启用",
},
}),
]);
} else if (params.row.status == -1) {
return h("div", [
h("Badge", {
props: {
status: "error",
text: "禁用",
});
},
}),
]);
}
},
{
title: "名称",
key: "productName",
minWidth: 160,
},
{
title: "创建时间",
key: "createTime",
width: 200,
sortable: true,
title: "起售数量",
key: "startPayNum",
width: 150,
},
// {
// title: "",
// key: "status",
// align: "center",
// width: 120,
// render: (h, params) => {
// let re = "";
// if (params.row.status == 0) {
// return h("div", [
// h("Badge", {
// props: {
// status: "success",
// text: "",
// },
// }),
// ]);
// } else if (params.row.status == -1) {
// return h("div", [
// h("Badge", {
// props: {
// status: "error",
// text: "",
// },
// }),
// ]);
// }
// },
// },
{
title: "操作",
key: "action",
@ -327,22 +507,29 @@
submitLoading: false, //
data: [], //
total: 0, //
screenWidth: 0,
};
},
methods: {
init() {
init(v) {
this.shopId = v.id
this.searchForm.shopId = v.id
this.addGoodsForm.shopId = v.id
this.screenWidth = window.screen.width;
//
this.getGoodsType();
//
this.getDataList();
// this.getDataList();
},
getGoodsType() {
this.treeLoading = true;
goodsType().then((res) => {
goodsType({
shopId: this.shopId
}).then((res) => {
this.treeLoading = false;
if (res.success) {
this.treeData = res.result;
for(let i=0;i<this.treeData.length;i++){
for (let i = 0; i < this.treeData.length; i++) {
this.treeData[i].title = this.treeData[i].categoryName
}
}
@ -362,8 +549,212 @@
});
} else {
//
this.getAllDict();
this.getGoodsType();
}
},
checkSpec(type){
this.modalclass = true;
this.modalclassType = type
if(type == 'shuxing'){
this.modalTitle = "选择属性";
}else{
this.modalTitle = "选择规格";
}
getAllDictDataList({
name: "",
status: "",
pageNumber: 1,
pageSize: 100000,
sort: 'sortOrder',
order: 'asc',
dictId: '2026945661353725952'
}).then((res) => {
if(res.code == 200){
this.categoryData = res.result.content
for (var i = 0; i < this.categoryData.length; i++) {
if (i == this.categoryIndex) {
this.categoryData[i].parentId = true
} else {
this.categoryData[i].parentId = false
}
}
//parent
this.typeToAttrName = res.result.content[this.categoryIndex].title
this.getCateGorySon(res.result.content[this.categoryIndex].id)
}
});
},
deldantiaoguige(index){
for (var m = 0; m < this.specValueArr.length; m++) {
if(this.specValueArr[m].title == this.addGoodsForm.attributeListPrice[index].specName){
this.specValueArr.splice(m,1)
this.addGoodsForm.attributeListPrice.splice(index,1)
if(this.addGoodsForm.attributeListPrice.length == 1){
this.addGoodsForm.attributeListPrice = {
specName:"",
specPrice:'',
specNum:9999
}
this.specValueArr = []
}
this.$forceUpdate()
return
}
}
},
delGroup(index){
this.addGoodsForm.productGroupBuyPrices.splice(index,1)
},
addGroup(){
let data = {
groupCount:'',
groupPrice:0
}
this.addGoodsForm.productGroupBuyPrices.push(data)
},
showPic(v) {
let image = new Image();
image.src = v.productPicture;
let viewer = new Viewer(image, {
hidden: function() {
viewer.destroy();
},
});
viewer.show();
},
getCateGorySon(id){
getAllDictDataList({
name: "",
status: "",
pageNumber: 1,
pageSize: 100000,
sort: 'sortOrder',
order: 'asc',
dictId: id
}).then((res) => {
if(res.code == 200){
this.categorySonData = res.result.content
if(this.modalclassType == 'shuxing'){
console.log('属性',this.attrValueArr)
if(this.attrValueArr == ""){
this.attrValueArr = this.addGoodsForm.attributeListPrice
}
for (var i = 0; i < this.categorySonData.length; i++) {
if(this.attrValueArr.length>0){
for (var m = 0; m < this.attrValueArr.length; m++) {
if(this.attrValueArr[m].id == this.categorySonData[i].id){
this.categorySonData[i].checked = true
}else{
this.categorySonData[i].checked = false
}
}
}else{
this.categorySonData[i].checked = false
}
}
}else{
//guige
for (var i = 0; i < this.categorySonData.length; i++) {
if(this.specValueArr.length>0){
for (var m = 0; m < this.specValueArr.length; m++) {
if(this.specValueArr[m].id == this.categorySonData[i].id){
this.categorySonData[i].checked = true
}
}
}else{
this.categorySonData[i].checked = false
}
}
}
}
});
},
//
clickLeftBtn(index) {
for (var i = 0; i < this.categoryData.length; i++) {
if (i == index) {
this.categoryData[i].parentId = true
} else {
this.categoryData[i].parentId = false
}
}
this.categoryIndex = index
this.typeToAttrName = this.categoryData[this.categoryIndex].title
this.getCateGorySon(this.categoryData[this.categoryIndex].id)
},
checkSellTime(type){
this.addGoodsForm.sellTime = type;
},
checkSpecValue(index){
//this.typeToAttrName = res.result.content[this.categoryIndex].title
this.categorySonData[index].checked = !this.categorySonData[index].checked
if(this.modalclassType == 'shuxing'){
if(this.categorySonData[index].checked == true){
this.categorySonData[index].parentName = this.typeToAttrName
this.attrValueArr.push(this.categorySonData[index])
}else{
for(let i=0;i<this.attrValueArr.length;i++){
if(this.categorySonData[index].id == this.attrValueArr[i].id){
this.attrValueArr.splice(i,1)
}
}
}
}else{
//guige
if(this.categorySonData[index].checked == true){
this.specValueArr.push(this.categorySonData[index])
}else{
for(let i=0;i<this.specValueArr.length;i++){
if(this.categorySonData[index].id == this.specValueArr[i].id){
this.specValueArr.splice(i,1)
}
}
}
}
this.$forceUpdate()
},
guigeSubmit(){
if(this.modalclassType == 'shuxing'){
for(let i=0;i<this.attrValueArr.length;i++){
if(this.addGoodsForm.attributeList1.size == 0){
//set has get
let data = {
title:[]
}
data.title.push(this.attrValueArr[i].title)
this.addGoodsForm.attributeList1.set(this.attrValueArr[i].parentName,data)
}else{
if(this.addGoodsForm.attributeList1.has(this.attrValueArr[i].parentName)){
this.addGoodsForm.attributeList1.get(this.attrValueArr[i].parentName).title.push(this.attrValueArr[i].title)
}else{
let data = {
title:[]
}
data.title.push(this.attrValueArr[i].title)
this.addGoodsForm.attributeList1.set(this.attrValueArr[i].parentName,data)
}
}
}
}else{
//guige
this.addGoodsForm.attributeListPrice = []
for(let i=0;i<this.specValueArr.length;i++){
this.addGoodsForm.attributeListPrice.push({
specName:this.specValueArr[i].title,
specPrice:'',
specNum:9999
})
}
}
this.modalclass = false;
},
selectTree(v) {
if (v.length > 0) {
@ -377,9 +768,9 @@
let data = JSON.parse(str);
this.selectNode = data;
this.dictForm = data;
this.editTitle = data.title + "(" + data.type + ")";
this.editTitle = data.title;
//
this.searchForm.pageNumber = 1;
this.searchForm.pageNum = 1;
this.searchForm.pageSize = 10;
this.getDataList();
} else {
@ -394,7 +785,7 @@
//
this.selectNode = {};
this.editTitle = "";
this.getDataList();
// this.getDataList();
},
changeTableSize(v) {
this.tableSize = v;
@ -418,47 +809,47 @@
}
},
changePage(v) {
this.searchForm.pageNumber = v;
this.getDataList();
this.searchForm.pageNum = v;
// this.getDataList();
this.clearSelectAll();
},
changePageSize(v) {
this.searchForm.pageSize = v;
this.getDataList();
// this.getDataList();
},
getDataList() {
this.loading = true;
if (this.selectNode.id) {
this.searchForm.dictId = this.selectNode.id;
} else {
delete this.searchForm.dictId;
}
// if (this.selectNode.id) {
this.searchForm.categoryId = this.selectNode.id;
// } else {
// delete this.searchForm.dictId;
// }
if (!this.searchForm.status) {
this.searchForm.status = "";
}
getAllDictDataList(this.searchForm).then((res) => {
getShareList(this.searchForm).then((res) => {
this.loading = false;
if (res.success) {
this.data = res.result.content;
this.total = res.result.totalElements;
if (this.data.length == 0 && this.searchForm.pageNumber > 1) {
this.searchForm.pageNumber -= 1;
this.data = res.result.records;
this.total = res.result.total;
if (this.data.length == 0 && this.searchForm.pageNum > 1) {
this.searchForm.pageNum -= 1;
this.getDataList();
}
}
});
},
handleSearch() {
this.searchForm.pageNumber = 1;
this.searchForm.pageNum = 1;
this.searchForm.pageSize = 10;
this.getDataList();
// this.getDataList();
},
handleReset() {
this.$refs.searchForm.resetFields();
this.searchForm.pageNumber = 1;
this.searchForm.pageNum = 1;
this.searchForm.pageSize = 10;
//
this.getDataList();
// this.getDataList();
},
changeSort(e) {
this.searchForm.sort = e.key;
@ -466,7 +857,7 @@
if (e.order == "normal") {
this.searchForm.order = "";
}
this.getDataList();
// this.getDataList();
},
showSelect(e) {
this.selectList = e;
@ -475,15 +866,15 @@
this.$refs.table.selectAll(false);
},
refreshDict() {
this.getAllDict();
this.getGoodsType();
this.selectNode = {};
this.editTitle = "";
this.getDataList();
// this.getDataList();
},
handleDropdown(name) {
if (name == "editDict") {
if (!this.selectNode.id) {
this.$Message.warning("您还未选择要编辑的字典");
this.$Message.warning("您还未选择要编辑的分类");
return;
}
this.handleEditDict();
@ -496,9 +887,11 @@
handleAddDict() {
this.dataLength = this.treeData.length + 1;
this.showAddDict = true;
this.$refs.addTypePage.init(this.shopId)
},
handleEditDict() {
this.showEditDict = true;
this.$refs.editTypePage.init(this.shopId)
},
editDictSuccess(v) {
for (let attr in v) {
@ -510,21 +903,22 @@
let data = JSON.parse(str);
this.dictForm = data;
this.editTitle = v.title + "(" + v.type + ")";
this.getAllDict();
this.getGoodsType();
},
delDict() {
if (!this.selectNode.id) {
this.$Message.warning("您还未选择要删除的字典");
this.$Message.warning("您还未选择要删除的分类");
return;
}
this.$Modal.confirm({
title: "确认删除",
loading: true,
content: "您确认要删除字典 " + this.selectNode.title + " 及其所有数据?",
content: "您确认要删除分类 " + this.selectNode.title + " 及其所有数据?",
onOk: () => {
//
deleteDict({
ids: this.selectNode.id
deleteType({
id: this.selectNode.id,
shopId: this.shopId
}).then((res) => {
this.$Modal.remove();
if (res.success) {
@ -535,32 +929,32 @@
},
});
},
getChildren(v){
getChildren(v) {
this.Visiable = true;
console.log(v)
this.$nextTick(() => {
this.$refs.dialog.initRecharge(v);
});
},
add() {
if (!this.selectNode.id) {
this.$Message.warning("请先选择一个字典类别");
this.$Message.warning("请先选择一个分类");
return;
}
this.modalType = 0;
this.modalTitle = "添加字典 " + this.editTitle + " 的数据";
this.modalTitle = "添加分类 " + this.editTitle + " 的数据";
this.$refs.form.resetFields();
this.form.sortOrder = this.data.length + 1;
this.form.sort = this.data.length + 1;
this.addGoodsForm.categoryId = this.selectNode.id
this.addGoodsForm.categoryName = this.selectNode.categoryName
this.modalVisible = true;
},
edit(v) {
this.modalType = 1;
if (this.editTitle) {
this.modalTitle = "编辑字典 " + this.editTitle + " 的数据";
this.modalTitle = "编辑分类 " + this.editTitle + " 的数据";
} else {
this.modalTitle = "编辑字典数据";
this.modalTitle = "编辑分类数据";
}
this.$refs.form.resetFields();
// null""
for (let attr in v) {
if (v[attr] == null) {
@ -569,32 +963,44 @@
}
let str = JSON.stringify(v);
let data = JSON.parse(str);
this.form = data;
console.log('111111',data)
this.addGoodsForm = data;
this.addGoodsForm.attributeList1 = JSON.parse(this.addGoodsForm.attributeList)
this.addGoodsForm.attributeList1 = new Map(Object.entries(this.addGoodsForm.attributeList1));
this.addGoodsForm.attributeListPrice = JSON.parse(this.addGoodsForm.attributeListPrice)
this.addGoodsForm.sellTime = this.addGoodsForm.sellBeginTime != '' ? 1 : 0
this.modalVisible = true;
},
handelSubmit() {
this.$refs.form.validate((valid) => {
if (valid) {
this.submitLoading = true;
if (this.modalType == 0) {
// id
delete this.form.id;
this.form.dictId = this.selectNode.id;
addDictData(this.form).then((res) => {
delete this.addGoodsForm.id;
this.addGoodsForm.attributeListPrice = JSON.stringify(this.addGoodsForm.attributeListPrice)
this.addGoodsForm.attributeList = Object.fromEntries(this.addGoodsForm.attributeList1)
this.addGoodsForm.attributeList = JSON.stringify(this.addGoodsForm.attributeList)
productSave(this.addGoodsForm).then((res) => {
this.submitLoading = false;
if (res.success) {
this.$Message.success("操作成功");
this.getDataList();
this.modalVisible = false;
}
});
} else if (this.modalType == 1) {
//
editDictData(this.form).then((res) => {
this.addGoodsForm.attributeListPrice = JSON.stringify(this.addGoodsForm.attributeListPrice)
this.addGoodsForm.attributeList = Object.fromEntries(this.addGoodsForm.attributeList1)
this.addGoodsForm.attributeList = JSON.stringify(this.addGoodsForm.attributeList)
this.addGoodsForm.productPictures = []
productEdit(this.addGoodsForm).then((res) => {
this.submitLoading = false;
if (res.success) {
this.$Message.success("操作成功");
this.getDataList();
// this.getDataList();
this.modalVisible = false;
}
});
@ -616,7 +1022,7 @@
if (res.success) {
this.clearSelectAll();
this.$Message.success("操作成功");
this.getDataList();
// this.getDataList();
}
});
},
@ -645,7 +1051,7 @@
if (res.success) {
this.$Message.success("操作成功");
this.clearSelectAll();
this.getDataList();
// this.getDataList();
}
});
},

81
src/views/app/shop/editDictType.vue

@ -1,55 +1,29 @@
<template>
<div>
<Modal
title="编辑字典"
v-model="visible"
:mask-closable="false"
:width="500"
>
<Modal title="编辑分类" v-model="visible" :mask-closable="false" :width="500">
<Form ref="form" :model="form" :label-width="85" :rules="formValidate">
<FormItem label="字典名称" prop="title">
<Input v-model="form.title" />
<FormItem label="分类名称" prop="title">
<Input v-model="form.categoryName" />
</FormItem>
<FormItem label="字典类型" prop="type" class="block-tool">
<Tooltip
placement="right"
:max-width="220"
transfer
content="建议设置为英文名且需唯一 非开发人员谨慎修改"
>
<Input v-model="form.type" />
</Tooltip>
</FormItem>
<FormItem label="备注" prop="description">
<Input v-model="form.description" />
</FormItem>
<FormItem label="排序值" prop="sortOrder">
<Tooltip
trigger="hover"
placement="right"
content="值越小越靠前,支持小数"
>
<InputNumber
:max="1000"
:min="0"
v-model="form.sortOrder"
></InputNumber>
<FormItem label="排序值" prop="sort">
<Tooltip trigger="hover" placement="right" content="值越小越靠前,支持小数">
<InputNumber :max="1000" :min="0" v-model="form.sort"></InputNumber>
</Tooltip>
</FormItem>
</Form>
<div slot="footer">
<Button type="text" @click="visible = false">取消</Button>
<Button type="primary" :loading="submitLoading" @click="submit"
>提交</Button
>
<Button type="primary" :loading="submitLoading" @click="submit">提交</Button>
</div>
</Modal>
</div>
</template>
<script>
import { editDict } from "@/api/index";
export default {
import {
editType
} from "@/api/app";
export default {
name: "addDictType",
components: {},
props: {
@ -63,37 +37,39 @@ export default {
},
data() {
return {
shopId:'',
visible: this.value,
submitLoading: false,
form: {
title: "",
type: "",
description: "",
sortOrder: 0,
categoryName: "",
sort: "",
shopId:''
},
formValidate: {
//
title: [{ required: true, message: "请输入", trigger: "blur" }],
type: [{ required: true, message: "请输入", trigger: "blur" }],
sortOrder: [
{
categoryName: [{
required: true,
message: "请输入",
trigger: "blur"
}],
sort: [{
required: true,
type: "number",
message: "请输入排序值",
trigger: "blur",
},
],
}, ],
},
};
},
methods: {
init() {},
init(v) {
this.form.shopId = v
},
submit() {
this.$refs.form.validate((valid) => {
if (valid) {
//
this.submitLoading = true;
editDict(this.form).then((res) => {
editType(this.form).then((res) => {
this.submitLoading = false;
if (res.success) {
this.$Message.success("操作成功");
@ -134,10 +110,9 @@ export default {
mounted() {
this.init();
},
};
};
</script>
<style lang="less">
@import "@/styles/drawer-common.less";
@import "@/styles/drawer-common.less";
</style>

6
src/views/app/shop/shop.vue

@ -675,9 +675,9 @@
},
goodsList(v){
this.Visiable = true;
// this.$nextTick(() => {
// this.$refs.dialog.initRecharge(v);
// });
this.$nextTick(() => {
this.$refs.goodsPage.init(v);
});
},
edit(v) {
// null""

312
src/views/sys/oss-manage/ossManage.vue

@ -1,7 +1,7 @@
<style lang="less">
@import "@/styles/tree&table-common.less";
@import "@/styles/table-common.less";
@import "./ossManage.less";
@import "@/styles/tree&table-common.less";
@import "@/styles/table-common.less";
@import "./ossManage.less";
</style>
<template>
<div class="search">
@ -9,50 +9,26 @@
<Row v-show="openSearch" @keydown.enter.native="handleSearch">
<Form ref="searchForm" :model="searchForm" inline :label-width="85">
<FormItem label="原文件名" prop="title">
<Input
type="text"
v-model="searchForm.title"
placeholder="请输入文件名"
clearable
style="width: 200px"
/>
<Input type="text" v-model="searchForm.title" placeholder="请输入文件名" clearable
style="width: 200px" />
</FormItem>
<FormItem label="上传者账号" prop="createBy">
<Input
type="text"
v-model="searchForm.createBy"
placeholder="请输入上传者登录账号"
clearable
style="width: 200px"
/>
<Input type="text" v-model="searchForm.createBy" placeholder="请输入上传者登录账号" clearable
style="width: 200px" />
</FormItem>
<span v-if="drop">
<FormItem label="存储文件名" prop="fKey">
<Input
type="text"
v-model="searchForm.fkey"
placeholder="请输入存储文件名"
clearable
style="width: 200px"
/>
<Input type="text" v-model="searchForm.fkey" placeholder="请输入存储文件名" clearable
style="width: 200px" />
</FormItem>
<FormItem label="创建时间">
<DatePicker
:options="options"
v-model="selectDate"
type="daterange"
format="yyyy-MM-dd"
clearable
@on-change="selectDateRange"
placeholder="选择起始时间"
style="width: 200px"
></DatePicker>
<DatePicker :options="options" v-model="selectDate" type="daterange" format="yyyy-MM-dd"
clearable @on-change="selectDateRange" placeholder="选择起始时间" style="width: 200px">
</DatePicker>
</FormItem>
</span>
<FormItem style="margin-left: -35px" class="br">
<Button @click="handleSearch" type="primary" icon="ios-search"
>搜索</Button
>
<Button @click="handleSearch" type="primary" icon="ios-search">搜索</Button>
<Button @click="handleReset">重置</Button>
<a class="drop-down" @click="dropDown">
{{ dropDownContent }}
@ -63,33 +39,18 @@
</Row>
<Row align="middle" justify="space-between" class="operation">
<div class="br">
<Button
@click="uploadVisible = true"
type="primary"
icon="md-cloud-upload"
>上传文件</Button
>
<Button @click="uploadVisible = true" type="primary" icon="md-cloud-upload">上传文件</Button>
<Dropdown @on-click="handleDropdown">
<Button>
更多操作
<Icon type="md-arrow-dropdown" />
</Button>
<DropdownMenu slot="list">
<DropdownItem v-show="showType == 'list'" name="removeAll"
>批量删除</DropdownItem
>
<DropdownItem v-show="showType == 'thumb'" name="title"
>原名称排序</DropdownItem
>
<DropdownItem v-show="showType == 'thumb'" name="size"
>文件大小排序</DropdownItem
>
<DropdownItem v-show="showType == 'thumb'" name="type"
>文件类型排序</DropdownItem
>
<DropdownItem v-show="showType == 'thumb'" name="time"
>创建时间排序</DropdownItem
>
<DropdownItem v-show="showType == 'list'" name="removeAll">批量删除</DropdownItem>
<DropdownItem v-show="showType == 'thumb'" name="title">原名称排序</DropdownItem>
<DropdownItem v-show="showType == 'thumb'" name="size">文件大小排序</DropdownItem>
<DropdownItem v-show="showType == 'thumb'" name="type">文件类型排序</DropdownItem>
<DropdownItem v-show="showType == 'thumb'" name="time">创建时间排序</DropdownItem>
<DropdownItem name="config">存储配置</DropdownItem>
</DropdownMenu>
</Dropdown>
@ -97,42 +58,15 @@
<div class="icons">
<Tooltip content="刷新" placement="top" transfer>
<Icon
type="md-refresh"
size="18"
class="item"
@click="getDataList"
/>
<Icon type="md-refresh" size="18" class="item" @click="getDataList" />
</Tooltip>
<Tooltip
:content="openSearch ? '关闭搜索' : '开启搜索'"
placement="top"
transfer
>
<Icon
type="ios-search"
size="18"
class="item tip"
@click="openSearch = !openSearch"
/>
<Tooltip :content="openSearch ? '关闭搜索' : '开启搜索'" placement="top" transfer>
<Icon type="ios-search" size="18" class="item tip" @click="openSearch = !openSearch" />
</Tooltip>
<Tooltip
:content="openTip ? '关闭提示' : '开启提示'"
placement="top"
transfer
>
<Icon
type="md-bulb"
size="18"
class="item tip"
@click="openTip = !openTip"
/>
<Tooltip :content="openTip ? '关闭提示' : '开启提示'" placement="top" transfer>
<Icon type="md-bulb" size="18" class="item tip" @click="openTip = !openTip" />
</Tooltip>
<Select
v-model="fileType"
style="width: 150px; margin: 0 25px 0 15px"
@on-change="changeFileType"
>
<Select v-model="fileType" style="width: 150px; margin: 0 25px 0 15px" @on-change="changeFileType">
<Option value="all">所有文件</Option>
<Option value="word">Word</Option>
<Option value="excel">Excel</Option>
@ -145,11 +79,7 @@
<Option value="zip">ZIP</Option>
<Option value="rar">RAR</Option>
</Select>
<RadioGroup
v-model="showType"
type="button"
@on-change="changeShowType"
>
<RadioGroup v-model="showType" type="button" @on-change="changeShowType">
<Radio title="列表" label="list">
<Icon type="md-list"></Icon>
</Radio>
@ -165,36 +95,18 @@
已选择
<span class="select-count">{{ selectList.length }}</span>
<a class="select-clear" @click="clearSelectAll">清空</a>
<span v-if="selectList.length > 0" style="margin-left: 15px"
>共计 {{ totalSize }} 存储量</span
>
<span v-if="selectList.length > 0" style="margin-left: 15px">共计 {{ totalSize }} 存储量</span>
</Alert>
<Table
:loading="loading"
border
:columns="columns"
:data="data"
ref="table"
sortable="custom"
@on-sort-change="changeSort"
@on-selection-change="changeSelect"
></Table>
<Table :loading="loading" border :columns="columns" :data="data" ref="table" sortable="custom"
@on-sort-change="changeSort" @on-selection-change="changeSelect"></Table>
</div>
<Row type="flex" :gutter="30" v-show="showType == 'thumb'">
<Col :lg="6" :md="12" :xs="12" v-for="(item, i) in data" :key="i">
<Card class="oss-card">
<div class="content">
<img
@click="showPic(item)"
v-if="item.type.indexOf('image') >= 0"
class="img"
:src="item.url"
/>
<div
v-else-if="item.type.indexOf('video') >= 0"
class="video"
@click="showVideo(item)"
>
<img @click="showPic(item)" v-if="item.type.indexOf('image') >= 0" class="img"
:src="item.url" />
<div v-else-if="item.type.indexOf('video') >= 0" class="video" @click="showVideo(item)">
<video class="cover">
<source :src="item.url + '#t=1'" preload="metadata" />
</video>
@ -213,11 +125,7 @@
<div class="actions">
<div class="btn">
<Tooltip content="下载" placement="top">
<Icon
@click="download(item)"
type="md-download"
size="16"
/>
<Icon @click="download(item)" type="md-download" size="16" />
</Tooltip>
</div>
<div class="btn">
@ -241,34 +149,16 @@
</Col>
</Row>
<Row type="flex" justify="end" class="page">
<Page
:current="searchForm.pageNumber"
:total="total"
:page-size="searchForm.pageSize"
@on-change="changePage"
@on-page-size-change="changePageSize"
:page-size-opts="pageSizeOpts"
size="small"
show-total
show-elevator
show-sizer
></Page>
<Page :current="searchForm.pageNumber" :total="total" :page-size="searchForm.pageSize"
@on-change="changePage" @on-page-size-change="changePageSize" :page-size-opts="pageSizeOpts"
size="small" show-total show-elevator show-sizer></Page>
</Row>
</Card>
<Drawer title="文件上传" closable v-model="uploadVisible" width="500">
<Upload
:action="uploadFileUrl"
:headers="accessToken"
:on-success="handleSuccess"
:on-error="handleError"
:max-size="5120"
:on-exceeded-size="handleMaxSize"
:before-upload="beforeUpload"
multiple
type="drag"
ref="up"
>
<Upload :action="uploadFileUrl" :headers="accessToken" :on-success="handleSuccess" :on-error="handleError"
:max-size="5120" :on-exceeded-size="handleMaxSize" :before-upload="beforeUpload" multiple type="drag"
ref="up">
<div style="padding: 20px 0">
<Icon type="ios-cloud-upload" size="52" style="color: #3399ff"></Icon>
<p>点击这里或将文件拖拽到这里上传</p>
@ -279,12 +169,7 @@
</div>
</Drawer>
<Modal
:title="modalTitle"
v-model="modalVisible"
:mask-closable="false"
:width="500"
>
<Modal :title="modalTitle" v-model="modalVisible" :mask-closable="false" :width="500">
<Form ref="form" :model="form" :label-width="95" :rules="formValidate">
<FormItem label="原文件名" prop="title">
<Input v-model="form.title" />
@ -295,46 +180,38 @@
</Form>
<div slot="footer">
<Button type="text" @click="handleCancel">取消</Button>
<Button type="primary" :loading="submitLoading" @click="handleSubmit"
>提交</Button
>
<Button type="primary" :loading="submitLoading" @click="handleSubmit">提交</Button>
</div>
</Modal>
<Modal
v-model="videoVisible"
:title="videoTitle"
:width="800"
@on-cancel="closeVideo"
draggable
>
<Modal v-model="videoVisible" :title="videoTitle" :width="800" @on-cancel="closeVideo" draggable>
<div id="dplayer" style="height: 500px"></div>
<div slot="footer">
<span
>文件类型{{ util.ellipsis(file.type, 30) }} 文件大小{{
<span>文件类型{{ util.ellipsis(file.type, 30) }} 文件大小{{
file.msize
}}
创建时间{{ file.createTime }}</span
>
创建时间{{ file.createTime }}</span>
</div>
</Modal>
</div>
</template>
<script>
import {
import {
uploadFile,
checkOssSet,
getFileListData,
copyFile,
renameFile,
deleteFile,
} from "@/api/index";
import DPlayer from "dplayer";
import "viewerjs/dist/viewer.css";
import Viewer from "viewerjs";
import { shortcuts } from "@/libs/shortcuts";
export default {
} from "@/api/index";
import DPlayer from "dplayer";
import "viewerjs/dist/viewer.css";
import Viewer from "viewerjs";
import {
shortcuts
} from "@/libs/shortcuts";
export default {
name: "oss-manage",
components: {},
data() {
@ -380,8 +257,16 @@ export default {
file: {},
//
formValidate: {
title: [{ required: true, message: "请输入", trigger: "blur" }],
fkey: [{ required: true, message: "请输入", trigger: "blur" }],
title: [{
required: true,
message: "请输入",
trigger: "blur"
}],
fkey: [{
required: true,
message: "请输入",
trigger: "blur"
}],
},
submitLoading: false, //
selectList: [], //
@ -436,8 +321,7 @@ export default {
});
} else if (params.row.type.includes("video") > 0) {
return h(
"video",
{
"video", {
style: {
cursor: "pointer",
width: "80px",
@ -664,8 +548,7 @@ export default {
}
return h("div", [
h(
"Tag",
{
"Tag", {
props: {
color: color,
},
@ -691,8 +574,7 @@ export default {
render: (h, params) => {
return h("div", [
h(
"a",
{
"a", {
on: {
click: () => {
this.download(params.row);
@ -707,9 +589,10 @@ export default {
},
}),
h(
"Dropdown",
{
props: { transfer: true },
"Dropdown", {
props: {
transfer: true
},
on: {
"on-click": (v) => {
this.changeDropDown(params.row, v);
@ -725,11 +608,29 @@ export default {
},
}),
]),
h("DropdownMenu", { slot: "list" }, [
h("DropdownItem", { props: { name: "share" } }, "文件链接"),
h("DropdownItem", { props: { name: "rename" } }, "重命名"),
h("DropdownItem", { props: { name: "copy" } }, "复制"),
h("DropdownItem", { props: { name: "remove" } }, "删除"),
h("DropdownMenu", {
slot: "list"
}, [
h("DropdownItem", {
props: {
name: "share"
}
}, "文件链接"),
h("DropdownItem", {
props: {
name: "rename"
}
}, "重命名"),
h("DropdownItem", {
props: {
name: "copy"
}
}, "复制"),
h("DropdownItem", {
props: {
name: "remove"
}
}, "删除"),
]),
]
),
@ -761,7 +662,9 @@ export default {
} else if (name == "config") {
this.$router.push({
name: "setting",
query: { name: "oss" },
query: {
name: "oss"
},
});
}
},
@ -777,7 +680,9 @@ export default {
onOk: () => {
this.$router.push({
name: "setting",
query: { name: "oss" },
query: {
name: "oss"
},
});
},
});
@ -790,7 +695,7 @@ export default {
let image = new Image();
image.src = v.url;
let viewer = new Viewer(image, {
hidden: function () {
hidden: function() {
viewer.destroy();
},
});
@ -1002,7 +907,10 @@ export default {
content: "您确认要复制文件 " + v.title + " ?",
loading: true,
onOk: () => {
copyFile({ id: v.id, key: v.fkey }).then((res) => {
copyFile({
id: v.id,
key: v.fkey
}).then((res) => {
this.$Modal.remove();
if (res.success) {
this.$Message.success("复制文件成功,新文件名为 副本_" + v.title);
@ -1023,11 +931,13 @@ export default {
loading: true,
onOk: () => {
let ids = "";
this.selectList.forEach(function (e) {
this.selectList.forEach(function(e) {
ids += e.id + ",";
});
ids = ids.substring(0, ids.length - 1);
deleteFile({ ids: ids }).then((res) => {
deleteFile({
ids: ids
}).then((res) => {
this.$Modal.remove();
if (res.success) {
this.$Message.success("批量删除文件成功");
@ -1044,7 +954,9 @@ export default {
content: "您确认要删除文件 " + v.title + " ?",
loading: true,
onOk: () => {
deleteFile({ ids: v.id }).then((res) => {
deleteFile({
ids: v.id
}).then((res) => {
this.$Modal.remove();
if (res.success) {
this.clearSelectAll();
@ -1104,5 +1016,5 @@ export default {
mounted() {
this.init();
},
};
};
</script>
Loading…
Cancel
Save