Commit 8a5e57b2 by lixiaomin

修改基础配置权限

parent b57f360d
<template>
<el-image
:src="`${realSrc}`"
fit="cover"
:style="`width:${realWidth};height:${realHeight};`"
:preview-src-list="realSrcList"
>
<div slot="error" class="image-slot">
<i class="el-icon-picture-outline"></i>
</div>
<el-image
style="width: 100px; height: 100px"
:src="imgUrl"
:preview-src-list="imgList">
</el-image>
</template>
<script>
import { isExternal } from "@/utils/validate";
export default {
name: "ImagePreview",
props: {
src: {
type: String,
required: true
},
width: {
type: [Number, String],
default: ""
},
height: {
type: [Number, String],
default: ""
}
},
computed: {
realSrc() {
let real_src = this.src.split(",")[0];
if (isExternal(real_src)) {
return real_src;
}
return process.env.VUE_APP_BASE_API + real_src;
},
realSrcList() {
let real_src_list = this.src.split(",");
let srcList = [];
real_src_list.forEach(item => {
if (isExternal(item)) {
return srcList.push(item);
props: ['imageValue'],
data() {
return {
imgUrl: '',
imgList: []
}
},
watch: {
imageValue: {
handler(val) {
if (val) {
console.log("val",val);
this.imgUrl=val;
this.imgList.push(val);
} else {
this.imgList = [];
return [];
}
return srcList.push(process.env.VUE_APP_BASE_API + item);
});
return srcList;
},
realWidth() {
return typeof this.width == "string" ? this.width : `${this.width}px`;
},
deep: true,
immediate: true,
},
realHeight() {
return typeof this.height == "string" ? this.height : `${this.height}px`;
}
},
};
</script>
<style lang="scss" scoped>
.el-image {
border-radius: 5px;
background-color: #ebeef5;
box-shadow: 0 0 5px 1px #ccc;
::v-deep .el-image__inner {
transition: all 0.3s;
cursor: pointer;
&:hover {
transform: scale(1.2);
}
}
::v-deep .image-slot {
display: flex;
justify-content: center;
align-items: center;
width: 100%;
height: 100%;
color: #909399;
font-size: 30px;
}
}
</style>
<template>
<div>
<ImageUpload @callback="submit" v-model="value" :limit="1" />
<ImageUpload @callback="submit" v-model="value" :limit="1" v-hasPermi="['system:config:imageEdit']"/>
<ImagePreview :imageValue="value" v-hasPermi="['system:config:imageView']"/>
</div>
</template>
......
......@@ -2,16 +2,20 @@
<div>
<el-form ref="form" label-width="80px">
<el-form-item label="停业">
<ImageUpload @callback="submit" v-model="list['closeDown']" :limit="1" />
<ImageUpload @callback="submit" v-model="list['closeDown']" :limit="1" v-hasPermi="['system:config:imageEdit']"/>
<ImagePreview :imageValue="list['closeDown']" v-hasPermi="['system:config:imageView']" />
</el-form-item>
<el-form-item label="制作中">
<ImageUpload @callback="submit" v-model="list['inProduction']" :limit="1" />
<ImageUpload @callback="submit" v-model="list['inProduction']" :limit="1" v-hasPermi="['system:config:imageEdit']"/>
<ImagePreview :imageValue="list['closeDown']" v-hasPermi="['system:config:imageView']"/>
</el-form-item>
<el-form-item label="有待取单">
<ImageUpload @callback="submit" v-model="list['thereAOrder']" :limit="1" />
<ImageUpload @callback="submit" v-model="list['thereAOrder']" :limit="1" v-hasPermi="['system:config:imageEdit']"/>
<ImagePreview :imageValue="list['closeDown']" v-hasPermi="['system:config:imageView']"/>
</el-form-item>
<el-form-item label="无待取单">
<ImageUpload @callback="submit" v-model="list['noOrder']" :limit="1" />
<ImageUpload @callback="submit" v-model="list['noOrder']" :limit="1" v-hasPermi="['system:config:imageEdit']"/>
<ImagePreview :imageValue="list['closeDown']" v-hasPermi="['system:config:imageView']"/>
</el-form-item>
</el-form>
......
......@@ -10,16 +10,17 @@
<el-tab-pane label="其他设置" name="third">
<el-form ref="form" label-width="180px">
<el-form-item label="每件商品数量">
<el-input v-model="workValue['goods.limit'].configValue" placeholder="请输入名称" />
<el-input v-model="workValue['goods.limit'].configValue" placeholder="请输入名称" v-hasPermi="['system:config:otherEdit']"/>
<el-input v-model="workValue['goods.limit'].configValue" placeholder="请输入名称" v-hasPermi="['system:config:otherView']" disabled/>
</el-form-item>
<el-form-item label="温馨提示地址">
<el-input v-model="workValue['tips.address'].configValue" placeholder="请输入名称" />
<el-input v-model="workValue['tips.address'].configValue" placeholder="请输入名称" v-hasPermi="['system:config:otherEdit']"/>
<el-input v-model="workValue['tips.address'].configValue" placeholder="请输入名称" v-hasPermi="['system:config:otherView']" disabled/>
</el-form-item>
<el-form-item label="">
<el-button @click="sumit">提交</el-button>
<el-button @click="sumit" v-hasPermi="['system:config:otherView']" disabled>提交</el-button>
</el-form-item>
</el-form>
</el-tab-pane>
</el-tabs>
</div>
......
......@@ -56,16 +56,16 @@
:default-expand-all="isExpandAll"
:tree-props="{children: 'children', hasChildren: 'hasChildren'}"
>
<el-table-column prop="menuName" label="菜单名称" :show-overflow-tooltip="true" width="160"></el-table-column>
<el-table-column prop="icon" label="图标" align="center" width="100">
<el-table-column prop="menuName" label="菜单名称" :show-overflow-tooltip="true" ></el-table-column>
<el-table-column prop="icon" label="图标" align="center" >
<template slot-scope="scope">
<svg-icon :icon-class="scope.row.icon" />
</template>
</el-table-column>
<el-table-column prop="orderNum" label="排序" width="60"></el-table-column>
<el-table-column prop="orderNum" label="排序" ></el-table-column>
<el-table-column prop="perms" label="权限标识" :show-overflow-tooltip="true"></el-table-column>
<el-table-column prop="component" label="组件路径" :show-overflow-tooltip="true"></el-table-column>
<el-table-column prop="status" label="状态" width="80">
<el-table-column prop="status" label="状态">
<template slot-scope="scope">
<dict-tag :options="dict.type.sys_normal_disable" :value="scope.row.status"/>
</template>
......
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