测试环境打包

wechat
ihzero 2023-10-29 18:27:19 +08:00
commit 646e064bea
106 changed files with 13026 additions and 15138 deletions

View File

@ -1,2 +1,2 @@
<!DOCTYPE html><html lang="zh-CN"><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><title></title><script>var coverSupport = 'CSS' in window && typeof CSS.supports === 'function' && (CSS.supports('top: env(a)') || CSS.supports('top: constant(a)'))
document.write('<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' + (coverSupport ? ', viewport-fit=cover' : '') + '" />')</script><link rel="stylesheet" href="http://lcny.sk797.cn/h5/static/index.97465e7b.css"></head><body><noscript><strong>Please enable JavaScript to continue.</strong></noscript><div id="app"></div><script src="http://lcny.sk797.cn/h5/static/js/chunk-vendors.6e372103.js"></script><script src="http://lcny.sk797.cn/h5/static/js/index.cd5f72a2.js"></script></body></html>
document.write('<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' + (coverSupport ? ', viewport-fit=cover' : '') + '" />')</script><link rel="stylesheet" href="/static/index.97465e7b.css"></head><body><noscript><strong>Please enable JavaScript to continue.</strong></noscript><div id="app"></div><script src="/static/js/chunk-vendors.959091ef.js"></script><script src="/static/js/index.0de2b65b.js"></script></body></html>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1 +1 @@
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-user-password-edit"],{"0771":function(n,t,o){"use strict";o.d(t,"b",(function(){return a})),o.d(t,"c",(function(){return e})),o.d(t,"a",(function(){return s}));var s={uForm:o("aa8f").default,uFormItem:o("e0a3").default,uInput:o("d5da").default,uButton:o("d9ad").default},a=function(){var n=this,t=n.$createElement,o=n._self._c||t;return o("v-uni-view",{staticClass:"password-page"},[o("u-form",{ref:"uForm",attrs:{model:n.form}},[o("u-form-item",{attrs:{label:"密码:","label-width":"100"}},[o("u-input",{attrs:{type:n.type,"password-icon":n.passwordIcon,clearable:!0},model:{value:n.form.password,callback:function(t){n.$set(n.form,"password",t)},expression:"form.password"}})],1),o("u-form-item",{attrs:{label:"确认密码:","label-width":"150"}},[o("u-input",{attrs:{type:n.type,"password-icon":n.passwordIcon,clearable:!0},model:{value:n.form.password_confirmation,callback:function(t){n.$set(n.form,"password_confirmation",t)},expression:"form.password_confirmation"}})],1),o("v-uni-view",{staticClass:"btns",staticStyle:{"margin-top":"68rpx"}},[o("u-button",{attrs:{type:"primary"},on:{click:function(t){arguments[0]=t=n.$handleEvent(t),n.passwordEditFn()}}},[n._v("确定")])],1)],1)],1)},e=[]},"37df":function(n,t,o){"use strict";o.r(t);var s=o("0771"),a=o("b082");for(var e in a)["default"].indexOf(e)<0&&function(n){o.d(t,n,(function(){return a[n]}))}(e);o("ad0e");var r,i=o("f0c5"),u=Object(i["a"])(a["default"],s["b"],s["c"],!1,null,"c5bae556",null,!1,s["a"],r);t["default"]=u.exports},"413f":function(n,t,o){var s=o("24fb");t=s(!1),t.push([n.i,'@charset "UTF-8";\n/**\n * 这里是uni-app内置的常用样式变量\n *\n * uni-app 官方扩展插件及插件市场https://ext.dcloud.net.cn上很多三方插件均使用了这些样式变量\n * 如果你是插件开发者建议你使用scss预处理并在插件代码中直接使用这些变量无需 import 这个文件方便用户通过搭积木的方式开发整体风格一致的App\n *\n */\n/**\n * 如果你是App开发者插件使用者你可以通过修改这些变量来定制自己的插件主题实现自定义主题功能\n *\n * 如果你的项目同样使用了scss预处理你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件\n */\n/* 颜色变量 */\n/* 行为相关颜色 */\n/* 文字基本颜色 */\n/* 背景颜色 */\n/* 边框颜色 */\n/* 尺寸变量 */\n/* 文字尺寸 */\n/* 图片尺寸 */\n/* Border Radius */\n/* 水平间距 */\n/* 垂直间距 */\n/* 透明度 */\n/* 文章场景相关 */.password-page[data-v-c5bae556]{padding:%?32?%}',""]),n.exports=t},5947:function(n,t,o){var s=o("413f");s.__esModule&&(s=s.default),"string"===typeof s&&(s=[[n.i,s,""]]),s.locals&&(n.exports=s.locals);var a=o("4f06").default;a("c342612e",s,!0,{sourceMap:!1,shadowMode:!1})},"95f7":function(n,t,o){"use strict";o("7a82"),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var s=o("815d"),a={data:function(){return{form:{password:"",password_confirmation:""},type:"password",passwordIcon:!0}},onLoad:function(){},methods:{passwordEditFn:function(){console.log(this.form),this.form.password?this.form.password_confirmation?this.form.password==this.form.password_confirmation?((0,s.showLoading)("请稍等..."),this.$http.put("/api/users/reset-password",this.form).then((function(n){var t=n.data;(0,s.hideLoading)(),console.log(t),200==t.code?uni.showToast({title:"修改成功",icon:"none"}):uni.showToast({title:t.message,icon:"none"})})).catch((function(){(0,s.hideLoading)()}))):uni.showToast({title:"两次密码不一致",icon:"none"}):uni.showToast({title:"请输入确认密码",icon:"none"}):uni.showToast({title:"请输入新密码",icon:"none"})}}};t.default=a},ad0e:function(n,t,o){"use strict";var s=o("5947"),a=o.n(s);a.a},b082:function(n,t,o){"use strict";o.r(t);var s=o("95f7"),a=o.n(s);for(var e in s)["default"].indexOf(e)<0&&function(n){o.d(t,n,(function(){return s[n]}))}(e);t["default"]=a.a}}]);
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-user-password-edit"],{"0771":function(n,t,o){"use strict";o.d(t,"b",(function(){return a})),o.d(t,"c",(function(){return e})),o.d(t,"a",(function(){return s}));var s={uForm:o("aa8f").default,uFormItem:o("e0a3").default,uInput:o("d5da").default,uButton:o("d9ad").default},a=function(){var n=this,t=n.$createElement,o=n._self._c||t;return o("v-uni-view",{staticClass:"password-page"},[o("u-form",{ref:"uForm",attrs:{model:n.form}},[o("u-form-item",{attrs:{label:"密码:","label-width":"100"}},[o("u-input",{attrs:{type:n.type,"password-icon":n.passwordIcon,clearable:!0},model:{value:n.form.password,callback:function(t){n.$set(n.form,"password",t)},expression:"form.password"}})],1),o("u-form-item",{attrs:{label:"确认密码:","label-width":"150"}},[o("u-input",{attrs:{type:n.type,"password-icon":n.passwordIcon,clearable:!0},model:{value:n.form.password_confirmation,callback:function(t){n.$set(n.form,"password_confirmation",t)},expression:"form.password_confirmation"}})],1),o("v-uni-view",{staticClass:"btns",staticStyle:{"margin-top":"68rpx"}},[o("u-button",{attrs:{type:"primary"},on:{click:function(t){arguments[0]=t=n.$handleEvent(t),n.passwordEditFn()}}},[n._v("确定")])],1)],1)],1)},e=[]},"37df":function(n,t,o){"use strict";o.r(t);var s=o("0771"),a=o("b082");for(var e in a)["default"].indexOf(e)<0&&function(n){o.d(t,n,(function(){return a[n]}))}(e);o("ad0e");var r,i=o("f0c5"),u=Object(i["a"])(a["default"],s["b"],s["c"],!1,null,"c5bae556",null,!1,s["a"],r);t["default"]=u.exports},"413f":function(n,t,o){var s=o("24fb");t=s(!1),t.push([n.i,'@charset "UTF-8";\n/**\n * 这里是uni-app内置的常用样式变量\n *\n * uni-app 官方扩展插件及插件市场https://ext.dcloud.net.cn上很多三方插件均使用了这些样式变量\n * 如果你是插件开发者建议你使用scss预处理并在插件代码中直接使用这些变量无需 import 这个文件方便用户通过搭积木的方式开发整体风格一致的App\n *\n */\n/**\n * 如果你是App开发者插件使用者你可以通过修改这些变量来定制自己的插件主题实现自定义主题功能\n *\n * 如果你的项目同样使用了scss预处理你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件\n */\n/* 颜色变量 */\n/* 行为相关颜色 */\n/* 文字基本颜色 */\n/* 背景颜色 */\n/* 边框颜色 */\n/* 尺寸变量 */\n/* 文字尺寸 */\n/* 图片尺寸 */\n/* Border Radius */\n/* 水平间距 */\n/* 垂直间距 */\n/* 透明度 */\n/* 文章场景相关 */.password-page[data-v-c5bae556]{padding:%?32?%}',""]),n.exports=t},5947:function(n,t,o){var s=o("413f");s.__esModule&&(s=s.default),"string"===typeof s&&(s=[[n.i,s,""]]),s.locals&&(n.exports=s.locals);var a=o("4f06").default;a("c342612e",s,!0,{sourceMap:!1,shadowMode:!1})},"95f7":function(n,t,o){"use strict";o("7a82"),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var s=o("815d");t.default={data:function(){return{form:{password:"",password_confirmation:""},type:"password",passwordIcon:!0}},onLoad:function(){},methods:{passwordEditFn:function(){console.log(this.form),this.form.password?this.form.password_confirmation?this.form.password==this.form.password_confirmation?((0,s.showLoading)("请稍等..."),this.$http.put("/api/users/reset-password",this.form).then((function(n){var t=n.data;(0,s.hideLoading)(),console.log(t),200==t.code?uni.showToast({title:"修改成功",icon:"none"}):uni.showToast({title:t.message,icon:"none"})})).catch((function(){(0,s.hideLoading)()}))):uni.showToast({title:"两次密码不一致",icon:"none"}):uni.showToast({title:"请输入确认密码",icon:"none"}):uni.showToast({title:"请输入新密码",icon:"none"})}}}},ad0e:function(n,t,o){"use strict";var s=o("5947"),a=o.n(s);a.a},b082:function(n,t,o){"use strict";o.r(t);var s=o("95f7"),a=o.n(s);for(var e in s)["default"].indexOf(e)<0&&function(n){o.d(t,n,(function(){return s[n]}))}(e);t["default"]=a.a}}]);

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -77,6 +77,8 @@
"node-sass": "^6.0.1",
"sass-loader": "^13.3.2",
"uview-ui": "^1.8.8",
"video.js": "^8.6.1",
"videojs-contrib-hls": "^5.15.0",
"vue": "^2.6.11",
"vuex": "^3.2.0",
"vuex-persistedstate": "^4.1.0"

View File

@ -4,12 +4,13 @@ export default {
onLaunch: function () {
console.log('App Launch')
if (!(store.state.user_access_token && store.state.userInfo['id'])) {
if (!store.state.user_access_token) {
//
uni.redirectTo({
url: '/pages/login/login',
})
} else {
this.$store.dispatch('getUserInfo')
// console.log(store.state.user_access_token)
}
},
@ -28,7 +29,8 @@ export default {
<style lang="scss">
@import 'uview-ui/index.scss';
/*每个页面公共css */
body, uni-page-body {
body,
uni-page-body {
background-color: #f8f8f8;
}
@ -647,8 +649,8 @@ body, uni-page-body {
}
}
.dropdownClose{
.u-dropdown__content{
.dropdownClose {
.u-dropdown__content {
pointer-events: none;
}
}

View File

@ -32,6 +32,7 @@
</u-popup>
</template>
<script>
import checkPermission from '@/utils/permission.js'
export default {
props: {
value: {
@ -46,6 +47,14 @@ export default {
type: Array,
default: () => [],
},
editAuth: {
type: Array,
default: () => [],
},
delAuth: {
type: Array,
default: () => [],
},
},
computed: {
show: {
@ -57,10 +66,10 @@ export default {
},
},
isEdit() {
return !!this.$listeners.onEdit
return !!this.$listeners.onEdit && checkPermission(this.editAuth)
},
isDel() {
return !!this.$listeners.onDel
return !!this.$listeners.onDel && checkPermission(this.delAuth)
},
columsList() {
const arr = []

View File

@ -0,0 +1,103 @@
<template>
<div class="video-js" ref="videos" style="width: 100%; height: 100%"></div>
</template>
<script>
import videojs from 'video.js'
import 'videojs-contrib-hls'
import 'video.js/dist/video-js.css'
export default {
props: {
url: {
type: String,
default: '',
},
id: {
type: String,
default: 'videoRefI',
},
},
data() {
return {
player: null,
}
},
mounted() {
this.initVideo()
},
beforeDestroy() {
this.player?.dispose()
},
methods: {
initVideo() {
let video = document.createElement('video')
video.id = this.id
video.style = 'width: 100%; height: 100%;'
video.controls = true
video.preload = 'auto'
video.setAttribute('playsinline', true) //IOS
video.setAttribute('webkit-playsinline', true) //baiios 10duzhivideo
video.setAttribute('x5-video-player-type', 'h5') // H5 video西
let source = document.createElement('source')
source.src = this.url
video.appendChild(source)
// return
this.$refs.videos.appendChild(video)
let that = this
let player = videojs(
this.id,
{
playbackRates: [0.7, 1.0, 1.5, 2.0], //
autoDisable: true,
preload: 'none', //auto - meta - none -
language: 'zh-CN',
fluid: true, //
muted: true, //
aspectRatio: '16:9', // 使 - "16:9""4:3"
controls: false, // true,false ,api
autoplay: true, //true, autoplay: "muted", // //,muted:
loop: true, //
screenshot: true,
controlBar: {
volumePanel: {
//
inline: false, // 使
},
timeDivider: true, // 线
durationDisplay: true, //
progressControl: true, //
remainingTimeDisplay: true, //
fullscreenToggle: true, //
pictureInPictureToggle: true, //
},
},
function () {
this.on('error', function (err) {
//
console.log('请求数据时遇到错误', err)
})
this.on('stalled', function (stalled) {
//
console.log('网速失速', stalled)
})
}
)
},
},
}
</script>
<style lang="scss">
// .vjs-loading-spinner {
// .vjs-control-text {
// display: none !important;
// }
// }
.myvideo {
@apply w-full h-full;
video {
@apply w-full h-full;
}
}
</style>

View File

@ -0,0 +1,14 @@
import permission from './permission'
const install = function(Vue) {
Vue.directive('permission', permission)
}
if (window.Vue) {
window['permission'] = permission
Vue.use(install); // eslint-disable-line
}
permission.install = install
export default permission

View File

@ -0,0 +1,30 @@
import store from '@/store'
function checkPermission(el, binding) {
const { value } = binding
const roles = store.getters && (store.getters.userInfo?.permissions_slug ?? [])
if (value && value instanceof Array) {
if (value.length > 0) {
const permissionRoles = value
const hasPermission = roles.some(role => {
return permissionRoles.includes(role)
})
if (!hasPermission) {
el.parentNode && el.parentNode.removeChild(el)
}
}
} else {
throw new Error(`need roles! Like v-permission="['admin','editor']"`)
}
}
export default {
inserted(el, binding) {
checkPermission(el, binding)
},
update(el, binding) {
checkPermission(el, binding)
}
}

View File

@ -13,6 +13,9 @@ Vue.component('ynSelectInputList', ynSelectInputList)
Vue.prototype.$http = http
Vue.prototype.$getFullUrl = getFullUrl
App.mpType = 'app'
import permission from '@/directive/permission/index.js'
Vue.directive('auth', permission)

View File

@ -2,7 +2,12 @@
<view>
<Appbar title="基地数据">
<template #right>
<view class="text-white mr-20px" @click="handleCreate"></view>
<view
v-auth="['endpoint.agricultural_basic.create']"
class="text-white mr-20px"
@click="handleCreate"
>新增</view
>
</template>
</Appbar>
<u-sticky>
@ -61,6 +66,8 @@
:data="currentData"
@onEdit="handleEdit"
@onDel="handleDel"
:editAuth="['endpoint.agricultural_basic.edit']"
:delAuth="['endpoint.agricultural_basic.destroy']"
></BaseTablePopup>
<!-- 编辑 -->
<cuPopup v-model="formShow" :title="currentData ? '编辑基地' : '新增基地'">
@ -80,6 +87,7 @@ import MescrollMixin from '@/uni_modules/mescroll-uni/components/mescroll-uni/me
import cuPopup from '@/components/cu-popup/index.vue'
import BaseTablePopup from '@/components/base-table/popup.vue'
import BasicsEdit from './components/basics-edit.vue'
import checkPermission from '@/utils/permission.js'
const baseTableColums = [
{
title: '基地名称',
@ -164,22 +172,7 @@ export default {
},
},
dataList: [],
options: [
{
text: '编辑',
opt: 'edit',
style: {
backgroundColor: '#007aff',
},
},
{
text: '删除',
opt: 'delete',
style: {
backgroundColor: '#dd524d',
},
},
],
formShow: false,
baseShow: false,
searchFormSchema: [
@ -211,6 +204,30 @@ export default {
],
}
},
computed: {
options() {
return [
{
text: '编辑',
opt: 'edit',
permission: ['endpoint.agricultural_basic.edit'],
style: {
backgroundColor: '#007aff',
},
},
{
text: '删除',
opt: 'delete',
permission: ['endpoint.agricultural_basic.destroy'],
style: {
backgroundColor: '#dd524d',
},
},
].filter((e) =>
checkPermission(e.permission)
)
},
},
methods: {
handleSubmit(e) {
this.filterParmas = e

View File

@ -3,9 +3,9 @@
<view class="bg-white p-30rpx">
<view class="flex justify-between items-center">
<view class="text-32rpx">全市数据统计</view>
<u-button size="mini" @click="cityEditShow = true">编辑</u-button>
<u-button size="mini" v-auth="['endpoint.town_street.base_statistics_edit']" @click="cityEditShow = true"></u-button>
</view>
<view class="grid grid-cols-2 mt-20rpx">
<view class="grid grid-cols-2 mt-20rpx" v-auth="['endpoint.town_street.base_statistics']">
<CountItem
v-for="(item, i) in showCityList"
:key="i"

View File

@ -2,7 +2,7 @@
<view>
<Appbar title="基地农作物">
<template #right>
<view class="text-white mr-20px" @click="handleCreate"></view>
<view v-auth="['endpoint.crops.create']" class="text-white mr-20px" @click="handleCreate"></view>
</template>
</Appbar>
<u-sticky>
@ -52,17 +52,9 @@
:data="currentData"
@onEdit="handleEdit"
@onDel="handleDel"
:editAuth="['endpoint.crops.edit']"
:delAuth="['endpoint.crops.destroy']"
>
<!-- <template #extends="{ data }">
<view
class="flex justify-between w-full px-30rpx py-20rpx"
v-for="(item, i) in data.value"
:key="i"
>
<view> 名称{{ item.name }}</view>
<view> 单位{{ item.unit }}</view>
</view>
</template> -->
</BaseTablePopup>
<!-- 编辑 -->
<cuPopup v-model="formShow" :title="currentData ? '编辑农作物' : '新增农作物'">
@ -83,6 +75,7 @@ import MescrollMixin from '@/uni_modules/mescroll-uni/components/mescroll-uni/me
import cuPopup from '@/components/cu-popup/index.vue'
import BaseTablePopup from '@/components/base-table/popup.vue'
import BasicsEdit from './components/basics-edit.vue'
import checkPermission from '@/utils/permission.js'
const baseTableColums = [
{
title: '名称',
@ -128,22 +121,6 @@ export default {
},
},
dataList: [],
options: [
{
text: '编辑',
opt: 'edit',
style: {
backgroundColor: '#007aff',
},
},
{
text: '删除',
opt: 'delete',
style: {
backgroundColor: '#dd524d',
},
},
],
formShow: false,
baseShow: false,
searchFormSchema: [
@ -158,6 +135,28 @@ export default {
],
}
},
computed: {
options() {
return [
{
text: '编辑',
opt: 'edit',
permission: ['endpoint.crops.edit'],
style: {
backgroundColor: '#007aff',
},
},
{
text: '删除',
opt: 'delete',
permission: ['endpoint.crops.destroy'],
style: {
backgroundColor: '#dd524d',
},
},
].filter((e) => checkPermission(e.permission))
},
},
methods: {
handleSubmit(e) {
this.filterParmas = e

View File

@ -2,7 +2,12 @@
<view>
<Appbar title="城镇农作物">
<template #right>
<view class="text-white mr-20px" @click="handleCreate"></view>
<view
v-auth="['endpoint.town_crops.create']"
class="text-white mr-20px"
@click="handleCreate"
>新增</view
>
</template>
</Appbar>
<u-sticky>
@ -52,20 +57,15 @@
:data="currentData"
@onEdit="handleEdit"
@onDel="handleDel"
:editAuth="['endpoint.town_crops.edit']"
:delAuth="['endpoint.town_crops.destroy']"
>
<!-- <template #extends="{ data }">
<view
class="flex justify-between w-full px-30rpx py-20rpx"
v-for="(item, i) in data.value"
:key="i"
>
<view> 名称{{ item.name }}</view>
<view> 单位{{ item.unit }}</view>
</view>
</template> -->
</BaseTablePopup>
<!-- 编辑 -->
<cuPopup v-model="formShow" :title="currentData ? '编辑农作物' : '新增农作物'">
<cuPopup
v-model="formShow"
:title="currentData ? '编辑农作物' : '新增农作物'"
>
<BasicsEdit
@cancel="formShow = false"
@confirm="handleEditConfirm"
@ -82,6 +82,7 @@ import MescrollMixin from '@/uni_modules/mescroll-uni/components/mescroll-uni/me
import cuPopup from '@/components/cu-popup/index.vue'
import BaseTablePopup from '@/components/base-table/popup.vue'
import BasicsEdit from './components/basics-edit.vue'
import checkPermission from '@/utils/permission.js'
const baseTableColums = [
{
title: '名称',
@ -127,22 +128,6 @@ export default {
},
},
dataList: [],
options: [
{
text: '编辑',
opt: 'edit',
style: {
backgroundColor: '#007aff',
},
},
{
text: '删除',
opt: 'delete',
style: {
backgroundColor: '#dd524d',
},
},
],
formShow: false,
baseShow: false,
searchFormSchema: [
@ -157,6 +142,28 @@ export default {
],
}
},
computed: {
options() {
return [
{
text: '编辑',
opt: 'edit',
permission: ['endpoint.town_crops.edit'],
style: {
backgroundColor: '#007aff',
},
},
{
text: '删除',
opt: 'delete',
permission: ['endpoint.town_crops.destroy'],
style: {
backgroundColor: '#dd524d',
},
},
].filter((e) => checkPermission(e.permission))
},
},
methods: {
handleSubmit(e) {
this.filterParmas = e

View File

@ -3,7 +3,7 @@
<u-navbar title="设备管理" :background="background" :custom-back="goback"
:title-color="titleColor" :back-icon-color="titleColor">
<view class="nav_slot_right_box" slot="right">
<view class="custom_btn add_btn" @click="addBtn()"></view>
<view v-auth="['endpoint.device.create']" class="custom_btn add_btn" @click="addBtn()"></view>
</view>
</u-navbar>
<view class="secreen-section">
@ -172,8 +172,8 @@
<view class="popup-form-info">
<view class="top_box u-border-bottom">
<view class="handle-btns">
<view class="btn_del" @click="deleteInfoId(formInfo.id)"></view>
<view class="btn_edit" @click="editInfoId(formInfo.id)"></view>
<view class="btn_del" v-auth="['endpoint.device.destroy']" @click="deleteInfoId(formInfo.id)"></view>
<view class="btn_edit" v-auth="['endpoint.device.edit']" @click="editInfoId(formInfo.id)"></view>
</view>
</view>
<view class="section_c">
@ -288,6 +288,7 @@
<script>
import {navigateBack} from '@/com/utils.js'
import checkPermission from '@/utils/permission.js'
export default {
data() {
return {
@ -299,20 +300,6 @@
page:1,
list:[],
loading:'loadmore',
options: [
{
text: '编辑',
style: {
backgroundColor: '#007aff'
}
},
{
text: '删除',
style: {
backgroundColor: '#dd524d'
}
}
],
popupShow:false,
cindex:-1,//
editShow:false,
@ -433,7 +420,28 @@
}
};
},
computed: {
options() {
return [
{
text: '编辑',
opt: 'edit',
permission: ['endpoint.device.edit'],
style: {
backgroundColor: '#007aff',
},
},
{
text: '删除',
opt: 'delete',
permission: ['endpoint.device.destroy'],
style: {
backgroundColor: '#dd524d',
},
},
].filter((e) => checkPermission(e.permission))
},
},
onLoad() {
this.queryDataList();
this.getDeviceTypes();

File diff suppressed because it is too large Load Diff

View File

@ -3,7 +3,7 @@
<u-navbar title="稻虾产业" :background="background" :custom-back="goback"
:title-color="titleColor" :back-icon-color="titleColor">
<view class="nav_slot_right_box" slot="right">
<view class="custom_btn add_btn" @click="addBtn()"></view>
<view v-auth="['endpoint.rice_shrimp_industries.create']" class="custom_btn add_btn" @click="addBtn()"></view>
</view>
</u-navbar>
<view class="secreen-section">
@ -125,8 +125,8 @@
<view class="popup-form-info">
<view class="top_box u-border-bottom">
<view class="handle-btns">
<view class="btn_del" @click="deleteInfoId(formInfo.id)"></view>
<view class="btn_edit" @click="editInfoId(formInfo.id)"></view>
<view v-auth="['endpoint.rice_shrimp_industries.destroy']" class="btn_del" @click="deleteInfoId(formInfo.id)"></view>
<view v-auth="['endpoint.rice_shrimp_industries.edit']" class="btn_edit" @click="editInfoId(formInfo.id)"></view>
</view>
</view>
<view class="section_c">
@ -195,6 +195,7 @@
<script>
import {formatDate,showLoading,hideLoading,navigateBack} from '@/com/utils.js'
import checkPermission from '@/utils/permission.js'
export default {
data() {
return {
@ -206,20 +207,7 @@
page:1,
list:[],
loading:'loadmore',
options: [
{
text: '编辑',
style: {
backgroundColor: '#007aff'
}
},
{
text: '删除',
style: {
backgroundColor: '#dd524d'
}
}
],
popupShow:false,
cindex:-1,//
editShow:false,
@ -276,6 +264,28 @@
]
};
},
computed: {
options() {
return [
{
text: '编辑',
opt: 'edit',
permission: ['endpoint.rice_shrimp_industries.edit'],
style: {
backgroundColor: '#007aff',
},
},
{
text: '删除',
opt: 'delete',
permission: ['endpoint.rice_shrimp_industries.destroy'],
style: {
backgroundColor: '#dd524d',
},
},
].filter((e) => checkPermission(e.permission))
},
},
filters:{
quartername(val){
let keys = {1:'第一季度',2:'第二季度',3:'第三季度',4:'第四季度'}

View File

@ -3,7 +3,7 @@
<u-navbar title="大宗物资" :background="background" :custom-back="goback"
:title-color="titleColor" :back-icon-color="titleColor">
<view class="nav_slot_right_box" slot="right">
<view class="custom_btn add_btn" @click="addBtn()"></view>
<view v-auth="['endpoint.materiels.create']" class="custom_btn add_btn" @click="addBtn()"></view>
</view>
</u-navbar>
<view class="secreen-section">
@ -134,8 +134,8 @@
<view class="popup-form-info">
<view class="top_box u-border-bottom">
<view class="handle-btns">
<view class="btn_del" @click="deleteInfoId(formInfo.id)"></view>
<view class="btn_edit" @click="editInfoId(formInfo.id)"></view>
<view class="btn_del" v-auth="['endpoint.materiels.destroy']" @click="deleteInfoId(formInfo.id)"></view>
<view class="btn_edit" v-auth="['endpoint.materiels.edit']" @click="editInfoId(formInfo.id)"></view>
</view>
</view>
<view class="section_c">
@ -225,6 +225,7 @@
<script>
import {formatDate,showLoading,hideLoading,navigateBack} from '@/com/utils.js'
import checkPermission from '@/utils/permission.js'
export default {
data() {
return {
@ -236,20 +237,6 @@
page:1,
list:[],
loading:'loadmore',
options: [
{
text: '编辑',
style: {
backgroundColor: '#007aff'
}
},
{
text: '删除',
style: {
backgroundColor: '#dd524d'
}
}
],
popupShow:false,
cindex:-1,//
editShow:false,
@ -319,6 +306,28 @@
]
};
},
computed: {
options() {
return [
{
text: '编辑',
opt: 'edit',
permission: ['endpoint.materiels.edit'],
style: {
backgroundColor: '#007aff',
},
},
{
text: '删除',
opt: 'delete',
permission: ['endpoint.materiels.destroy'],
style: {
backgroundColor: '#dd524d',
},
},
].filter((e) => checkPermission(e.permission))
},
},
filters:{
quartername(val){
let keys = {1:'第一季度',2:'第二季度',3:'第三季度',4:'第四季度'}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -230,9 +230,15 @@ export default {
seriesData.push(resData[key])
})
const max = Math.max(...seriesData)
let maxN = Math.ceil(max / 5) * 5
maxN = maxN === 0 ? 5 : maxN
this.opts.yAxis.data[0].max = maxN
if (max > 5) {
let maxN = Math.ceil(max / 5) * 5
maxN = maxN === 0 ? 5 : maxN
this.opts.yAxis.data[0].max = maxN
} else {
this.opts.yAxis.splitNumber = max
}
let res = {
categories: xAxis,
series: [

View File

@ -10,13 +10,13 @@
<view class="content-box">
<view
class="menus-section"
v-for="(menu, index) in menuList"
v-for="(menu, index) in menus"
:key="index"
>
<view class="title-t" v-if="menu.parent"
<view class="title-t" v-if="menu.parent && menu.children.length>0"
>{{ menu.parent }}-{{ menu.label }}</view
>
<view class="title-t" v-else>{{ menu.label }}</view>
<view class="title-t" v-if="!menu.parent && menu.children.length>0">{{ menu.label }}</view>
<view class="menu-ul">
<view class="menu-li" v-for="(cdm, i) in menu.children" :key="i">
<view class="menu_item" @click="linknavFn(cdm)">
@ -31,6 +31,7 @@
</template>
<script>
import { mapGetters } from 'vuex'
export default {
data() {
return {
@ -42,44 +43,40 @@ export default {
{
label: '气象监测',
url: '/pages/index/meteorological',
permission: 'endpoint.weather.index',
},
{
label: '智能监控',
url: '/pages/index/monitor',
permission: 'endpoint.camera.index',
},
{
label: '土壤监控',
url: '/pages/index/soil-monitoring',
permission: 'endpoint.soil.index',
},
{
label: '水质监控',
url: '/pages/index/water-quality',
permission: 'endpoint.water.index',
},
{
label: '昆虫性诱监测',
url: '/pages/index/insect-monitors',
permission: 'endpoint.insect.index',
},
{
label: '虫情监测',
url: '/pages/index/pests',
permission: 'endpoint.worm_statics.index',
},
{
label: '杀虫灯检测',
url: '/pages/index/insecticidal-lamp',
permission: 'endpoint.insecticidal_lamp.index',
},
],
},
// {
// label:'',
// children:[
// {
// label:'',
// },
// {
// label:'',
// },
// ],
// },
{
label: '全市基础数据',
parent: '基础数据管理',
@ -87,10 +84,12 @@ export default {
{
label: '城镇数据',
url: '/pages/basics/town-base',
permission: 'endpoint.town_street.index',
},
{
label: '基地数据',
url: '/pages/basics/basics-base',
permission: 'endpoint.agricultural_basic.index',
},
],
},
@ -101,10 +100,12 @@ export default {
{
label: '城镇农作物',
url: '/pages/crop/town-crop',
permission: 'endpoint.town_crops.index',
},
{
label: '基地农作物',
url: '/pages/crop/basics-crop',
permission: 'endpoint.crops.index',
},
],
},
@ -115,10 +116,12 @@ export default {
{
label: '城镇产量',
url: '/pages/yield/town-yield',
permission: 'endpoint.town_crops_output.index',
},
{
label: '基地产量',
url: '/pages/yield/basics-yield',
permission: 'endpoint.crops_output.index',
},
],
},
@ -129,22 +132,27 @@ export default {
{
label: '稻虾价格',
url: '/pages/estate/estate-price',
permission: 'endpoint.rice_shrimp_prices.index',
},
{
label: '稻虾每周价格',
url: '/pages/estate/estate-week-price',
permission: 'endpoint.rice_shrimp_weekly_prices.index',
},
{
label: '稻虾产业',
url: '/pages/estate/estate-industry',
permission: 'endpoint.rice_shrimp_industries.index',
},
{
label: '稻虾流向',
url: '/pages/estate/estate-flows',
permission: 'endpoint.rice_shrimp_flows.index',
},
{
label: '大宗物资',
url: '/pages/estate/estate-materiels',
permission: 'endpoint.materiels.index',
},
],
},
@ -154,18 +162,48 @@ export default {
{
label: '设备管理',
url: '/pages/device/index',
permission: 'endpoint.device.index',
},
{
label: '警报明细',
url: '/pages/device/warning',
permission: 'endpoint.warnings.index',
},
],
},
],
}
},
computed: {
...mapGetters(['userInfo']),
menus(){
return this.filterAsyncRoutes(this.menuList, this.userInfo?.permissions_slug ?? [])
}
},
onLoad() {},
methods: {
hasPermission(roles, route) {
if (route.permission) {
return roles.some((role) => route.permission.includes(role))
} else {
return true
}
},
filterAsyncRoutes(routes, roles) {
const res = []
routes.forEach((route) => {
const tmp = { ...route }
if (this.hasPermission(roles, tmp)) {
if (tmp.children) {
tmp.children = this.filterAsyncRoutes(tmp.children, roles)
}
res.push(tmp)
}
})
return res
},
linknavFn(item) {
console.log(item)
uni.navigateTo({

File diff suppressed because it is too large Load Diff

View File

@ -44,7 +44,7 @@
<view class="top_box u-border-bottom">
<view class="tit">预警数据统计</view>
<view class="set_warning">
<u-button class="set_btn" @click="setWarnInfo()" size="mini">设置</u-button>
<u-button v-auth="['endpoint.soil.setting','endpoint.soil.setting_edit']" class="set_btn" @click="setWarnInfo()" size="mini"></u-button>
</view>
</view>
<view class="cont-box">

View File

@ -44,7 +44,7 @@
<view class="top_box u-border-bottom">
<view class="tit">预警数据统计</view>
<view class="set_warning">
<u-button class="set_btn" @click="setWarnInfo()" size="mini">设置</u-button>
<u-button v-auth="['endpoint.water.setting','endpoint.water.setting_edit']" class="set_btn" @click="setWarnInfo()" size="mini"></u-button>
</view>
</view>
<view class="cont-box">

View File

@ -1,222 +1,231 @@
<template>
<view class="login-page bg-page">
<view class="img-a">
<view class="t-b">
隆昌农业大数据监控平台
</view>
</view>
<view class="login-view" style="">
<view class="t-login">
<form class="cl">
<view class="t-a">
<text class="txt">账号</text>
<input type="text" name="username" placeholder="请输入您的账号"
v-model="username" />
</view>
<view class="t-a">
<text class="txt">密码</text>
<input type="password" name="password" maxlength="18"
placeholder="请输入您的密码" v-model="password" />
</view>
<button @tap="login()" type="button"> </button>
<!-- <view class="reg" @tap="reg()"> </view> -->
</form>
</view>
</view>
</view>
<view class="login-page bg-page">
<view class="img-a">
<view class="t-b"> 隆昌农业大数据监控平台 </view>
</view>
<view class="login-view" style="">
<view class="t-login">
<form class="cl">
<view class="t-a">
<text class="txt">账号</text>
<input
type="text"
name="username"
placeholder="请输入您的账号"
v-model="username"
/>
</view>
<view class="t-a">
<text class="txt">密码</text>
<input
type="password"
name="password"
maxlength="18"
placeholder="请输入您的密码"
v-model="password"
/>
</view>
<button @tap="login()" type="button"> </button>
<!-- <view class="reg" @tap="reg()"> </view> -->
</form>
</view>
</view>
</view>
</template>
<script>
import {getStorageSync,setStorageSync,setStorage, toast} from '@/com/utils.js'
import {
getStorageSync,
setStorageSync,
setStorage,
toast,
} from '@/com/utils.js'
import jwt from '@/api/jwt.js'
export default {
data() {
return {
username: '', //
password: '' //
};
},
onLoad() {
},
methods: {
//
login() {
if (!this.username) {
uni.showToast({ title: '请输入您的账号', icon: 'none' });
return;
}
if (!this.password) {
uni.showToast({ title: '请输入您的密码', icon: 'none' });
return;
}
let params = {
username:this.username,
password:this.password
};
this.$http.post('/api/auth/login',params,{
custom:{
auth:false
}
}).then(({data})=>{
console.log(data);
if(data.code==200){
let _data = data.data;
let _info = _data.info;
console.log(_data)
jwt.setAccessToken(_data.token)
this.$store.dispatch('USER_INFO',_info);
uni.switchTab({
url:'/pages/index/index'
})
uni.showToast({ title: '登录成功!', icon: 'none' });
}
}).catch(()=>{
uni.showToast({ title: '登录失败!', icon: 'none' });
})
},
}
};
data() {
return {
username: '', //
password: '', //
}
},
onLoad() {},
methods: {
//
login() {
if (!this.username) {
uni.showToast({ title: '请输入您的账号', icon: 'none' })
return
}
if (!this.password) {
uni.showToast({ title: '请输入您的密码', icon: 'none' })
return
}
let params = {
username: this.username,
password: this.password,
}
this.$http
.post('/api/auth/login', params, {
custom: {
auth: false,
},
})
.then(({ data }) => {
console.log(data)
if (data.code == 200) {
let _data = data.data
let _info = _data.info
console.log(_data)
jwt.setAccessToken(_data.token)
this.$store.dispatch('getUserInfo')
uni.switchTab({
url: '/pages/index/index',
})
uni.showToast({ title: '登录成功!', icon: 'none' })
}
})
.catch(() => {
uni.showToast({ title: '登录失败!', icon: 'none' })
})
},
},
}
</script>
<style lang="scss" scoped>
.login-page{
background-color: #fff;
.txt {
font-size: 32rpx;
font-weight: bold;
color: #333333;
}
.img-a {
width: 100%;
height: 450rpx;
background-image: url(../../static/head.png);
background-size: 100%;
}
.reg {
font-size: 28rpx;
color: #fff;
height: 90rpx;
line-height: 90rpx;
border-radius: 50rpx;
font-weight: bold;
background: #f5f6fa;
color: #000000;
text-align: center;
margin-top: 30rpx;
}
.login-page {
background-color: #fff;
.txt {
font-size: 32rpx;
font-weight: bold;
color: #333333;
}
.img-a {
width: 100%;
height: 450rpx;
background-image: url(../../static/head.png);
background-size: 100%;
}
.reg {
font-size: 28rpx;
color: #fff;
height: 90rpx;
line-height: 90rpx;
border-radius: 50rpx;
font-weight: bold;
background: #f5f6fa;
color: #000000;
text-align: center;
margin-top: 30rpx;
}
.login-view {
width: 100%;
position: relative;
margin-top: -120rpx;
background-color: #ffffff;
border-radius: 8% 8% 0% 0;
}
.login-view {
width: 100%;
position: relative;
margin-top: -120rpx;
background-color: #ffffff;
border-radius: 8% 8% 0% 0;
}
.t-login {
width: 600rpx;
margin: 0 auto;
font-size: 28rpx;
padding-top: 80rpx;
}
.t-login {
width: 600rpx;
margin: 0 auto;
font-size: 28rpx;
padding-top: 80rpx;
}
.t-login button {
font-size: 28rpx;
background: #2796f2;
color: #fff;
height: 90rpx;
line-height: 90rpx;
border-radius: 50rpx;
font-weight: bold;
}
.t-login button {
font-size: 28rpx;
background: #2796f2;
color: #fff;
height: 90rpx;
line-height: 90rpx;
border-radius: 50rpx;
font-weight: bold;
}
.t-login input {
height: 90rpx;
line-height: 90rpx;
margin-bottom: 50rpx;
border-bottom: 1px solid #e9e9e9;
font-size: 28rpx;
}
.t-login input {
height: 90rpx;
line-height: 90rpx;
margin-bottom: 50rpx;
border-bottom: 1px solid #e9e9e9;
font-size: 28rpx;
}
.t-login .t-a {
position: relative;
}
.t-login .t-a {
position: relative;
}
.t-b {
text-align: left;
font-size: 42rpx;
color: #ffffff;
padding: 130rpx 0 0 70rpx;
font-weight: bold;
line-height: 70rpx;
}
.t-b {
text-align: left;
font-size: 42rpx;
color: #ffffff;
padding: 130rpx 0 0 70rpx;
font-weight: bold;
line-height: 70rpx;
}
.t-login .t-c {
position: absolute;
right: 22rpx;
top: 22rpx;
background: #5677fc;
color: #fff;
font-size: 24rpx;
border-radius: 50rpx;
height: 50rpx;
line-height: 50rpx;
padding: 0 25rpx;
}
.t-login .t-c {
position: absolute;
right: 22rpx;
top: 22rpx;
background: #5677fc;
color: #fff;
font-size: 24rpx;
border-radius: 50rpx;
height: 50rpx;
line-height: 50rpx;
padding: 0 25rpx;
}
.t-login .t-d {
text-align: center;
color: #999;
margin: 80rpx 0;
}
.t-login .t-d {
text-align: center;
color: #999;
margin: 80rpx 0;
}
.t-login .t-e {
text-align: center;
width: 250rpx;
margin: 80rpx auto 0;
}
.t-login .t-e {
text-align: center;
width: 250rpx;
margin: 80rpx auto 0;
}
.t-login .t-g {
float: left;
width: 50%;
}
.t-login .t-g {
float: left;
width: 50%;
}
.t-login .t-e image {
width: 50rpx;
height: 50rpx;
}
.t-login .t-e image {
width: 50rpx;
height: 50rpx;
}
.t-login .t-f {
text-align: center;
margin: 150rpx 0 0 0;
color: #666;
}
.t-login .t-f {
text-align: center;
margin: 150rpx 0 0 0;
color: #666;
}
.t-login .t-f text {
margin-left: 20rpx;
color: #aaaaaa;
font-size: 27rpx;
}
.t-login .t-f text {
margin-left: 20rpx;
color: #aaaaaa;
font-size: 27rpx;
}
.t-login .uni-input-placeholder {
color: #aeaeae;
}
.t-login .uni-input-placeholder {
color: #aeaeae;
}
.cl {
zoom: 1;
}
.cl {
zoom: 1;
}
.cl:after {
clear: both;
display: block;
visibility: hidden;
height: 0;
content: '\20';
}
.cl:after {
clear: both;
display: block;
visibility: hidden;
height: 0;
content: '\20';
}
}
</style>

View File

@ -4,7 +4,7 @@
<view class="top-title-box">
<view class="title">账号列表</view>
<view class="handle-option">
<u-button class="btn" size="medium"
<u-button v-auth="['endpoint.admin_users.create']" class="btn" size="medium"
@click="addBtn()" type="primary">新增</u-button>
</view>
</view>
@ -127,9 +127,9 @@
<view class="popup-form-info">
<view class="top_box u-border-bottom">
<view class="handle-btns">
<view class="btn_del" @click="deleteInfoId(formInfo.id)"></view>
<view class="btn_edit" @click="editPwdPopup(formInfo.id)"></view>
<view class="btn_edit" @click="editInfoId(formInfo.id)"></view>
<view v-auth="['endpoint.admin_users.destroy']" class="btn_del" @click="deleteInfoId(formInfo.id)"></view>
<view v-auth="['endpoint.admin_users.edit_password']" class="btn_edit" @click="editPwdPopup(formInfo.id)"></view>
<view v-auth="['endpoint.admin_users.edit']" class="btn_edit" @click="editInfoId(formInfo.id)"></view>
</view>
</view>
<view class="section_c">
@ -235,6 +235,7 @@
<script>
import {showLoading,hideLoading} from '@/com/utils.js'
import checkPermission from '@/utils/permission.js'
export default {
data() {
return {
@ -242,20 +243,6 @@
page:1,
list:[],
loading:'loadmore',
options: [
{
text: '编辑',
style: {
backgroundColor: '#007aff'
}
},
{
text: '删除',
style: {
backgroundColor: '#dd524d'
}
}
],
popupShow:false,
cindex:-1,//
editShow:false,
@ -324,6 +311,26 @@
};
},
computed:{
options() {
return [
{
text: '编辑',
opt: 'edit',
permission: ['endpoint.device.edit'],
style: {
backgroundColor: '#007aff',
},
},
{
text: '删除',
opt: 'delete',
permission: ['endpoint.device.destroy'],
style: {
backgroundColor: '#dd524d',
},
},
].filter((e) => checkPermission(e.permission))
},
seletedShow(){
let arrName = [];
for(let item of this.seletedBaseList){

View File

@ -3,7 +3,7 @@
<u-navbar title="友情链接" :background="background" :custom-back="goback"
:title-color="titleColor" :back-icon-color="titleColor">
<view class="nav_slot_right_box" slot="right">
<view class="custom_btn add_btn" @click="addBtn()"></view>
<view v-auth="['endpoint.friend_links.edit']" class="custom_btn add_btn" @click="addBtn()"></view>
</view>
</u-navbar>
<u-sticky z-index="99">
@ -164,8 +164,8 @@
<view class="popup-form-info">
<view class="top_box u-border-bottom">
<view class="handle-btns">
<view class="btn_del" @click="deleteInfoId(formInfo.id)"></view>
<view class="btn_edit" @click="editInfoId(formInfo.id)"></view>
<view v-auth="['endpoint.friend_links.destroy']" class="btn_del" @click="deleteInfoId(formInfo.id)"></view>
<view v-auth="['endpoint.friend_links.edit']" class="btn_edit" @click="editInfoId(formInfo.id)"></view>
</view>
</view>
<view class="section_c">
@ -218,6 +218,7 @@
<script>
import {formatDate,navigateBack,showLoading,hideLoading} from '@/com/utils.js'
import checkPermission from '@/utils/permission.js'
export default {
data() {
return {
@ -229,20 +230,6 @@
page:1,
list:[],
loading:'loadmore',
options: [
{
text: '编辑',
style: {
backgroundColor: '#007aff'
}
},
{
text: '删除',
style: {
backgroundColor: '#dd524d'
}
}
],
popupShow:false,
cindex:-1,//
editShow:false,
@ -287,6 +274,28 @@
dropDownShow:false,
};
},
computed: {
options() {
return [
{
text: '编辑',
opt: 'edit',
permission: ['endpoint.friend_links.edit'],
style: {
backgroundColor: '#007aff',
},
},
{
text: '删除',
opt: 'delete',
permission: ['endpoint.friend_links.destroy'],
style: {
backgroundColor: '#dd524d',
},
},
].filter((e) => checkPermission(e.permission))
},
},
filters:{
timeFormat(val){
return formatDate(val*1000, 'yyyy-MM-dd hh:mm');

View File

@ -4,7 +4,7 @@
<view class="top-title-box">
<view class="title">角色列表</view>
<view class="handle-option">
<u-button class="btn" size="medium"
<u-button v-auth="['endpoint.admin_roles.create']" class="btn" size="medium"
@click="addBtn()" type="primary">新增</u-button>
</view>
</view>
@ -82,8 +82,8 @@
<view class="popup-form-info">
<view class="top_box">
<view class="handle-btns">
<view class="btn_del" @click="deleteRoleId(info.id)"></view>
<view class="btn_edit" @click="editRoleId(info.id)"></view>
<view v-auth="['endpoint.admin_roles.destroy']" class="btn_del" @click="deleteRoleId(info.id)"></view>
<view v-auth="['endpoint.admin_roles.edit']" class="btn_edit" @click="editRoleId(info.id)"></view>
</view>
</view>
<view class="section_c">
@ -106,6 +106,7 @@
<script>
import DaTreeVue2 from '@/components/da-tree-vue2/index.vue'
import {showLoading,hideLoading} from '@/com/utils.js'
import checkPermission from '@/utils/permission.js'
export default {
components: { DaTreeVue2 },
data() {
@ -114,20 +115,6 @@
page:1,
rolelist:[],
loading:'loadmore',
options: [
{
text: '编辑',
style: {
backgroundColor: '#007aff'
}
},
{
text: '删除',
style: {
backgroundColor: '#dd524d'
}
}
],
popupShow:false,
info:{},//
cindex:-1,//
@ -144,6 +131,28 @@
defaultCheckedKeysValue: [],
};
},
computed: {
options() {
return [
{
text: '编辑',
opt: 'edit',
permission: ['endpoint.admin_roles.edit'],
style: {
backgroundColor: '#007aff',
},
},
{
text: '删除',
opt: 'delete',
permission: ['endpoint.admin_roles.destroy'],
style: {
backgroundColor: '#dd524d',
},
},
].filter((e) => checkPermission(e.permission))
},
},
onLoad() {
this.queryAdminRoleList();
this.queryPermissions();

View File

@ -40,16 +40,16 @@
<view class="arrow_R"></view>
</view>
</view>
<view class="nav-list" @click="linnavF('/pages/system/role')">
<view v-auth="['endpoint.admin_roles.index']" class="nav-list" @click="linnavF('/pages/system/role')">
<view class="icon_img">
<u-icon name="man-add" size="46"></u-icon>
</view>
<view class="item-c">
<view class="item-c" >
<view class="tname">角色管理</view>
<view class="arrow_R"></view>
</view>
</view>
<view class="nav-list" @click="linnavF('/pages/system/account')">
<view v-auth="['endpoint.admin_users.index']" class="nav-list" @click="linnavF('/pages/system/account')">
<view class="icon_img">
<u-icon name="account" size="46"></u-icon>
</view>
@ -58,7 +58,7 @@
<view class="arrow_R"></view>
</view>
</view>
<view class="nav-list" @click="linnavF('/pages/system/log')">
<view v-auth="['endpoint.operation_log.index']" class="nav-list" @click="linnavF('/pages/system/log')">
<view class="icon_img">
<u-icon name="clock" size="46"></u-icon>
</view>
@ -67,7 +67,7 @@
<view class="arrow_R"></view>
</view>
</view>
<view class="nav-list" @click="linnavF('/pages/system/links')">
<view v-auth="['endpoint.friend_links.index']" class="nav-list" @click="linnavF('/pages/system/links')">
<view class="icon_img">
<u-icon name="attach" size="46"></u-icon>
</view>

Some files were not shown because too many files have changed in this diff Show More