Commit 56885645 by 无尘

fix:修改素材

parent a9c4675d
<!DOCTYPE html><html><head><meta charset=utf-8><link rel="shortcut icon" href=./favicon.ico><title>好办管理平台</title><link rel=stylesheet type=text/css href=//web-1251519181.file.myqcloud.com/custom-element/custom-element.1.0.28.css><link href=./static/css/app.705a19e3da9dfe5f5cf3311e95eb9190.css rel=stylesheet></head><body style="min-width: 1400px;" class=damolish><div id=app></div><script src=//web-1251519181.file.myqcloud.com/lib/vue/2.6.6/vue.min.js></script><script src=//web-1251519181.file.myqcloud.com/lib/vue-router/3.0.2/vue-router.min.js></script><script src=//web-1251519181.file.myqcloud.com/lib/vuex/3.1.0/vuex.min.js></script><script src=//web-1251519181.file.myqcloud.com/components/img-preview.2.0.00.js></script><script src=//web-1251519181.file.myqcloud.com/components/footer.2.0.04.js></script><script>// Raven.config('https://3715a345910d4c768e7a1ec14619c2d5@sentry.io/1413672').install();</script><script type=text/javascript src=./static/js/manifest.6923bd20ae98c4929e8b.js></script><script type=text/javascript src=./static/js/vendor.ec5b5af1da21f97836b5.js></script><script type=text/javascript src=./static/js/app.eb563265314676df93d0.js></script></body></html>
\ No newline at end of file
<!DOCTYPE html><html><head><meta charset=utf-8><link rel="shortcut icon" href=./favicon.ico><title>好办管理平台</title><link rel=stylesheet type=text/css href=//web-1251519181.file.myqcloud.com/custom-element/custom-element.1.0.28.css><link href=./static/css/app.7b1c8fc2c1ceb962720dd326edd6fe5c.css rel=stylesheet></head><body style="min-width: 1400px;" class=damolish><div id=app></div><script src=//web-1251519181.file.myqcloud.com/lib/vue/2.6.6/vue.min.js></script><script src=//web-1251519181.file.myqcloud.com/lib/vue-router/3.0.2/vue-router.min.js></script><script src=//web-1251519181.file.myqcloud.com/lib/vuex/3.1.0/vuex.min.js></script><script src=//web-1251519181.file.myqcloud.com/components/img-preview.2.0.00.js></script><script src=//web-1251519181.file.myqcloud.com/components/footer.2.0.04.js></script><script>// Raven.config('https://3715a345910d4c768e7a1ec14619c2d5@sentry.io/1413672').install();</script><script type=text/javascript src=./static/js/manifest.1c5ee32d887b130e2716.js></script><script type=text/javascript src=./static/js/vendor.ec5b5af1da21f97836b5.js></script><script type=text/javascript src=./static/js/app.73f179c0b16048b4cd11.js></script></body></html>
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
!function(e){var a=window.webpackJsonp;window.webpackJsonp=function(c,b,n){for(var r,t,o,i=0,u=[];i<c.length;i++)t=c[i],d[t]&&u.push(d[t][0]),d[t]=0;for(r in b)Object.prototype.hasOwnProperty.call(b,r)&&(e[r]=b[r]);for(a&&a(c,b,n);u.length;)u.shift()();if(n)for(i=0;i<n.length;i++)o=f(f.s=n[i]);return o};var c={},d={76:0};function f(a){if(c[a])return c[a].exports;var d=c[a]={i:a,l:!1,exports:{}};return e[a].call(d.exports,d,d.exports,f),d.l=!0,d.exports}f.e=function(e){var a=d[e];if(0===a)return new Promise(function(e){e()});if(a)return a[2];var c=new Promise(function(c,f){a=d[e]=[c,f]});a[2]=c;var b=document.getElementsByTagName("head")[0],n=document.createElement("script");n.type="text/javascript",n.charset="utf-8",n.async=!0,n.timeout=12e4,f.nc&&n.setAttribute("nonce",f.nc),n.src=f.p+"static/js/"+e+"."+{0:"75512f3d6a564da7391d",1:"06c4e42e62c1f75191f0",2:"95860c596ce8eeb79301",3:"317153cd3f6b0047eb86",4:"c3c7a44f10799d6b0570",5:"bf21cfa1832c94ed8d4c",6:"abab57a4ec10030e4f38",7:"ece0a2d210892b176e55",8:"7d0a8e6532c58d0c2415",9:"ea31d337331fea67d62b",10:"62eecd9e2e85ea911ebd",11:"9b3374cd4a81129f7a3c",12:"6c1505f8ef62166b7a6e",13:"2ccd52bd6e1150f23c90",14:"0225e369d82f24077aba",15:"592a2e6008db77975bcc",16:"bc276325eab50b4b86c0",17:"edf42ec3b001b6cfe65e",18:"4b0922e27b6b34b18611",19:"30252583b235f2c70040",20:"ba2e2bd0823422a4de6c",21:"9e35f4bb567c79f900c4",22:"4657c811baa7a2a81fa8",23:"b696c3789461b84413c4",24:"4ad7713214fd3234337d",25:"9e5733792c18c643ff3a",26:"54efe70e981ee20ef028",27:"4c65de628f548349df50",28:"4fbce325a868a8eed45f",29:"dd6838c438e8e01143be",30:"6e3dad3ed142df770d0e",31:"963d650c22609bb350cc",32:"648e00249c751be0ef72",33:"3b19f619921aacfda1e4",34:"b57b41292517a536addb",35:"cf76e4b74afa283a3eec",36:"db02c347e3e009b70eac",37:"5038b3a9b73a30e92ed9",38:"8dacabcebbcf33c09d69",39:"36ad49af4ad28511cb7e",40:"53d1aada48d77cf4670b",41:"b7276467d43930494f90",42:"cef9078afe497dcad23b",43:"c353323742d5dbd08fb8",44:"21732320382ad9591379",45:"ea4b39548055481346ef",46:"77005fb1df27e8d0dcfa",47:"27ddf80c8da77bf9c52d",48:"46491eec4d9b28b07f2a",49:"961ddd83c04214b4e2b0",50:"49955822174c9ebab437",51:"c84a655307ea7a2993bc",52:"23ce7f8f10e2d853d7e7",53:"03649cc9cbca035a1d60",54:"4c35b1e21352f05966df",55:"8a707dea9d35fe36a516",56:"a497356aa0b1b941f70e",57:"fa0993908f0e01751c40",58:"89745e27566eaf3aebae",59:"35846fe10eaf6d8a8c93",60:"02ef368f3955ef4fa3ee",61:"cc56326182e5e1134503",62:"ef71a1048465b72ae595",63:"aaaae3e573c9454df03d",64:"6e4ab38ada941a5fb834",65:"859191282a6e5fdc4b7f",66:"a970ad3d710b5c92c175",67:"0dd6204bfe8e0903ea36",68:"b0e48542a6189f95e7a9",69:"78c1148df0648f724434",70:"d8b620c8d056d806ac23",71:"8ce9113b1568e9bf5537",72:"a6222ada9c9a2655c92a",73:"959fb844a60624eba321"}[e]+".js";var r=setTimeout(t,12e4);function t(){n.onerror=n.onload=null,clearTimeout(r);var a=d[e];0!==a&&(a&&a[1](new Error("Loading chunk "+e+" failed.")),d[e]=void 0)}return n.onerror=n.onload=t,b.appendChild(n),c},f.m=e,f.c=c,f.d=function(e,a,c){f.o(e,a)||Object.defineProperty(e,a,{configurable:!1,enumerable:!0,get:c})},f.n=function(e){var a=e&&e.__esModule?function(){return e.default}:function(){return e};return f.d(a,"a",a),a},f.o=function(e,a){return Object.prototype.hasOwnProperty.call(e,a)},f.p="./",f.oe=function(e){throw console.error(e),e}}([]);
\ No newline at end of file
!function(e){var a=window.webpackJsonp;window.webpackJsonp=function(c,b,n){for(var r,t,o,i=0,u=[];i<c.length;i++)t=c[i],f[t]&&u.push(f[t][0]),f[t]=0;for(r in b)Object.prototype.hasOwnProperty.call(b,r)&&(e[r]=b[r]);for(a&&a(c,b,n);u.length;)u.shift()();if(n)for(i=0;i<n.length;i++)o=d(d.s=n[i]);return o};var c={},f={76:0};function d(a){if(c[a])return c[a].exports;var f=c[a]={i:a,l:!1,exports:{}};return e[a].call(f.exports,f,f.exports,d),f.l=!0,f.exports}d.e=function(e){var a=f[e];if(0===a)return new Promise(function(e){e()});if(a)return a[2];var c=new Promise(function(c,d){a=f[e]=[c,d]});a[2]=c;var b=document.getElementsByTagName("head")[0],n=document.createElement("script");n.type="text/javascript",n.charset="utf-8",n.async=!0,n.timeout=12e4,d.nc&&n.setAttribute("nonce",d.nc),n.src=d.p+"static/js/"+e+"."+{0:"75512f3d6a564da7391d",1:"06c4e42e62c1f75191f0",2:"95860c596ce8eeb79301",3:"317153cd3f6b0047eb86",4:"c3c7a44f10799d6b0570",5:"e3ef8a5358b112a4f4a1",6:"f1d5161ef40a7ba3f6cf",7:"ece0a2d210892b176e55",8:"7d0a8e6532c58d0c2415",9:"ea31d337331fea67d62b",10:"62eecd9e2e85ea911ebd",11:"9b3374cd4a81129f7a3c",12:"6c1505f8ef62166b7a6e",13:"2ccd52bd6e1150f23c90",14:"0225e369d82f24077aba",15:"592a2e6008db77975bcc",16:"bc276325eab50b4b86c0",17:"edf42ec3b001b6cfe65e",18:"4b0922e27b6b34b18611",19:"30252583b235f2c70040",20:"ba2e2bd0823422a4de6c",21:"9e35f4bb567c79f900c4",22:"4657c811baa7a2a81fa8",23:"b696c3789461b84413c4",24:"4ad7713214fd3234337d",25:"9e5733792c18c643ff3a",26:"54efe70e981ee20ef028",27:"4c65de628f548349df50",28:"4fbce325a868a8eed45f",29:"dd6838c438e8e01143be",30:"6e3dad3ed142df770d0e",31:"963d650c22609bb350cc",32:"648e00249c751be0ef72",33:"3b19f619921aacfda1e4",34:"b57b41292517a536addb",35:"cf76e4b74afa283a3eec",36:"db02c347e3e009b70eac",37:"5038b3a9b73a30e92ed9",38:"8dacabcebbcf33c09d69",39:"36ad49af4ad28511cb7e",40:"53d1aada48d77cf4670b",41:"b7276467d43930494f90",42:"cef9078afe497dcad23b",43:"c353323742d5dbd08fb8",44:"21732320382ad9591379",45:"ea4b39548055481346ef",46:"77005fb1df27e8d0dcfa",47:"27ddf80c8da77bf9c52d",48:"46491eec4d9b28b07f2a",49:"961ddd83c04214b4e2b0",50:"49955822174c9ebab437",51:"c84a655307ea7a2993bc",52:"23ce7f8f10e2d853d7e7",53:"03649cc9cbca035a1d60",54:"4c35b1e21352f05966df",55:"8a707dea9d35fe36a516",56:"a497356aa0b1b941f70e",57:"fa0993908f0e01751c40",58:"89745e27566eaf3aebae",59:"35846fe10eaf6d8a8c93",60:"02ef368f3955ef4fa3ee",61:"cc56326182e5e1134503",62:"ef71a1048465b72ae595",63:"aaaae3e573c9454df03d",64:"6e4ab38ada941a5fb834",65:"859191282a6e5fdc4b7f",66:"a970ad3d710b5c92c175",67:"0dd6204bfe8e0903ea36",68:"b0e48542a6189f95e7a9",69:"78c1148df0648f724434",70:"d8b620c8d056d806ac23",71:"8ce9113b1568e9bf5537",72:"a6222ada9c9a2655c92a",73:"959fb844a60624eba321"}[e]+".js";var r=setTimeout(t,12e4);function t(){n.onerror=n.onload=null,clearTimeout(r);var a=f[e];0!==a&&(a&&a[1](new Error("Loading chunk "+e+" failed.")),f[e]=void 0)}return n.onerror=n.onload=t,b.appendChild(n),c},d.m=e,d.c=c,d.d=function(e,a,c){d.o(e,a)||Object.defineProperty(e,a,{configurable:!1,enumerable:!0,get:c})},d.n=function(e){var a=e&&e.__esModule?function(){return e.default}:function(){return e};return d.d(a,"a",a),a},d.o=function(e,a){return Object.prototype.hasOwnProperty.call(e,a)},d.p="./",d.oe=function(e){throw console.error(e),e}}([]);
\ No newline at end of file
<!--
* @Descripttion: 当前组件信息
* @version: 1.0.0
* @Author: 无尘
* @Date: 2020-04-14 09:50:16
* @LastEditors: 无尘
* @LastEditTime: 2020-05-14 10:44:29
-->
<!--
<text-edit :categoryId="categoryId" @closeText="closeText" @submitText="submitText"></text-edit>
import textEdit from '@/components/set/text-edit.vue';
-->
<template>
<el-dialog :title="!!editRow.materialId ? '编辑文件' : '新建文件'" :visible.sync="dialogVisible" width="600px" :before-close="handleClose">
<div class="">
<el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="100px" class="demo-ruleForm">
<el-form-item label="文件标题" prop="materialTitle">
<limitInput :inputWidth="440" :inputValue.sync="ruleForm.materialTitle" :holder="'请输入文件标题'" :getByType="'word'" :maxLength="20"> </limitInput>
</el-form-item>
<el-form-item label="文件" prop="link">
<el-upload class="upload-demo notice-upload-file" :action="uploadUrl()" :before-upload="beforeFileUpload" :on-success="handleFileSuccess" :on-change="handleFileChange" :on-remove="handleRemove" :limit="1" :on-exceed="handleExceed" :file-list="fileDatas">
<el-button type="primary"><i class="el-icon-upload el-icon--right" style="font-size: 16px;padding-right:5px;"></i>上传</el-button><span class="font-12 color-606266 p-l-20">普通文件,不大于20MB。支持word及excle,pdf,ppt,zip,rar格式</span>
</el-upload>
</el-form-item>
</el-form>
</div>
<div slot="footer" class="dialog-footer">
<el-button @click="toCancel">取消</el-button>
<el-button type="primary" @click="submitForm('ruleForm')">确定</el-button>
</div>
</el-dialog>
</template>
<script>
import limitInput from '@/components/limit-input.vue';
import { _debounce } from '@/common/js/public';
import { postRequest } from '@/api/api';
import showMsg from '@/common/js/showmsg';
import errMsg from '@/common/js/error';
import { emojiArr } from '@/utils/emoji';
export default {
props: {
editRow: {
type: Object,
default() {
return {};
}
},
categoryId: {
type: Object,
default() {
return '';
}
}
},
components: {
limitInput
},
data() {
return {
editPersion: localStorage.getItem('userName'),
dialogVisible: true,
ruleForm: {
materialId: '',
materialTitle: '',
link: ''
},
rules: {
materialTitle: [{ required: true, message: '请输入文件标题', trigger: 'blur' }],
materialContent: [{ required: true, message: '请输入文件内容', trigger: 'blur' }]
},
emojiList: emojiArr,
fileType: '.doc'
};
},
methods: {
/**
* 上传url
*/
uploadUrl() {
const that = this;
let host = window.location.origin;
let baseUrl;
if (host.indexOf('localhost') != '-1') {
baseUrl = 'http://www.gicdev.com';
} else {
baseUrl = host;
}
that.upUrl = baseUrl + `/haoban-manage3-web/upload-file?fileType=${that.fileType}`;
return that.upUrl;
},
/**
* 附件上传
*
*/
beforeFileUpload(file) {
let that = this;
const isFiles = file.name.includes('pdf') || file.name.includes('doc') || file.name.includes('xls') || file.name.includes('ppt') || file.name.includes('zip') || file.name.includes('rar');
const isLt20M = file.size / 1024 / 1024 <= 20;
if (!isLt20M) {
that.$message.error('文件大小超出限制,无法上传');
}
if (!isFiles) {
that.$message.error('仅支持word及excle,pdf,ppt,zip,rar格式');
return false;
}
return isLt20M && isFiles;
},
handleRemove(file, fileList) {
// const that = this;
/* eslint-disable */
// console.log('del:', file, fileList);
},
handleExceed(files, fileList) {
this.$message.warning(`当前限制选择 1 个文件,本次选择了 ${files.length} 个文件,共选择了 ${files.length + fileList.length} 个文件`);
},
beforeRemove(file, fileList) {
return this.$confirm(`确定移除 ${file.name}?`);
},
handleFileSuccess(res, file) {
const that = this;
/* eslint-disable */
console.log(res, file)
// that.ruleFormData.attachment.push(res.result); // 不能动态修改绑定的fileList 否则只拿到最后一个回调
that.ruleForm.link = res.result.url;
},
handleFileChange(files, fileList) {
let that = this;
/* eslint-disable */
// console.log('handleFileChange:',that.fileDatas)
that.fileDatas = fileList;
},
/**
* 输入内容
**/
handleInput($event) {
const that = this;
that.ruleForm.materialContent = $event.target.innerText;
},
/**
* 选中表情
**/
selectEmoji(item) {
const that = this;
that.ruleForm.materialContent = that.ruleForm.materialContent + item.key;
},
toCancel() {
const that = this;
that.$emit('closeText');
that.$refs['ruleForm'].resetFields();
},
handleClose(done) {
const that = this;
that.$emit('closeText');
that.$refs['ruleForm'].resetFields();
},
submitForm: _debounce(function(formName) {
const that = this;
that.$refs[formName].validate(valid => {
if (valid) {
that.postSave();
}
});
}, 300),
postSave() {
const that = this;
const data = {
categoryId: that.categoryId,
materialType: 1,
materialId: that.ruleForm.materialId,
materialTitle: that.ruleForm.materialTitle,
materialContent: that.ruleForm.materialContent
};
postRequest(that.ruleForm.materialId ? '/haoban-manage3-web/material-edit' : '/haoban-manage3-web/material-add', data)
.then(res => {
let resData = res.data;
if (resData.errorCode == 1) {
showMsg.showmsg('操作成功', 'success');
that.$refs['ruleForm'].resetFields();
that.$emit('submitText');
} else {
errMsg.errorMsg(resData);
}
})
.catch(error => {
that.$message.error({
duration: 1000,
message: error.message
});
});
}
},
watch: {
editRow(newData) {
const that = this;
if (Object.keys(newData).length) {
that.ruleForm = JSON.parse(JSON.stringify(newData));
}
}
},
mounted() {
const that = this;
if (Object.keys(that.editRow).length) {
that.ruleForm = JSON.parse(JSON.stringify(that.editRow));
}
}
};
</script>
<style lang="less" scoped>
.m-b-20 {
margin-bottom: 20px;
}
.p-l-18 {
padding-left: 18px;
}
.material-content {
position: relative;
.material-body {
/* resize: none;
width: 440px;
height: 273px;
border-radius: 2px;
border: 1px solid rgba(196, 198, 207, 1); */
.el-textarea {
/deep/ .el-textarea__inner {
height: 273px;
}
}
}
.emoji-img {
position: absolute;
left: 10px;
bottom: 10px;
}
}
.el-textarea {
/deep/ .el-textarea__inner {
height: 273px;
}
}
</style>
<!--
* @Descripttion: 当前组件信息
* @version: 1.0.0
* @Author: 无尘
* @Date: 2019-03-20 14:36:37
* @LastEditors: 无尘
* @LastEditTime: 2020-05-14 10:44:53
-->
<!--
<text-table :categoryId="categoryId" :textTableData="textTableData" @handleSelectionChange="handleSelectionChange" @refreshTable="refreshTable" @handleCurrentChange="handleCurrentChange" @handleSizeChange="handleSizeChange"></text-table>
import textTable from '@/components/set/text-table.vue';
-->
<template>
<div class="text-table-body">
<el-table class="select-table" ref="multipleTable" :data="tableData" tooltip-effect="dark" :style="{ width: '100%', minHeight: tableH }" @selection-change="handleSelectionChange">
<el-table-column class-name="hide-ellipsis" type="selection" width="35"> </el-table-column>
<el-table-column class-name="hide-ellipsis" width="25">
<template slot="header" slot-scope="scope">
<el-dropdown style="line-height: 10px; padding: 0; margin-left: -15px; transform: translateY(4px); -webkit-transform: translateY(4px);" @command="handleCommand" placement="bottom-start">
<span class="el-dropdown-link"><i class="iconfont icongengduo"></i> </span>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item command="0"><span :style="{ color: selectRadio == 0 ? '#2f54eb' : '#606266' }">选择当页</span></el-dropdown-item>
<el-dropdown-item command="1"><span :style="{ color: selectRadio == 1 ? '#2f54eb' : '#606266' }">选择全部</span></el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</template>
<template slot-scope="scope"> </template>
</el-table-column>
<el-table-column label="标题" width="120" show-overflow-tooltip>
<template slot-scope="scope"
>{{ scope.row.materialTitle }}
</template>
</el-table-column>
<el-table-column prop="" label="内容" show-overflow-tooltip>
<template slot-scope="scope">{{ scope.row.materialContent }}</template>
</el-table-column>
<el-table-column prop="" label="编辑人" show-overflow-tooltip>
<template slot-scope="scope">{{ scope.row.staffName }}</template>
</el-table-column>
<el-table-column prop="" label="最近编辑时间">
<template slot-scope="scope">
<div class="color-606266 line-18">{{ scope.row.updateTime | timeStampToYmd }}</div>
<div class="color-606266 line-18">{{ scope.row.updateTime | timeStampToHms }}</div>
</template>
</el-table-column>
<el-table-column label="操作">
<template slot-scope="scope">
<el-button type="text" @click="toEdit(scope.$index, scope.row)">编辑</el-button>
<el-button type="text" @click="toDel(scope.$index, scope.row)">删除</el-button>
</template>
</el-table-column>
</el-table>
<div class="block common-wrap__page text-right m-t-24" v-if="tableData.length != 0">
<el-pagination background @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="currentPage" :page-sizes="[20, 40, 60, 80]" :page-size="pageSize" layout="total, sizes, prev, pager, next, jumper" :total="total"> </el-pagination>
</div>
<file-edit v-if="textShow" :editRow="editRow" :categoryId="categoryId" @closeText="closeText" @submitText="submitText"></file-edit>
</div>
</template>
<script>
import fileEdit from '@/components/set/file-edit.vue';
import { postRequest } from '@/api/api';
// import { _debounce } from '@/common/js/public';
import showMsg from '@/common/js/showmsg';
import errMsg from '@/common/js/error';
export default {
props: {
brandId: {
type: String,
default() {
return '';
}
},
categoryId: {
type: String,
default() {
return '';
}
},
textTableData: {
type: [Array, Object],
default() {
return [];
}
},
currentPage: {
type: [String, Number],
default() {
return 1;
}
},
pageSize: {
type: [String, Number],
default() {
return 20;
}
},
total: {
type: [String, Number],
default() {
return 0;
}
}
},
data() {
return {
tableData: [],
multipleSelection: [],
textShow: false,
editRow: {}
};
},
computed: {},
methods: {
/**
* 文本弹窗关闭
*/
closeText() {
const that = this;
that.textShow = false;
that.editRow = {};
},
submitText() {
const that = this;
that.textShow = false;
that.editRow = {};
that.$emit('refreshTable');
},
/**
* 编辑
*/
toEdit(index, row) {
const that = this;
that.textShow = true;
that.editRow = row;
},
/**
* 删除
*/
toDel(index, row) {
const that = this;
that
.$confirm('确定删除当前文本素材?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
.then(() => {
that.postDel(index, row);
})
.catch(() => {});
},
postDel(index, row) {
const that = this;
let para = {
materialIds: row.materialId
};
postRequest('/haoban-manage3-web/material-del', para)
.then(res => {
let resData = res.data;
if (resData.errorCode == 1) {
showMsg.showmsg('删除成功', 'success');
that.$emit('refreshTable');
return;
}
errMsg.errorMsg(resData);
})
.catch(function(error) {
that.$message.error({
duration: 1000,
message: error.message
});
});
},
/**
* 表格选择
*/
handleSelectionChange(val) {
const that = this;
that.multipleSelection = val;
that.$emit('handleSelectionChange', val);
},
/**
* 批量删除
*/
multDel() {
const that = this;
if (!that.multipleSelection.length) {
that.$message.error({
duration: 1000,
message: '请选择删除项'
});
return false;
}
that.showDialog = true;
},
/* *
* 批量删除---弹窗关闭
*/
hideDialog(obj) {
const that = this;
that.showDialog = false;
if (!Object.keys(obj).length) {
return false;
}
that.postMultDel(obj);
},
/**
* 分页---页码变化
*/
handleSizeChange(val) {
const that = this;
that.$emit('handleSizeChange', val);
},
/**
* 分页---当前页变化
*/
handleCurrentChange(val) {
const that = this;
that.$emit('handleCurrentChange', val);
}
},
watch: {
textTableData: function(newData, oldData) {
let that = this;
if (!!newData.length) {
that.tableData = JSON.parse(JSON.stringify(newData));
} else {
that.tableData = [];
}
}
},
mounted() {
const that = this;
that.activeBrand = that.brandId;
if (!!that.textTableData.length) {
that.tableData = JSON.parse(JSON.stringify(that.textTableData));
} else {
that.tableData = [];
}
},
components: {
fileEdit
}
};
</script>
<style type="text/scss" lang="scss" scoped>
.color-c0c4cc {
display: inline-block;
line-height: 34px;
padding-left: 10px;
color: #c0c4cc;
}
.condition-tips {
display: inline-block;
vertical-align: middle;
line-height: 32px;
}
.table-condition {
// min-width: 1200px;
}
.daily-set-wrap {
height: 100%;
.daily-set-content {
padding: 20px;
.table-condition-left {
font-size: 0;
}
}
.depart-item-content {
width: 213px;
height: 32px;
overflow: hidden;
white-space: nowrap;
border-radius: 4px;
border: 1px solid #dcdfe6;
cursor: pointer;
}
.item-cell-select {
/deep/ .el-select__tags {
white-space: nowrap;
overflow: hidden;
}
}
.depart-cell {
position: relative;
margin: 0 24px 24px 0;
.el-icon-circle-close {
position: absolute;
top: -10px;
right: -10px;
font-size: 16px;
color: #808995;
cursor: pointer;
}
}
}
</style>
......@@ -4,7 +4,7 @@
* @Author: 无尘
* @Date: 2020-03-16 09:59:39
* @LastEditors: 无尘
* @LastEditTime: 2020-05-14 10:07:08
* @LastEditTime: 2020-05-14 10:46:04
-->
<template>
<div class="daily-set-wrap ">
......@@ -111,6 +111,7 @@
<image-edit v-if="imageShow" :categoryId="currentCategoryId" @closeText="closeText" @submitText="submitText"></image-edit>
<web-edit v-if="webShow" :categoryId="currentCategoryId" @closeText="closeText" @submitText="submitText"></web-edit>
<video-edit v-if="videoShow" :categoryId="currentCategoryId" @closeText="closeText" @submitText="submitText"></video-edit>
<file-edit v-if="fileShow" :categoryId="currentCategoryId" @closeText="closeText" @submitText="submitText"></file-edit>
</div>
</template>
<script>
......@@ -118,6 +119,7 @@ import textEdit from '@/components/set/text-edit.vue';
import imageEdit from '@/components/set/image-edit.vue';
import webEdit from '@/components/set/web-edit.vue';
import videoEdit from '@/components/set/video-edit.vue';
import fileEdit from '@/components/set/file-edit.vue';
import textTable from '@/components/set/text-table.vue';
import imageTable from '@/components/set/image-table.vue';
import webTable from '@/components/set/web-table.vue';
......@@ -482,7 +484,7 @@ export default {
destroyed() {
document.documentElement.style.backgroundColor = '#fff';
},
components: { groupDialog, textTable, imageTable, webTable, videoTable, textEdit, imageEdit, webEdit, videoEdit }
components: { groupDialog, textTable, imageTable, webTable, videoTable, textEdit, imageEdit, webEdit, videoEdit, fileEdit }
};
</script>
<style type="text/less" lang="less" scoped>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment