chore: 图片共享,合成图片视频下载等;

develop
wx-jincw 3 weeks ago
parent 44e8c7cbc4
commit bf86bf69b1

@ -1,14 +1,14 @@
# 页面标题 # 页面标题
VUE_APP_TITLE = 烟草管理系统 VUE_APP_TITLE = 烟草图片助手
# 开发环境配置 # 开发环境配置
ENV = 'development' ENV = 'development'
# 烟草管理系统/开发环境 # 烟草图片助手/开发环境
#VUE_APP_BASE_API = 'http://124.71.134.146:8096/prod-api' #VUE_APP_BASE_API = 'http://124.71.134.146:8096/prod-api'
VUE_APP_BASE_API = 'http://localhost:8080' # VUE_APP_BASE_API = 'http://localhost:8080'
# VUE_APP_BASE_API = 'http://tanjunwei.test.jiutianda.cn' # VUE_APP_BASE_API = 'https://tobacco2.test.jiutianda.cn'
# VUE_APP_BASE_API = 'http://wangyi.test.jiutianda.cn' VUE_APP_BASE_API = 'http://wangyi.test.jiutianda.cn'
# 路由懒加载 # 路由懒加载
VUE_CLI_BABEL_TRANSPILE_MODULES = true VUE_CLI_BABEL_TRANSPILE_MODULES = true

@ -1,8 +1,8 @@
# 页面标题 # 页面标题
VUE_APP_TITLE = 烟草管理系统 VUE_APP_TITLE = 烟草图片助手
# 生产环境配置 # 生产环境配置
ENV = 'production' ENV = 'production'
# 烟草管理系统/生产环境 # 烟草图片助手/生产环境
VUE_APP_BASE_API = '/prod-api' VUE_APP_BASE_API = '/prod-api'

@ -1,10 +1,10 @@
# 页面标题 # 页面标题
VUE_APP_TITLE = 烟草管理系统 VUE_APP_TITLE = 烟草图片助手
NODE_ENV = production NODE_ENV = production
# 测试环境配置 # 测试环境配置
ENV = 'staging' ENV = 'staging'
# 烟草管理系统/测试环境 # 烟草图片助手/测试环境
VUE_APP_BASE_API = '/stage-api' VUE_APP_BASE_API = '/stage-api'

@ -1,7 +1,7 @@
{ {
"name": "tobacco", "name": "tobacco",
"version": "3.8.6", "version": "3.8.6",
"description": "烟草管理系统", "description": "烟草图片助手",
"author": "烟草", "author": "烟草",
"license": "MIT", "license": "MIT",
"scripts": { "scripts": {

@ -0,0 +1,185 @@
<!-- 通用选择 -->
<template>
<el-select style="width: 100%" v-bind="$attrs" v-model="selValue" :placeholder="placeholder" :clearable="clearable"
:filterable="filterable" :value-key="valueKey" :remote="filterable && pageAble && pageParam.pageSize < total"
:remote-method="remoteMethod" :loading="loading" @change="change">
<slot name="header"></slot>
<el-option v-for="(v, index) in options" :key="index" :label="v[labelKey]" :value="v[valueKey] + ''">
<slot :index="index" :row="v"></slot>
</el-option>
<el-pagination
v-if="pageAble"
:pager-count="5"
hide-on-single-page
layout="prev, pager, next"
:total="total"
:current-page.sync="pageParam.pageNum"
@current-change="getList"
>
</el-pagination>
</el-select>
</template>
<script>
export default {
name: 'NomalSelect',
props: {
apiMethod: {
type: Function,
default: null,
},
//
syncQuery: {
type: Boolean,
default: true
},
labelKey: {
type: String,
default: 'label'
},
valueKey: {
type: String,
default: 'id'
},
value: {
type: [String, Number, Array],
default: ''
},
placeholder: {
type: String,
default: '请选择'
},
clearable: {
type: Boolean,
default: true
},
filterable: {
type: Boolean,
default: true
},
query: {
type: [Object, Number, String],
default: () => ({})
},
isPathQuery: {
type: Boolean,
default: false,
},
//
pageAble: {
type: Boolean,
default: false
}
},
data() {
return {
selValue: typeof this.value === 'string' || typeof this.value === 'number' ? this.value + '' : this.value,
options: [],
total: 0,
pageParam: this.pageAble ? { pageNum: 1, pageSize: 10 } : {},
loading: false,
timer: null,
}
},
watch: {
value() {
if (typeof this.value === 'string' || typeof this.value === 'number') {
this.selValue = this.value + '';
} else {
this.selValue = this.value;
}
},
apiMethod() {
this.getList();
},
query: {
handler() {
this.getList();
},
deep: true
}
},
model: {
prop: 'value',
event: 'change'
},
mounted() {
this.getList();
},
methods: {
refresh() {
this.pageParam = this.pageAble ? { pageNum: 1, pageSize: 10 } : {};
this.getList();
},
getList() {
if (!this.apiMethod) {
return;
}
if (this.isPathQuery) {
if (!this.query || typeof this.query === 'object') {
this.options = [];
return;
}
this.loading = true;
this.apiMethod(this.query).then(res => {
this.options = res?.rows || res.data || [];
this.total = res?.total || this.options.length || 0;
this.loading = false;
}).catch(err => {
this.loading = false;
});
return;
}
this.loading = true;
this.apiMethod(this.syncQuery ? {
...this.pageParam,
...this.query,
}: this.pageParam, this.query).then(res => {
this.options = res?.rows || res.data || [];
this.total = res?.total || this.options.length || 0;
this.loading = false;
}).catch(err => {
this.loading = false;
});
},
//
remoteMethod(query) {
if (this.timer) {
clearTimeout(this.timer);
}
this.timer = setTimeout(() => {
this.timer = null;
this.pageParam = {
...this.pageParam,
pageNum: 1,
[this.labelKey]: query
};
this.getList();
}, 300);
},
change(val) {
this.$emit('change', val);
//
if (this.$attrs.multiple) {
const selvs = val.map(element => {
const findex = this.options.findIndex(v => v[this.valueKey] == element);
return this.options[findex] || {};
});
this.$emit('rowChange', selvs);
return;
}
const findex = this.options.findIndex(v => v[this.valueKey] == val);
if (findex > -1) {
this.$emit('rowChange', this.options[findex]);
}
}
}
}
</script>
<style lang="scss" scoped></style>

@ -21,9 +21,7 @@
<el-checkbox :indeterminate="isIndeterminate" v-model="checkAll" @change="handleCheckAllChange">{{list.filter(val => val._check).length}}</el-checkbox> <el-checkbox :indeterminate="isIndeterminate" v-model="checkAll" @change="handleCheckAllChange">{{list.filter(val => val._check).length}}</el-checkbox>
</div> </div>
<el-dropdown @command="handleImageCommand" v-loading="genImaging"> <el-dropdown @command="handleImageCommand" v-loading="genImaging">
<span class="el-dropdown-link"> <el-button type="primary" size="small" style="margin-right: 10px;" plain>图片合并<i class="el-icon-arrow-down"></i></el-button>
图片合并<i class="el-icon-arrow-down el-icon--right"></i>
</span>
<el-dropdown-menu slot="dropdown"> <el-dropdown-menu slot="dropdown">
<el-dropdown-item command="nineGrid">九宫格</el-dropdown-item> <el-dropdown-item command="nineGrid">九宫格</el-dropdown-item>
<el-dropdown-item command="fourGrid">四宫格</el-dropdown-item> <el-dropdown-item command="fourGrid">四宫格</el-dropdown-item>
@ -32,9 +30,16 @@
<el-dropdown-item command="video">生成视频</el-dropdown-item> <el-dropdown-item command="video">生成视频</el-dropdown-item>
</el-dropdown-menu> </el-dropdown-menu>
</el-dropdown> </el-dropdown>
<el-button type="warning" size="small" plain @click="clear"></el-button> <!-- <el-button type="warning" size="small" plain @click="clear"></el-button> -->
<el-button type="info" size="small" v-loading="taskCreating" plain @click.stop="goCreateTask"></el-button> <el-button type="info" size="small" v-loading="taskCreating" plain @click.stop="goCreateTask"></el-button>
<el-button type="primary" size="small" plain @click.stop="addToTask">反馈到任务<i class="el-icon-right"></i></el-button> <el-button type="primary" size="small" plain @click.stop="addToTask">反馈到任务<i class="el-icon-right"></i></el-button>
<el-dropdown @command="handleMoreCommand">
<el-button type="warning" size="small" style="margin-left: 10px;" plain>更多<i class="el-icon-d-arrow-right"></i></el-button>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item command="share">共享</el-dropdown-item>
<el-dropdown-item command="clear">清空购物车</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</div> </div>
</div> </div>
<div class="image-area task-area" v-show="chooseTask"> <div class="image-area task-area" v-show="chooseTask">
@ -166,6 +171,7 @@
</div> </div>
</transition> </transition>
<AuditDialog ref="editDialog" ></AuditDialog> <AuditDialog ref="editDialog" ></AuditDialog>
<ShareDialog ref="shareDialog"></ShareDialog>
</div> </div>
</template> </template>
@ -176,12 +182,16 @@ import { addImageFeedback } from "@/api/task/feedback";
import { generateTasks } from "@/api/task/images"; import { generateTasks } from "@/api/task/images";
import { imageToGroup } from "@/api/gallery/images"; import { imageToGroup } from "@/api/gallery/images";
import AuditDialog from "@/views/task-distribut/send/other-task/components/AuditDialog"; import AuditDialog from "@/views/task-distribut/send/other-task/components/AuditDialog";
// import { downloadFileUrl } from '../../utils';
import download from '@/plugins/download.js'
import ShareDialog from '@/views/share-gallery/components/ShareDialog.vue';
export default { export default {
name: 'PhotoCart', name: 'PhotoCart',
dicts: ['task_type','task_status'], dicts: ['task_type','task_status'],
components: { components: {
AuditDialog AuditDialog,
ShareDialog
}, },
data () { data () {
return { return {
@ -404,10 +414,31 @@ import AuditDialog from "@/views/task-distribut/send/other-task/components/Audit
imageType: command, imageType: command,
}).then(res => { }).then(res => {
this.genImaging = false; this.genImaging = false;
if (res.data) {
// const paths = res.data.split('.');
// const piffix = paths[paths.length - 1];
// const fileName = `${res.data.replace(`.${piffix}`, '')}.${piffix}`;
// downloadFileUrl(process.env.VUE_APP_BASE_API + '/profile/' + res.data, res.data);
download.profilePath(res.data);
}
}).catch(e => { }).catch(e => {
this.genImaging = false; this.genImaging = false;
}); });
}, },
handleMoreCommand(command) {
if (command === 'clear') {
this.clear();
return;
}
if (command === 'share') {
const ids = this.list.filter(val => val._check).map(val => val.id);
console.log('选中:', ids);
this.$refs.shareDialog.open({
cataIds: ids,
});
return;
}
},
animationEnd() { animationEnd() {
this.isAnimation = true; this.isAnimation = true;
setTimeout(() => { setTimeout(() => {
@ -436,7 +467,7 @@ import AuditDialog from "@/views/task-distribut/send/other-task/components/Audit
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss">
.playAnimation{ .playAnimation{
animation: cartScale 0.5s ease-in-out; animation: cartScale 0.5s ease-in-out;
} }
@ -465,12 +496,15 @@ import AuditDialog from "@/views/task-distribut/send/other-task/components/Audit
left: 32px; left: 32px;
bottom: 40px; bottom: 40px;
.el-dropdown-link {
}
.el-dropdown-link {
cursor: pointer; cursor: pointer;
color: #409EFF; color: #409EFF;
margin-right: 10px; margin-right: 10px;
border-radius: 2px;
border: 1px solid #409EFF;
} }
}
.ball { .ball {
position: fixed; position: fixed;

@ -42,6 +42,7 @@ import DictTag from '@/components/DictTag'
import VueMeta from 'vue-meta' import VueMeta from 'vue-meta'
// 字典数据组件 // 字典数据组件
import DictData from '@/components/DictData' import DictData from '@/components/DictData'
import NomalSelect from '@/components/NomalSelect';
// 全局方法挂载 // 全局方法挂载
Vue.prototype.getDicts = getDicts Vue.prototype.getDicts = getDicts
@ -64,6 +65,7 @@ Vue.component('FileUpload', FileUpload)
Vue.component('ImageUpload', ImageUpload) Vue.component('ImageUpload', ImageUpload)
Vue.component('ImagePreview', ImagePreview) Vue.component('ImagePreview', ImagePreview)
Vue.component('MyImageViewer', MyImageViewer) Vue.component('MyImageViewer', MyImageViewer)
Vue.component('NomalSelect', NomalSelect);
Vue.mixin(CommonMixin); Vue.mixin(CommonMixin);

@ -19,7 +19,9 @@ export default {
open(data = {}) { open(data = {}) {
this.title = `${data.id ? '编辑': '新增'}${this.$options.pageInfo.title}`; this.title = `${data.id ? '编辑': '新增'}${this.$options.pageInfo.title}`;
this.dialogVisible = true; this.dialogVisible = true;
console.log('传入:', data);
this.dialogForm = { ...this.$options.pageInfo.defaultForm, ...data }; this.dialogForm = { ...this.$options.pageInfo.defaultForm, ...data };
console.log('组合数据:', this.dialogForm);
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.dialogForm.clearValidate(); this.$refs.dialogForm.clearValidate();
}); });
@ -40,7 +42,7 @@ export default {
if (this.mixin_isEdit()) { if (this.mixin_isEdit()) {
this.$options.pageInfo.updateApi(this.combinDialogForm()).then(res => { this.$options.pageInfo.updateApi(this.combinDialogForm()).then(res => {
this.saving = false; this.saving = false;
this.$message.success('编辑成功'); this.$message.success(this.mixin_commonMsg() || '编辑成功');
this.$emit('refresh'); this.$emit('refresh');
this.closeVisible(); this.closeVisible();
}).catch(() => { }).catch(() => {
@ -49,7 +51,7 @@ export default {
} else { } else {
this.$options.pageInfo.addApi(this.combinDialogForm()).then(res => { this.$options.pageInfo.addApi(this.combinDialogForm()).then(res => {
this.saving = false; this.saving = false;
this.$message.success('新增成功'); this.$message.success(this.mixin_commonMsg() || '新增成功');
this.$emit('refresh'); this.$emit('refresh');
this.closeVisible(); this.closeVisible();
}).catch(() => { }).catch(() => {
@ -62,6 +64,9 @@ export default {
}); });
}, },
submitValidateErr() { submitValidateErr() {
},
mixin_commonMsg() {
return '';
} }
} }
} }

@ -8,6 +8,24 @@ import { blobValidate } from "@/utils/bs";
const baseURL = process.env.VUE_APP_BASE_API const baseURL = process.env.VUE_APP_BASE_API
export default { export default {
profilePath(profilePath) {
const url = baseURL + "/profile/" + profilePath;
axios({
method: 'get',
url: url,
responseType: 'blob',
headers: { 'Authorization': 'Bearer ' + getToken() }
}).then((res) => {
// console.log('下载', res.data);
const isBlob = blobValidate(res.data);
if (isBlob) {
// const blob = new Blob([res.data])
this.saveAs(res.data, profilePath)
} else {
this.printErrMsg(res.data);
}
})
},
name(name, isDelete = true) { name(name, isDelete = true) {
var url = baseURL + "/common/download?fileName=" + encodeURIComponent(name) + "&delete=" + isDelete var url = baseURL + "/common/download?fileName=" + encodeURIComponent(name) + "&delete=" + isDelete
axios({ axios({

@ -442,3 +442,17 @@ function oldDownloadFile(obj, name, suffix) {
document.body.removeChild(link) document.body.removeChild(link)
} }
export function downloadFileUrl(url, name) {
// console.log('下载数据', obj);
// const url = window.URL.createObjectURL(new Blob([obj]))
console.log('下载数据地址', url);
const link = document.createElement('a')
link.style.display = 'none'
link.href = url
link.setAttribute('download', name)
document.body.appendChild(link)
link.click()
document.body.removeChild(link)
}

@ -17,7 +17,7 @@ const service = axios.create({
// axios中请求配置有baseURL选项表示请求URL公共部分 // axios中请求配置有baseURL选项表示请求URL公共部分
baseURL: process.env.VUE_APP_BASE_API, baseURL: process.env.VUE_APP_BASE_API,
// 超时 // 超时
timeout: 10000 timeout: 30000
}) })
// request拦截器 // request拦截器

@ -14,6 +14,12 @@
<el-button ref="addCart" type="info" icon="el-icon-shopping-cart-full" circle plain style="margin-left: 5px;font-size: 16px;" @click.stop="addToCart"></el-button> <el-button ref="addCart" type="info" icon="el-icon-shopping-cart-full" circle plain style="margin-left: 5px;font-size: 16px;" @click.stop="addToCart"></el-button>
</div> </div>
</div> </div>
<el-tooltip class="item" effect="dark" v-if="item.exifInfo" placement="top">
<div slot="content" style="max-width: 300px;">{{ item.exifInfo }}</div>
<div class="info-extra">
EXIF<i class="el-icon-warning-outline" style="margin-left: 3px;"></i>
</div>
</el-tooltip>
</div> </div>
</template> </template>
@ -59,11 +65,12 @@ export default {
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss">
.image-item { .image-item {
border-radius: 10px; border-radius: 10px;
box-shadow: 0px 0px 8px #999999; box-shadow: 0px 0px 8px #999999;
overflow: hidden; overflow: hidden;
position: relative;
.image { .image {
width: 100%; width: 100%;
@ -101,5 +108,17 @@ export default {
align-items: flex-end; align-items: flex-end;
} }
.info-extra {
position: absolute;
top: 5px;
right: 5px;
font-size: 14px;
padding: 2px 5px;
border-radius: 5px;
background-color: rgba(0, 0, 0, 0.5);
color: #fff;
}
} }
</style> </style>

@ -304,14 +304,21 @@ resetQueryTable() {
this.imageUrl = URL.createObjectURL(file.raw); this.imageUrl = URL.createObjectURL(file.raw);
}, },
handleFileSuccess(res, file) { handleFileSuccess(res, file) {
this.uploading = false;
if (res.code === 200) {
this.$message.success('上传成功'); this.$message.success('上传成功');
this.openLoad = false; this.openLoad = false;
this.uploading = false;
this.getTableList(); this.getTableList();
} else {
this.$message.error(res.msg);
}
this.$refs.upload.clearFiles();
}, },
handleFileError() { handleFileError() {
this.$message.error('上传失败'); this.$message.error('上传失败');
this.uploading = false; this.uploading = false;
this.$refs.upload.clearFiles();
}, },
beforeAvatarUpload(file) { beforeAvatarUpload(file) {
const isImg = file.type.indexOf('image/') !== -1; const isImg = file.type.indexOf('image/') !== -1;

@ -143,6 +143,7 @@ export default {
handleFileError() { handleFileError() {
this.$message.error('上传失败'); this.$message.error('上传失败');
this.uploading = false; this.uploading = false;
this.$refs.upload.clearFiles();
}, },
removeImage(item, i) { removeImage(item, i) {
if (item._new) { if (item._new) {

@ -1,7 +1,7 @@
<template> <template>
<div class="login"> <div class="login">
<el-form ref="loginForm" :model="loginForm" :rules="loginRules" class="login-form"> <el-form ref="loginForm" :model="loginForm" :rules="loginRules" class="login-form">
<h3 class="title">烟草管理系统</h3> <h3 class="title">烟草图片助手</h3>
<el-form-item prop="username"> <el-form-item prop="username">
<el-input <el-input
v-model="loginForm.username" v-model="loginForm.username"

@ -1,7 +1,7 @@
<template> <template>
<div class="register"> <div class="register">
<el-form ref="registerForm" :model="registerForm" :rules="registerRules" class="register-form"> <el-form ref="registerForm" :model="registerForm" :rules="registerRules" class="register-form">
<h3 class="title">烟草管理系统</h3> <h3 class="title">烟草图片助手</h3>
<el-form-item prop="username"> <el-form-item prop="username">
<el-input v-model="registerForm.username" type="text" auto-complete="off" placeholder="账号"> <el-input v-model="registerForm.username" type="text" auto-complete="off" placeholder="账号">
<svg-icon slot="prefix" icon-class="user" class="el-input__icon input-icon" /> <svg-icon slot="prefix" icon-class="user" class="el-input__icon input-icon" />

@ -0,0 +1,131 @@
<template>
<el-dialog :close-on-click-modal="false" :close-on-press-escape="false" append-to-body :visible.sync="dialogVisible" :title="dialogForm.type ==='image'?'共享图片':'共享文件夹'"
>
<el-form
ref="dialogForm"
label-position="top"
:model="dialogForm"
status-icon
class="demo-form-inline"
label-width="180"
:rules="rules"
>
<el-form-item label="共享对象" prop="userType">
<el-select
v-model="dialogForm.userType"
placeholder="请选择共享对象"
style="width: 100%;"
@change="userTypeChange"
>
<el-option label="用户" value="user" />
<el-option label="部门" value="dept" />
</el-select>
</el-form-item>
<el-form-item label="共享到" prop="userIds">
<NomalSelect v-if="dialogForm.userType === 'user'"
v-model="dialogForm.userIds"
placeholder="请选择用户"
clearable
filterable
:multiple="true" :apiMethod="listUser" labelKey="userName"
valueKey="userId"
style="width: 100%;"
></NomalSelect>
<treeselect v-else v-model="dialogForm.userIds" :options="depts" multiple :show-count="true" placeholder="请选择共享部门" />
</el-form-item>
<el-form-item label="生效开始时间" prop="beginDate">
<el-date-picker
v-model="dialogForm.beginDate"
value-format="yyyy-MM-dd"
type="date"
style="width: 100%;"
placeholder="选择日期"
></el-date-picker>
</el-form-item>
<el-form-item label="生效结束时间" prop="endDate">
<el-date-picker
v-model="dialogForm.endDate"
value-format="yyyy-MM-dd"
type="date"
placeholder="选择日期"
clearable
style="width: 100%;"
></el-date-picker>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="closeVisible"></el-button>
<el-button type="primary" v-loading="saving" @click="submitForm"></el-button>
</div>
</el-dialog>
</template>
<script>
import TableEditMixin from "@/mixins/table-edit-mixin";
import { addShare } from "../../../api/gallery/cata/share";
import { listUser, deptTreeSelect } from "../../../api/system/user";
import Treeselect from "@riophae/vue-treeselect";
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
import { formatDateStr } from "../../../utils";
export default {
name: 'ShareDialog',
mixins: [TableEditMixin],
pageInfo: {
defaultForm: {
userType: null,
userIds: null,
cataIds: null,
type: 'image',
beginDate: null,
endDate: null,
},
title: "共享",
// updateApi: updateInfo,
addApi: addShare,
},
components: {
Treeselect
},
data() {
return {
listUser,
depts: [],
users: [],
rules: {
userType: [
{ required: true, message: "请选择共享对象", trigger: "change" }
],
userIds: [
{ required: true, message: "请选择共享到", trigger: "change" }
],
beginDate: [
{ required: true, message: "请选择生效开始时间", trigger: "change" }
],
}
};
},
watch: {
dialogVisible(val) {
if (val) {
this.dialogForm.beginDate = formatDateStr();
deptTreeSelect().then(res => {
this.depts = res.data;
});
}
}
},
methods: {
userTypeChange() {
this.dialogForm.userIds = null;
},
mixin_commonMsg() {
return '共享成功';
}
}
}
</script>
<style>
</style>

@ -0,0 +1,75 @@
<template>
<div class="app-container" >
<el-form :model="query" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="关键字搜索" prop="imageTitle">
<el-input
v-model="query.imageTitle"
placeholder="请输入关键字"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="queryTable"></el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQueryTable"></el-button>
</el-form-item>
</el-form>
<div class="image-list">
<ImageItem v-for="(item, index) in tableData" :key="index" :item="item" class="image-item" @goDetail="showImageViewer($event, index, item)"></ImageItem>
</div>
<!-- 表格页脚 -->
<pagination
v-show="total > 0"
:total="total"
:page.sync="page.pageNum"
:limit.sync="page.pageSize"
@pagination="getTableList"
/>
<MyImageViewer ref="previewImage" :z-index="2000"
:files="images" :options="{
download: true,
print: true,
edit: true,
check: true,
}" @change="imageEditChange"></MyImageViewer>
</div>
</template>
<script>
import ImageItem from '../../gallery/list/components/ImageItem.vue';
import tableMixin from '../../../mixins/table-mixin';
import { pageListShare } from "@/api/gallery/cata/share";
export default {
name: 'ShareList',
components: {
ImageItem,
},
mixins: [tableMixin],
pageInfo: {
title: '共享列表',
exportUrl: '',
pageListApi: pageListShare,
},
data () {
return {
};
},
methods: {
imageEditChange() {
this.getTableList();
},
showImageViewer(event, index, item) {
console.log('showImageViewer');
this.$refs.previewImage.open(index);
},
}
}
</script>
<style>
</style>

@ -7,7 +7,7 @@ function resolve(dir) {
const CompressionPlugin = require('compression-webpack-plugin') const CompressionPlugin = require('compression-webpack-plugin')
const name = process.env.VUE_APP_TITLE || '烟草管理系统' // 网页标题 const name = process.env.VUE_APP_TITLE || '烟草图片助手' // 网页标题
const port = process.env.port || process.env.npm_config_port || 8080 // 端口 const port = process.env.port || process.env.npm_config_port || 8080 // 端口

Loading…
Cancel
Save