|
@@ -1,37 +1,59 @@
|
|
|
<template>
|
|
|
<div>
|
|
|
- <el-button size="small" :type="disabled?'':'primary'" @click="editBtn(dialogFormVisible = true)" :disabled="disabled">编 辑</el-button>
|
|
|
+ <el-button
|
|
|
+ size="small"
|
|
|
+ :type="disabled ? '' : 'primary'"
|
|
|
+ @click="editBtn((dialogFormVisible = true))"
|
|
|
+ :disabled="disabled"
|
|
|
+ >编 辑</el-button
|
|
|
+ >
|
|
|
<el-drawer
|
|
|
- title="编辑案例"
|
|
|
- :visible.sync="dialogFormVisible"
|
|
|
- size="70%"
|
|
|
- direction="rtl"
|
|
|
- append-to-body
|
|
|
- :show-close="false"
|
|
|
- @close="onCancel">
|
|
|
- <div class="drawer__panel" >
|
|
|
+ title="编辑案例"
|
|
|
+ :visible.sync="dialogFormVisible"
|
|
|
+ size="70%"
|
|
|
+ direction="rtl"
|
|
|
+ append-to-body
|
|
|
+ :show-close="false"
|
|
|
+ @close="onCancel"
|
|
|
+ >
|
|
|
+ <div class="drawer__panel">
|
|
|
<el-row :gutter="10">
|
|
|
- <el-form :model="form" :rules="rules" ref="form" size="mini" label-position="top">
|
|
|
+ <el-form
|
|
|
+ :model="form"
|
|
|
+ :rules="rules"
|
|
|
+ ref="form"
|
|
|
+ size="mini"
|
|
|
+ label-position="top"
|
|
|
+ >
|
|
|
<el-col :span="24">
|
|
|
<el-form-item label="标题" prop="title">
|
|
|
- <el-input v-model="form.title" placeholder="请输入标题"></el-input>
|
|
|
+ <el-input
|
|
|
+ v-model="form.title"
|
|
|
+ placeholder="请输入标题"
|
|
|
+ ></el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="24">
|
|
|
<el-form-item label="分类" prop="sat_notice_classid">
|
|
|
- <el-select v-model="form.sat_sharematerial_classid" clearable placeholder="请选择分类" style="width: 100%">
|
|
|
+ <el-select
|
|
|
+ v-model="form.sat_sharematerial_classid"
|
|
|
+ clearable
|
|
|
+ placeholder="请选择分类"
|
|
|
+ style="width: 100%"
|
|
|
+ >
|
|
|
<el-option
|
|
|
- v-for="item in classData"
|
|
|
- :key="item.sat_sharematerial_classid"
|
|
|
- :label="item.classname"
|
|
|
- :value="item.sat_sharematerial_classid">
|
|
|
+ v-for="item in classData"
|
|
|
+ :key="item.sat_sharematerial_classid"
|
|
|
+ :label="item.classname"
|
|
|
+ :value="item.sat_sharematerial_classid"
|
|
|
+ >
|
|
|
</el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="6">
|
|
|
<el-form-item label="状态" prop="status">
|
|
|
- <el-radio-group v-model="form.status" >
|
|
|
+ <el-radio-group v-model="form.status">
|
|
|
<el-radio label="新建">新建</el-radio>
|
|
|
<el-radio label="发布">发布</el-radio>
|
|
|
</el-radio-group>
|
|
@@ -39,278 +61,333 @@
|
|
|
</el-col>
|
|
|
<el-col :span="6">
|
|
|
<el-form-item label="排序" prop="sequence">
|
|
|
- <el-input v-model="form.sequence" placeholder="请输入排序"></el-input>
|
|
|
+ <el-input
|
|
|
+ v-model="form.sequence"
|
|
|
+ placeholder="请输入排序"
|
|
|
+ ></el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="24">
|
|
|
<el-form-item label="封面" prop="cover">
|
|
|
- <previewImage v-if="form.cover" style="width:256px" :image="form.image" :deletebtn="true"
|
|
|
- @onSuccess="clearCover"></previewImage>
|
|
|
- <upload v-else btntype="image" :folderid="folderid" accept=".JPG,.PNG,.jpg,.png"
|
|
|
- :bindData="{ ownertable: 'sat_sharematerial', ownerid: form.sat_sharematerialid, usetype: 'cover' }"
|
|
|
- @onSuccess="onCoverSubmit"></upload>
|
|
|
- <p class="info">注:建议上传图片大小130x80像素,大小不超过2M,格式为JPG/PNG/jpg/png</p>
|
|
|
+ <previewImage
|
|
|
+ v-if="form.cover"
|
|
|
+ style="width: 256px"
|
|
|
+ :image="form.image"
|
|
|
+ :deletebtn="true"
|
|
|
+ @onSuccess="clearCover"
|
|
|
+ ></previewImage>
|
|
|
+ <upload
|
|
|
+ v-else
|
|
|
+ btntype="image"
|
|
|
+ :folderid="folderid"
|
|
|
+ accept=".JPG,.PNG,.jpg,.png"
|
|
|
+ :bindData="{
|
|
|
+ ownertable: 'sat_sharematerial',
|
|
|
+ ownerid: form.sat_sharematerialid,
|
|
|
+ usetype: 'cover',
|
|
|
+ }"
|
|
|
+ @onSuccess="onCoverSubmit"
|
|
|
+ ></upload>
|
|
|
+ <p class="info">
|
|
|
+ 注:建议上传图片大小130x80像素,大小不超过2M,格式为JPG/PNG/jpg/png
|
|
|
+ </p>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
</el-form>
|
|
|
</el-row>
|
|
|
<div>
|
|
|
- <div style="font-size: 16px;font-weight: bold;margin-bottom: 10px">关联产品</div>
|
|
|
- <addProduct ref="addProductRef" :sat_sharematerialid="form.sat_sharematerialid" style="margin-bottom: 10px" @selectData="selectData"></addProduct>
|
|
|
- <tableNewLayout ref="tableRef" :checkbox="false" :custom="true" :data="list" :layout="tablecols"
|
|
|
- :opwidth="200" :width="true" height="300px">
|
|
|
+ <div style="font-size: 16px; font-weight: bold; margin-bottom: 10px">
|
|
|
+ 关联产品
|
|
|
+ </div>
|
|
|
+ <addProduct
|
|
|
+ ref="addProductRef"
|
|
|
+ :sat_sharematerialid="form.sat_sharematerialid"
|
|
|
+ style="margin-bottom: 10px"
|
|
|
+ @selectData="selectData"
|
|
|
+ ></addProduct>
|
|
|
+ <tableNewLayout
|
|
|
+ ref="tableRef"
|
|
|
+ :checkbox="false"
|
|
|
+ :custom="true"
|
|
|
+ :data="list"
|
|
|
+ :layout="tablecols"
|
|
|
+ :opwidth="200"
|
|
|
+ :width="true"
|
|
|
+ height="300px"
|
|
|
+ >
|
|
|
<template v-slot:customcol="scope">
|
|
|
<div v-if="scope.column.columnname === 'itemclassfullname'">
|
|
|
- {{scope.column.data.itemclass?scope.column.data.itemclass.length>0?scope.column.data.itemclass[0].itemclassfullname:'':''}}
|
|
|
+ {{
|
|
|
+ scope.column.data.itemclass
|
|
|
+ ? scope.column.data.itemclass.length > 0
|
|
|
+ ? scope.column.data.itemclass[0].itemclassfullname
|
|
|
+ : ""
|
|
|
+ : ""
|
|
|
+ }}
|
|
|
</div>
|
|
|
- <p v-else>{{scope.column.data[scope.column.columnname]}}</p>
|
|
|
+ <p v-else>{{ scope.column.data[scope.column.columnname] }}</p>
|
|
|
</template>
|
|
|
<template v-slot:opreation="scope">
|
|
|
- <el-button type="text" @click="delClick(scope.data)">删除</el-button>
|
|
|
+ <el-button type="text" @click="delClick(scope.data)"
|
|
|
+ >删除</el-button
|
|
|
+ >
|
|
|
</template>
|
|
|
</tableNewLayout>
|
|
|
- <div class="container normal-panel" style="text-align:right">
|
|
|
+ <div class="container normal-panel" style="text-align: right">
|
|
|
<el-pagination
|
|
|
- background
|
|
|
- @size-change="handleSizeChange"
|
|
|
- @current-change="handleCurrentChange"
|
|
|
- :current-page="currentPage"
|
|
|
- :page-sizes="[20, 50, 100, 200]"
|
|
|
- :page-size="20"
|
|
|
- layout="total,sizes, prev, pager, next, jumper"
|
|
|
- :total="total">
|
|
|
+ background
|
|
|
+ @size-change="handleSizeChange"
|
|
|
+ @current-change="handleCurrentChange"
|
|
|
+ :current-page="currentPage"
|
|
|
+ :page-sizes="[20, 50, 100, 200]"
|
|
|
+ :page-size="20"
|
|
|
+ layout="total,sizes, prev, pager, next, jumper"
|
|
|
+ :total="total"
|
|
|
+ >
|
|
|
</el-pagination>
|
|
|
</div>
|
|
|
- <p style="font-size: 14px;margin-top: 10px">内容</p>
|
|
|
+ <p style="font-size: 14px; margin-top: 10px">内容</p>
|
|
|
<div style="margin-top: 10px">
|
|
|
- <myEditor ref="editor" :content="form.content" :id="form.sat_sharematerialid"></myEditor>
|
|
|
+ <myEditor
|
|
|
+ ref="editor"
|
|
|
+ :content="form.content"
|
|
|
+ :id="form.sat_sharematerialid"
|
|
|
+ ></myEditor>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="fixed__btn__panel">
|
|
|
- <el-button size="small" type="primary" @click="onCancel" plain class="normal-btn-width" >取 消</el-button>
|
|
|
- <el-button size="small" @click="onSubmit" class="normal-btn-width">确 定</el-button>
|
|
|
+ <el-button
|
|
|
+ size="small"
|
|
|
+ type="primary"
|
|
|
+ @click="onCancel"
|
|
|
+ plain
|
|
|
+ class="normal-btn-width"
|
|
|
+ >取 消</el-button
|
|
|
+ >
|
|
|
+ <el-button size="small" @click="onSubmit" class="normal-btn-width"
|
|
|
+ >确 定</el-button
|
|
|
+ >
|
|
|
</div>
|
|
|
</el-drawer>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import upload from '@/components/upload/hw_obs_upload.vue'
|
|
|
-import previewImage from '@/components/previewImage/index.vue'
|
|
|
-import myEditor from '@/components/my-editor/Editor.vue'
|
|
|
-import tableNewLayout from '@/components/dynamic-newTable/index2'
|
|
|
-import addProduct from '@/WebsiteManagement/caseManage/modules/addProduct'
|
|
|
+import upload from "@/components/upload/hw_obs_upload.vue";
|
|
|
+import previewImage from "@/components/previewImage/index.vue";
|
|
|
+import myEditor from "@/components/my-editor/Editor.vue";
|
|
|
+import tableNewLayout from "@/components/dynamic-newTable/index2";
|
|
|
+import addProduct from "@/WebsiteManagement/caseManage/modules/addProduct";
|
|
|
export default {
|
|
|
name: "edit",
|
|
|
- components:{upload,previewImage,myEditor,tableNewLayout,addProduct},
|
|
|
- props:['sat_sharematerialid','disabled'],
|
|
|
- data(){
|
|
|
+ components: { upload, previewImage, myEditor, tableNewLayout, addProduct },
|
|
|
+ props: ["sat_sharematerialid", "disabled"],
|
|
|
+ data() {
|
|
|
return {
|
|
|
- dialogFormVisible:false,
|
|
|
- tablecols:[],
|
|
|
- list:[],
|
|
|
- currentPage:0,
|
|
|
- total:0,
|
|
|
- form:{
|
|
|
- "title": "",
|
|
|
- "notes": "",
|
|
|
- "content": "",
|
|
|
- "sat_sharematerialid":0,
|
|
|
- "status":"新建",
|
|
|
- "sequence":'',
|
|
|
- "image":'',
|
|
|
- "cover":''
|
|
|
+ dialogFormVisible: false,
|
|
|
+ tablecols: [],
|
|
|
+ list: [],
|
|
|
+ currentPage: 0,
|
|
|
+ total: 0,
|
|
|
+ form: {
|
|
|
+ title: "",
|
|
|
+ notes: "",
|
|
|
+ content: "",
|
|
|
+ sat_sharematerialid: 0,
|
|
|
+ status: "新建",
|
|
|
+ sequence: "",
|
|
|
+ image: "",
|
|
|
+ cover: "",
|
|
|
},
|
|
|
- rules:{
|
|
|
- title: [
|
|
|
- { required: true, message: '请输入标题名称', trigger: 'blur' },
|
|
|
- ],
|
|
|
- cover: [
|
|
|
- { required: true, message: '请上传封面', trigger: 'change' }
|
|
|
- ],
|
|
|
+ rules: {
|
|
|
+ title: [{ required: true, message: "请输入标题名称", trigger: "blur" }],
|
|
|
+ cover: [{ required: true, message: "请上传封面", trigger: "change" }],
|
|
|
},
|
|
|
- folderid: JSON.parse(sessionStorage.getItem('folderid')).appfolderid,
|
|
|
- attinfo_attachment:[],
|
|
|
- productParam:{
|
|
|
- "id": "20240801134003",
|
|
|
- "content": {
|
|
|
- "sat_sharematerialid": '',
|
|
|
- "pageNumber":1,
|
|
|
- "pageSize":20,
|
|
|
- "where": {
|
|
|
- "condition": ""
|
|
|
- }
|
|
|
-
|
|
|
- }
|
|
|
+ folderid: JSON.parse(sessionStorage.getItem("folderid")).appfolderid,
|
|
|
+ attinfo_attachment: [],
|
|
|
+ productParam: {
|
|
|
+ id: "20240801134003",
|
|
|
+ content: {
|
|
|
+ sat_sharematerialid: "",
|
|
|
+ pageNumber: 1,
|
|
|
+ pageSize: 20,
|
|
|
+ where: {
|
|
|
+ condition: "",
|
|
|
+ },
|
|
|
+ },
|
|
|
},
|
|
|
- classData:[]
|
|
|
- }
|
|
|
+ classData: [],
|
|
|
+ };
|
|
|
},
|
|
|
- methods:{
|
|
|
- editBtn(){
|
|
|
- this.detailInfo()
|
|
|
- this.classList()
|
|
|
+ methods: {
|
|
|
+ editBtn() {
|
|
|
+ this.detailInfo();
|
|
|
+ this.classList();
|
|
|
},
|
|
|
- async detailInfo(){
|
|
|
+ async detailInfo() {
|
|
|
const res = await this.$api.requested({
|
|
|
- "id":20240801133703,
|
|
|
- "content": {
|
|
|
- "sat_sharematerialid":this.sat_sharematerialid
|
|
|
- }
|
|
|
- })
|
|
|
- if (res.code == 0){
|
|
|
- this.tool.showMessage(res,()=>{})
|
|
|
- }else {
|
|
|
- this.form = Object.assign({},this.form,res.data)
|
|
|
- this.$refs.editor.html = res.data.content
|
|
|
- this.queryFileLink()
|
|
|
- this.productParam.content.sat_sharematerialid = res.data.sat_sharematerialid
|
|
|
- this.productData(this.productParam.content.pageNumber = 1)
|
|
|
+ id: 20240801133703,
|
|
|
+ content: {
|
|
|
+ sat_sharematerialid: this.sat_sharematerialid,
|
|
|
+ },
|
|
|
+ });
|
|
|
+ if (res.code == 0) {
|
|
|
+ this.tool.showMessage(res, () => {});
|
|
|
+ } else {
|
|
|
+ this.form = Object.assign({}, this.form, res.data);
|
|
|
+ this.$refs.editor.html = res.data.content;
|
|
|
+ this.queryFileLink();
|
|
|
+ this.productParam.content.sat_sharematerialid =
|
|
|
+ res.data.sat_sharematerialid;
|
|
|
+ this.productData((this.productParam.content.pageNumber = 1));
|
|
|
}
|
|
|
},
|
|
|
/*获取分类*/
|
|
|
- async classList(){
|
|
|
+ async classList() {
|
|
|
let param = {
|
|
|
- "id": "20240808105003",
|
|
|
- "content": {
|
|
|
- "where":{
|
|
|
- "condition":""
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- const res = await this.$api.requested(param)
|
|
|
- this.classData = res.data
|
|
|
+ id: "20240808105003",
|
|
|
+ content: {
|
|
|
+ where: {
|
|
|
+ condition: "",
|
|
|
+ },
|
|
|
+ },
|
|
|
+ };
|
|
|
+ const res = await this.$api.requested(param);
|
|
|
+ this.classData = res.data;
|
|
|
},
|
|
|
// 获取封面信息
|
|
|
async queryFileLink() {
|
|
|
- this.dialogEditVisible = true
|
|
|
+ this.dialogEditVisible = true;
|
|
|
const res = await this.$api.requested({
|
|
|
- "classname": "system.attachment.Attachment",
|
|
|
- "method": "queryFileLink",
|
|
|
- "content": {
|
|
|
- "ownertable": 'sat_sharematerial',
|
|
|
- "ownerid": this.form.sat_sharematerialid,
|
|
|
- "usetype": 'cover'//传空返回有所
|
|
|
- }
|
|
|
- })
|
|
|
- this.form.image = res.data[0]
|
|
|
- this.form.cover = res.data[0].url
|
|
|
+ classname: "system.attachment.Attachment",
|
|
|
+ method: "queryFileLink",
|
|
|
+ content: {
|
|
|
+ ownertable: "sat_sharematerial",
|
|
|
+ ownerid: this.form.sat_sharematerialid,
|
|
|
+ usetype: "cover", //传空返回有所
|
|
|
+ },
|
|
|
+ });
|
|
|
+ this.form.image = res.data[0];
|
|
|
+ this.form.cover = res.data[0].url;
|
|
|
/*res.data[0] ? this.image = res.data[0].url : this.image = { url: '' }*/
|
|
|
},
|
|
|
- onSubmit(){
|
|
|
- this.$refs.form.validate(async (valid)=>{
|
|
|
- if (!valid) return false
|
|
|
- this.form.content = this.$refs.editor.html
|
|
|
+ onSubmit() {
|
|
|
+ this.$refs.form.validate(async (valid) => {
|
|
|
+ if (!valid) return false;
|
|
|
+ this.form.content = this.$refs.editor.html;
|
|
|
const res = await this.$api.requested({
|
|
|
- "id": "20240801133403",
|
|
|
- "content": this.form
|
|
|
- })
|
|
|
- this.tool.showMessage(res,()=>{
|
|
|
- this.dialogFormVisible = false
|
|
|
- this.$refs.form.resetFields()
|
|
|
- this.$refs.editor.html = ''
|
|
|
- this.form.image = ''
|
|
|
- this.form.cover = ''
|
|
|
- this.form.sat_sharematerialid = 0
|
|
|
- this.$emit('editSuccess')
|
|
|
- })
|
|
|
- })
|
|
|
+ id: "20240801133403",
|
|
|
+ content: this.form,
|
|
|
+ });
|
|
|
+ this.tool.showMessage(res, () => {
|
|
|
+ this.dialogFormVisible = false;
|
|
|
+ this.$refs.form.resetFields();
|
|
|
+ this.$refs.editor.html = "";
|
|
|
+ this.form.image = "";
|
|
|
+ this.form.cover = "";
|
|
|
+ this.form.sat_sharematerialid = 0;
|
|
|
+ this.$emit("editSuccess");
|
|
|
+ });
|
|
|
+ });
|
|
|
},
|
|
|
- async onCancel(){
|
|
|
- this.dialogFormVisible = false
|
|
|
- this.$refs.form.resetFields()
|
|
|
- this.$refs.editor.html = ''
|
|
|
- this.form.image = ''
|
|
|
- this.form.cover = ''
|
|
|
- this.form.sat_sharematerialid = 0
|
|
|
- this.$emit('editSuccess')
|
|
|
+ async onCancel() {
|
|
|
+ this.dialogFormVisible = false;
|
|
|
+ this.$refs.form.resetFields();
|
|
|
+ this.$refs.editor.html = "";
|
|
|
+ this.form.image = "";
|
|
|
+ this.form.cover = "";
|
|
|
+ this.form.sat_sharematerialid = 0;
|
|
|
+ this.$emit("editSuccess");
|
|
|
},
|
|
|
clearCover() {
|
|
|
- this.form.cover = null
|
|
|
- this.image = {}
|
|
|
+ this.form.cover = null;
|
|
|
+ this.image = {};
|
|
|
},
|
|
|
- async productData(){
|
|
|
- const res = await this.$api.requested(this.productParam)
|
|
|
- this.list = res.data
|
|
|
- this.total = res.total
|
|
|
- this.currentPage = res.pageNumber
|
|
|
+ async productData() {
|
|
|
+ const res = await this.$api.requested(this.productParam);
|
|
|
+ this.list = res.data;
|
|
|
+ this.total = res.total;
|
|
|
+ this.currentPage = res.pageNumber;
|
|
|
},
|
|
|
async onCoverSubmit(data) {
|
|
|
const res = await this.$api.requested({
|
|
|
- "classname": "system.attachment.Attachment",
|
|
|
- "method": "queryFileLink",
|
|
|
- "content": {
|
|
|
- "ownertable": 'sat_sharematerial',
|
|
|
- "ownerid": this.form.sat_sharematerialid,
|
|
|
- "usetype": 'cover'//传空返回有所
|
|
|
- }
|
|
|
- })
|
|
|
- this.form.cover = res.data[0].url
|
|
|
- this.form.image = res.data[0]
|
|
|
+ classname: "system.attachment.Attachment",
|
|
|
+ method: "queryFileLink",
|
|
|
+ content: {
|
|
|
+ ownertable: "sat_sharematerial",
|
|
|
+ ownerid: this.form.sat_sharematerialid,
|
|
|
+ usetype: "cover", //传空返回有所
|
|
|
+ },
|
|
|
+ });
|
|
|
+ this.form.cover = res.data[0].url;
|
|
|
+ this.form.image = res.data[0];
|
|
|
},
|
|
|
- async selectData(data){
|
|
|
+ async selectData(data) {
|
|
|
const res = await this.$api.requested({
|
|
|
- "id": "20240801133803",
|
|
|
- "content": {
|
|
|
- "sat_sharematerialid": this.form.sat_sharematerialid,
|
|
|
- "iteminfos":[
|
|
|
+ id: "20240801133803",
|
|
|
+ content: {
|
|
|
+ sat_sharematerialid: this.form.sat_sharematerialid,
|
|
|
+ iteminfos: [
|
|
|
{
|
|
|
- "sat_sharematerial_itemsid": 0,
|
|
|
- "itemid": data.itemid
|
|
|
- }
|
|
|
- ]
|
|
|
-
|
|
|
- }
|
|
|
- })
|
|
|
- this.$nextTick(()=>{
|
|
|
- this.productParam.content.sat_sharematerialid = this.form.sat_sharematerialid
|
|
|
- this.productData(this.productParam.content.pageNumber = 1)
|
|
|
- this.$refs.addProductRef.listData()
|
|
|
- })
|
|
|
+ sat_sharematerial_itemsid: 0,
|
|
|
+ itemid: data.itemid,
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ },
|
|
|
+ });
|
|
|
+ this.$nextTick(() => {
|
|
|
+ this.productParam.content.sat_sharematerialid =
|
|
|
+ this.form.sat_sharematerialid;
|
|
|
+ this.productData((this.productParam.content.pageNumber = 1));
|
|
|
+ this.$refs.addProductRef.listData();
|
|
|
+ });
|
|
|
},
|
|
|
handleSizeChange(val) {
|
|
|
// console.log(`每页 ${val} 条`);
|
|
|
- this.productParam.content.pageSize = val
|
|
|
- this.productData()
|
|
|
+ this.productParam.content.pageSize = val;
|
|
|
+ this.productData();
|
|
|
},
|
|
|
handleCurrentChange(val) {
|
|
|
// console.log(`当前页: ${val}`);
|
|
|
- this.productParam.content.pageNumber = val
|
|
|
- this.productData()
|
|
|
+ this.productParam.content.pageNumber = val;
|
|
|
+ this.productData();
|
|
|
},
|
|
|
- delClick(data){
|
|
|
- this.$confirm('确定删除该商品吗?', '提示', {
|
|
|
- confirmButtonText: '确定',
|
|
|
- cancelButtonText: '取消',
|
|
|
- type: 'warning'
|
|
|
- }).then( () => {
|
|
|
- this.delSuccess(data)
|
|
|
- }).catch(() => {
|
|
|
- this.$message({
|
|
|
- type: 'info',
|
|
|
- message: '已取消删除'
|
|
|
+ delClick(data) {
|
|
|
+ this.$confirm("确定删除该商品吗?", "提示", {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning",
|
|
|
+ })
|
|
|
+ .then(() => {
|
|
|
+ this.delSuccess(data);
|
|
|
+ })
|
|
|
+ .catch(() => {
|
|
|
+ this.$message({
|
|
|
+ type: "info",
|
|
|
+ message: "已取消删除",
|
|
|
+ });
|
|
|
});
|
|
|
- });
|
|
|
},
|
|
|
- async delSuccess(data){
|
|
|
+ async delSuccess(data) {
|
|
|
const res = await this.$api.requested({
|
|
|
- "id":20240801133903,
|
|
|
- "content": {
|
|
|
- "sat_sharematerial_itemsid":data.sat_sharematerial_itemsid
|
|
|
- }
|
|
|
- })
|
|
|
- this.tool.showMessage(res,()=>{
|
|
|
- this.productData()
|
|
|
- })
|
|
|
- }
|
|
|
+ id: 20240801133903,
|
|
|
+ content: {
|
|
|
+ sat_sharematerial_itemsid: data.sat_sharematerial_itemsid,
|
|
|
+ },
|
|
|
+ });
|
|
|
+ this.tool.showMessage(res, () => {
|
|
|
+ this.productData();
|
|
|
+ });
|
|
|
+ },
|
|
|
},
|
|
|
created() {
|
|
|
- this.tablecols = this.tool.tabelCol(this.$route.name).productTable.tablecols
|
|
|
- }
|
|
|
-}
|
|
|
+ this.tablecols = this.tool.tabelCol(
|
|
|
+ this.$route.name
|
|
|
+ ).productTable.tablecols;
|
|
|
+ },
|
|
|
+};
|
|
|
</script>
|
|
|
|
|
|
<style scoped>
|
|
|
-
|
|
|
</style>
|