Commit 8a5e57b2 by lixiaomin

修改基础配置权限

parent b57f360d
<template> <template>
<el-image <el-image
:src="`${realSrc}`" style="width: 100px; height: 100px"
fit="cover" :src="imgUrl"
:style="`width:${realWidth};height:${realHeight};`" :preview-src-list="imgList">
:preview-src-list="realSrcList"
>
<div slot="error" class="image-slot">
<i class="el-icon-picture-outline"></i>
</div>
</el-image> </el-image>
</template> </template>
<script> <script>
import { isExternal } from "@/utils/validate";
export default { export default {
name: "ImagePreview", name: "ImagePreview",
props: { props: ['imageValue'],
src: { data() {
type: String, return {
required: true imgUrl: '',
}, imgList: []
width: {
type: [Number, String],
default: ""
},
height: {
type: [Number, String],
default: ""
} }
}, },
computed: { watch: {
realSrc() { imageValue: {
let real_src = this.src.split(",")[0]; handler(val) {
if (isExternal(real_src)) { if (val) {
return real_src; console.log("val",val);
} this.imgUrl=val;
return process.env.VUE_APP_BASE_API + real_src; this.imgList.push(val);
},
realSrcList() { } else {
let real_src_list = this.src.split(","); this.imgList = [];
let srcList = []; return [];
real_src_list.forEach(item => {
if (isExternal(item)) {
return srcList.push(item);
} }
return srcList.push(process.env.VUE_APP_BASE_API + item);
});
return srcList;
}, },
realWidth() { deep: true,
return typeof this.width == "string" ? this.width : `${this.width}px`; immediate: true,
}, },
realHeight() {
return typeof this.height == "string" ? this.height : `${this.height}px`;
}
}, },
}; };
</script> </script>
<style lang="scss" scoped> <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> </style>
<template> <template>
<div> <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> </div>
</template> </template>
......
...@@ -2,16 +2,20 @@ ...@@ -2,16 +2,20 @@
<div> <div>
<el-form ref="form" label-width="80px"> <el-form ref="form" label-width="80px">
<el-form-item label="停业"> <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>
<el-form-item label="制作中"> <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>
<el-form-item label="有待取单"> <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>
<el-form-item label="无待取单"> <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-item>
</el-form> </el-form>
......
...@@ -10,16 +10,17 @@ ...@@ -10,16 +10,17 @@
<el-tab-pane label="其他设置" name="third"> <el-tab-pane label="其他设置" name="third">
<el-form ref="form" label-width="180px"> <el-form ref="form" label-width="180px">
<el-form-item label="每件商品数量"> <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>
<el-form-item label="温馨提示地址"> <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>
<el-form-item label=""> <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-item>
</el-form> </el-form>
</el-tab-pane> </el-tab-pane>
</el-tabs> </el-tabs>
</div> </div>
......
...@@ -56,16 +56,16 @@ ...@@ -56,16 +56,16 @@
:default-expand-all="isExpandAll" :default-expand-all="isExpandAll"
:tree-props="{children: 'children', hasChildren: 'hasChildren'}" :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="menuName" label="菜单名称" :show-overflow-tooltip="true" ></el-table-column>
<el-table-column prop="icon" label="图标" align="center" width="100"> <el-table-column prop="icon" label="图标" align="center" >
<template slot-scope="scope"> <template slot-scope="scope">
<svg-icon :icon-class="scope.row.icon" /> <svg-icon :icon-class="scope.row.icon" />
</template> </template>
</el-table-column> </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="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="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"> <template slot-scope="scope">
<dict-tag :options="dict.type.sys_normal_disable" :value="scope.row.status"/> <dict-tag :options="dict.type.sys_normal_disable" :value="scope.row.status"/>
</template> </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