测试环境打包
commit
646e064bea
|
|
@ -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)'))
|
<!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
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
|
|
@ -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
|
|
@ -77,6 +77,8 @@
|
||||||
"node-sass": "^6.0.1",
|
"node-sass": "^6.0.1",
|
||||||
"sass-loader": "^13.3.2",
|
"sass-loader": "^13.3.2",
|
||||||
"uview-ui": "^1.8.8",
|
"uview-ui": "^1.8.8",
|
||||||
|
"video.js": "^8.6.1",
|
||||||
|
"videojs-contrib-hls": "^5.15.0",
|
||||||
"vue": "^2.6.11",
|
"vue": "^2.6.11",
|
||||||
"vuex": "^3.2.0",
|
"vuex": "^3.2.0",
|
||||||
"vuex-persistedstate": "^4.1.0"
|
"vuex-persistedstate": "^4.1.0"
|
||||||
|
|
|
||||||
10
src/App.vue
10
src/App.vue
|
|
@ -4,12 +4,13 @@ export default {
|
||||||
onLaunch: function () {
|
onLaunch: function () {
|
||||||
console.log('App Launch')
|
console.log('App Launch')
|
||||||
|
|
||||||
if (!(store.state.user_access_token && store.state.userInfo['id'])) {
|
if (!store.state.user_access_token) {
|
||||||
//未登录
|
//未登录
|
||||||
uni.redirectTo({
|
uni.redirectTo({
|
||||||
url: '/pages/login/login',
|
url: '/pages/login/login',
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
|
this.$store.dispatch('getUserInfo')
|
||||||
// console.log(store.state.user_access_token)
|
// console.log(store.state.user_access_token)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
@ -28,7 +29,8 @@ export default {
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
@import 'uview-ui/index.scss';
|
@import 'uview-ui/index.scss';
|
||||||
/*每个页面公共css */
|
/*每个页面公共css */
|
||||||
body, uni-page-body {
|
body,
|
||||||
|
uni-page-body {
|
||||||
background-color: #f8f8f8;
|
background-color: #f8f8f8;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -647,8 +649,8 @@ body, uni-page-body {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.dropdownClose{
|
.dropdownClose {
|
||||||
.u-dropdown__content{
|
.u-dropdown__content {
|
||||||
pointer-events: none;
|
pointer-events: none;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -32,6 +32,7 @@
|
||||||
</u-popup>
|
</u-popup>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
|
import checkPermission from '@/utils/permission.js'
|
||||||
export default {
|
export default {
|
||||||
props: {
|
props: {
|
||||||
value: {
|
value: {
|
||||||
|
|
@ -46,6 +47,14 @@ export default {
|
||||||
type: Array,
|
type: Array,
|
||||||
default: () => [],
|
default: () => [],
|
||||||
},
|
},
|
||||||
|
editAuth: {
|
||||||
|
type: Array,
|
||||||
|
default: () => [],
|
||||||
|
},
|
||||||
|
delAuth: {
|
||||||
|
type: Array,
|
||||||
|
default: () => [],
|
||||||
|
},
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
show: {
|
show: {
|
||||||
|
|
@ -57,10 +66,10 @@ export default {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
isEdit() {
|
isEdit() {
|
||||||
return !!this.$listeners.onEdit
|
return !!this.$listeners.onEdit && checkPermission(this.editAuth)
|
||||||
},
|
},
|
||||||
isDel() {
|
isDel() {
|
||||||
return !!this.$listeners.onDel
|
return !!this.$listeners.onDel && checkPermission(this.delAuth)
|
||||||
},
|
},
|
||||||
columsList() {
|
columsList() {
|
||||||
const arr = []
|
const arr = []
|
||||||
|
|
|
||||||
|
|
@ -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) //这个bai属性是ios 10中设置可以让视频在小du窗内播放,也就是不是全zhi屏播放的video标签的一个属性
|
||||||
|
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>
|
||||||
|
|
@ -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
|
||||||
|
|
@ -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)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -13,6 +13,9 @@ Vue.component('ynSelectInputList', ynSelectInputList)
|
||||||
Vue.prototype.$http = http
|
Vue.prototype.$http = http
|
||||||
Vue.prototype.$getFullUrl = getFullUrl
|
Vue.prototype.$getFullUrl = getFullUrl
|
||||||
App.mpType = 'app'
|
App.mpType = 'app'
|
||||||
|
import permission from '@/directive/permission/index.js'
|
||||||
|
|
||||||
|
Vue.directive('auth', permission)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,12 @@
|
||||||
<view>
|
<view>
|
||||||
<Appbar title="基地数据">
|
<Appbar title="基地数据">
|
||||||
<template #right>
|
<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>
|
</template>
|
||||||
</Appbar>
|
</Appbar>
|
||||||
<u-sticky>
|
<u-sticky>
|
||||||
|
|
@ -61,6 +66,8 @@
|
||||||
:data="currentData"
|
:data="currentData"
|
||||||
@onEdit="handleEdit"
|
@onEdit="handleEdit"
|
||||||
@onDel="handleDel"
|
@onDel="handleDel"
|
||||||
|
:editAuth="['endpoint.agricultural_basic.edit']"
|
||||||
|
:delAuth="['endpoint.agricultural_basic.destroy']"
|
||||||
></BaseTablePopup>
|
></BaseTablePopup>
|
||||||
<!-- 编辑 -->
|
<!-- 编辑 -->
|
||||||
<cuPopup v-model="formShow" :title="currentData ? '编辑基地' : '新增基地'">
|
<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 cuPopup from '@/components/cu-popup/index.vue'
|
||||||
import BaseTablePopup from '@/components/base-table/popup.vue'
|
import BaseTablePopup from '@/components/base-table/popup.vue'
|
||||||
import BasicsEdit from './components/basics-edit.vue'
|
import BasicsEdit from './components/basics-edit.vue'
|
||||||
|
import checkPermission from '@/utils/permission.js'
|
||||||
const baseTableColums = [
|
const baseTableColums = [
|
||||||
{
|
{
|
||||||
title: '基地名称',
|
title: '基地名称',
|
||||||
|
|
@ -164,22 +172,7 @@ export default {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
dataList: [],
|
dataList: [],
|
||||||
options: [
|
|
||||||
{
|
|
||||||
text: '编辑',
|
|
||||||
opt: 'edit',
|
|
||||||
style: {
|
|
||||||
backgroundColor: '#007aff',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
text: '删除',
|
|
||||||
opt: 'delete',
|
|
||||||
style: {
|
|
||||||
backgroundColor: '#dd524d',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
],
|
|
||||||
formShow: false,
|
formShow: false,
|
||||||
baseShow: false,
|
baseShow: false,
|
||||||
searchFormSchema: [
|
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: {
|
methods: {
|
||||||
handleSubmit(e) {
|
handleSubmit(e) {
|
||||||
this.filterParmas = e
|
this.filterParmas = e
|
||||||
|
|
|
||||||
|
|
@ -3,9 +3,9 @@
|
||||||
<view class="bg-white p-30rpx">
|
<view class="bg-white p-30rpx">
|
||||||
<view class="flex justify-between items-center">
|
<view class="flex justify-between items-center">
|
||||||
<view class="text-32rpx">全市数据统计</view>
|
<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>
|
||||||
<view class="grid grid-cols-2 mt-20rpx">
|
<view class="grid grid-cols-2 mt-20rpx" v-auth="['endpoint.town_street.base_statistics']">
|
||||||
<CountItem
|
<CountItem
|
||||||
v-for="(item, i) in showCityList"
|
v-for="(item, i) in showCityList"
|
||||||
:key="i"
|
:key="i"
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
<view>
|
<view>
|
||||||
<Appbar title="基地农作物">
|
<Appbar title="基地农作物">
|
||||||
<template #right>
|
<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>
|
</template>
|
||||||
</Appbar>
|
</Appbar>
|
||||||
<u-sticky>
|
<u-sticky>
|
||||||
|
|
@ -52,17 +52,9 @@
|
||||||
:data="currentData"
|
:data="currentData"
|
||||||
@onEdit="handleEdit"
|
@onEdit="handleEdit"
|
||||||
@onDel="handleDel"
|
@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>
|
</BaseTablePopup>
|
||||||
<!-- 编辑 -->
|
<!-- 编辑 -->
|
||||||
<cuPopup v-model="formShow" :title="currentData ? '编辑农作物' : '新增农作物'">
|
<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 cuPopup from '@/components/cu-popup/index.vue'
|
||||||
import BaseTablePopup from '@/components/base-table/popup.vue'
|
import BaseTablePopup from '@/components/base-table/popup.vue'
|
||||||
import BasicsEdit from './components/basics-edit.vue'
|
import BasicsEdit from './components/basics-edit.vue'
|
||||||
|
import checkPermission from '@/utils/permission.js'
|
||||||
const baseTableColums = [
|
const baseTableColums = [
|
||||||
{
|
{
|
||||||
title: '名称',
|
title: '名称',
|
||||||
|
|
@ -128,22 +121,6 @@ export default {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
dataList: [],
|
dataList: [],
|
||||||
options: [
|
|
||||||
{
|
|
||||||
text: '编辑',
|
|
||||||
opt: 'edit',
|
|
||||||
style: {
|
|
||||||
backgroundColor: '#007aff',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
text: '删除',
|
|
||||||
opt: 'delete',
|
|
||||||
style: {
|
|
||||||
backgroundColor: '#dd524d',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
],
|
|
||||||
formShow: false,
|
formShow: false,
|
||||||
baseShow: false,
|
baseShow: false,
|
||||||
searchFormSchema: [
|
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: {
|
methods: {
|
||||||
handleSubmit(e) {
|
handleSubmit(e) {
|
||||||
this.filterParmas = e
|
this.filterParmas = e
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,12 @@
|
||||||
<view>
|
<view>
|
||||||
<Appbar title="城镇农作物">
|
<Appbar title="城镇农作物">
|
||||||
<template #right>
|
<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>
|
</template>
|
||||||
</Appbar>
|
</Appbar>
|
||||||
<u-sticky>
|
<u-sticky>
|
||||||
|
|
@ -52,20 +57,15 @@
|
||||||
:data="currentData"
|
:data="currentData"
|
||||||
@onEdit="handleEdit"
|
@onEdit="handleEdit"
|
||||||
@onDel="handleDel"
|
@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>
|
</BaseTablePopup>
|
||||||
<!-- 编辑 -->
|
<!-- 编辑 -->
|
||||||
<cuPopup v-model="formShow" :title="currentData ? '编辑农作物' : '新增农作物'">
|
<cuPopup
|
||||||
|
v-model="formShow"
|
||||||
|
:title="currentData ? '编辑农作物' : '新增农作物'"
|
||||||
|
>
|
||||||
<BasicsEdit
|
<BasicsEdit
|
||||||
@cancel="formShow = false"
|
@cancel="formShow = false"
|
||||||
@confirm="handleEditConfirm"
|
@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 cuPopup from '@/components/cu-popup/index.vue'
|
||||||
import BaseTablePopup from '@/components/base-table/popup.vue'
|
import BaseTablePopup from '@/components/base-table/popup.vue'
|
||||||
import BasicsEdit from './components/basics-edit.vue'
|
import BasicsEdit from './components/basics-edit.vue'
|
||||||
|
import checkPermission from '@/utils/permission.js'
|
||||||
const baseTableColums = [
|
const baseTableColums = [
|
||||||
{
|
{
|
||||||
title: '名称',
|
title: '名称',
|
||||||
|
|
@ -127,22 +128,6 @@ export default {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
dataList: [],
|
dataList: [],
|
||||||
options: [
|
|
||||||
{
|
|
||||||
text: '编辑',
|
|
||||||
opt: 'edit',
|
|
||||||
style: {
|
|
||||||
backgroundColor: '#007aff',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
text: '删除',
|
|
||||||
opt: 'delete',
|
|
||||||
style: {
|
|
||||||
backgroundColor: '#dd524d',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
],
|
|
||||||
formShow: false,
|
formShow: false,
|
||||||
baseShow: false,
|
baseShow: false,
|
||||||
searchFormSchema: [
|
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: {
|
methods: {
|
||||||
handleSubmit(e) {
|
handleSubmit(e) {
|
||||||
this.filterParmas = e
|
this.filterParmas = e
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
<u-navbar title="设备管理" :background="background" :custom-back="goback"
|
<u-navbar title="设备管理" :background="background" :custom-back="goback"
|
||||||
:title-color="titleColor" :back-icon-color="titleColor">
|
:title-color="titleColor" :back-icon-color="titleColor">
|
||||||
<view class="nav_slot_right_box" slot="right">
|
<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>
|
</view>
|
||||||
</u-navbar>
|
</u-navbar>
|
||||||
<view class="secreen-section">
|
<view class="secreen-section">
|
||||||
|
|
@ -172,8 +172,8 @@
|
||||||
<view class="popup-form-info">
|
<view class="popup-form-info">
|
||||||
<view class="top_box u-border-bottom">
|
<view class="top_box u-border-bottom">
|
||||||
<view class="handle-btns">
|
<view class="handle-btns">
|
||||||
<view class="btn_del" @click="deleteInfoId(formInfo.id)">删除</view>
|
<view class="btn_del" v-auth="['endpoint.device.destroy']" @click="deleteInfoId(formInfo.id)">删除</view>
|
||||||
<view class="btn_edit" @click="editInfoId(formInfo.id)">编辑</view>
|
<view class="btn_edit" v-auth="['endpoint.device.edit']" @click="editInfoId(formInfo.id)">编辑</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="section_c">
|
<view class="section_c">
|
||||||
|
|
@ -288,6 +288,7 @@
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import {navigateBack} from '@/com/utils.js'
|
import {navigateBack} from '@/com/utils.js'
|
||||||
|
import checkPermission from '@/utils/permission.js'
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
|
@ -299,20 +300,6 @@
|
||||||
page:1,
|
page:1,
|
||||||
list:[],
|
list:[],
|
||||||
loading:'loadmore',
|
loading:'loadmore',
|
||||||
options: [
|
|
||||||
{
|
|
||||||
text: '编辑',
|
|
||||||
style: {
|
|
||||||
backgroundColor: '#007aff'
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
text: '删除',
|
|
||||||
style: {
|
|
||||||
backgroundColor: '#dd524d'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
popupShow:false,
|
popupShow:false,
|
||||||
cindex:-1,//操作的索引
|
cindex:-1,//操作的索引
|
||||||
editShow:false,
|
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() {
|
onLoad() {
|
||||||
this.queryDataList();
|
this.queryDataList();
|
||||||
this.getDeviceTypes();
|
this.getDeviceTypes();
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load Diff
|
|
@ -3,7 +3,7 @@
|
||||||
<u-navbar title="稻虾产业" :background="background" :custom-back="goback"
|
<u-navbar title="稻虾产业" :background="background" :custom-back="goback"
|
||||||
:title-color="titleColor" :back-icon-color="titleColor">
|
:title-color="titleColor" :back-icon-color="titleColor">
|
||||||
<view class="nav_slot_right_box" slot="right">
|
<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>
|
</view>
|
||||||
</u-navbar>
|
</u-navbar>
|
||||||
<view class="secreen-section">
|
<view class="secreen-section">
|
||||||
|
|
@ -125,8 +125,8 @@
|
||||||
<view class="popup-form-info">
|
<view class="popup-form-info">
|
||||||
<view class="top_box u-border-bottom">
|
<view class="top_box u-border-bottom">
|
||||||
<view class="handle-btns">
|
<view class="handle-btns">
|
||||||
<view class="btn_del" @click="deleteInfoId(formInfo.id)">删除</view>
|
<view v-auth="['endpoint.rice_shrimp_industries.destroy']" class="btn_del" @click="deleteInfoId(formInfo.id)">删除</view>
|
||||||
<view class="btn_edit" @click="editInfoId(formInfo.id)">编辑</view>
|
<view v-auth="['endpoint.rice_shrimp_industries.edit']" class="btn_edit" @click="editInfoId(formInfo.id)">编辑</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="section_c">
|
<view class="section_c">
|
||||||
|
|
@ -195,6 +195,7 @@
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import {formatDate,showLoading,hideLoading,navigateBack} from '@/com/utils.js'
|
import {formatDate,showLoading,hideLoading,navigateBack} from '@/com/utils.js'
|
||||||
|
import checkPermission from '@/utils/permission.js'
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
|
@ -206,20 +207,7 @@
|
||||||
page:1,
|
page:1,
|
||||||
list:[],
|
list:[],
|
||||||
loading:'loadmore',
|
loading:'loadmore',
|
||||||
options: [
|
|
||||||
{
|
|
||||||
text: '编辑',
|
|
||||||
style: {
|
|
||||||
backgroundColor: '#007aff'
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
text: '删除',
|
|
||||||
style: {
|
|
||||||
backgroundColor: '#dd524d'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
popupShow:false,
|
popupShow:false,
|
||||||
cindex:-1,//操作的索引
|
cindex:-1,//操作的索引
|
||||||
editShow:false,
|
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:{
|
filters:{
|
||||||
quartername(val){
|
quartername(val){
|
||||||
let keys = {1:'第一季度',2:'第二季度',3:'第三季度',4:'第四季度'}
|
let keys = {1:'第一季度',2:'第二季度',3:'第三季度',4:'第四季度'}
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
<u-navbar title="大宗物资" :background="background" :custom-back="goback"
|
<u-navbar title="大宗物资" :background="background" :custom-back="goback"
|
||||||
:title-color="titleColor" :back-icon-color="titleColor">
|
:title-color="titleColor" :back-icon-color="titleColor">
|
||||||
<view class="nav_slot_right_box" slot="right">
|
<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>
|
</view>
|
||||||
</u-navbar>
|
</u-navbar>
|
||||||
<view class="secreen-section">
|
<view class="secreen-section">
|
||||||
|
|
@ -134,8 +134,8 @@
|
||||||
<view class="popup-form-info">
|
<view class="popup-form-info">
|
||||||
<view class="top_box u-border-bottom">
|
<view class="top_box u-border-bottom">
|
||||||
<view class="handle-btns">
|
<view class="handle-btns">
|
||||||
<view class="btn_del" @click="deleteInfoId(formInfo.id)">删除</view>
|
<view class="btn_del" v-auth="['endpoint.materiels.destroy']" @click="deleteInfoId(formInfo.id)">删除</view>
|
||||||
<view class="btn_edit" @click="editInfoId(formInfo.id)">编辑</view>
|
<view class="btn_edit" v-auth="['endpoint.materiels.edit']" @click="editInfoId(formInfo.id)">编辑</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="section_c">
|
<view class="section_c">
|
||||||
|
|
@ -225,6 +225,7 @@
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import {formatDate,showLoading,hideLoading,navigateBack} from '@/com/utils.js'
|
import {formatDate,showLoading,hideLoading,navigateBack} from '@/com/utils.js'
|
||||||
|
import checkPermission from '@/utils/permission.js'
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
|
@ -236,20 +237,6 @@
|
||||||
page:1,
|
page:1,
|
||||||
list:[],
|
list:[],
|
||||||
loading:'loadmore',
|
loading:'loadmore',
|
||||||
options: [
|
|
||||||
{
|
|
||||||
text: '编辑',
|
|
||||||
style: {
|
|
||||||
backgroundColor: '#007aff'
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
text: '删除',
|
|
||||||
style: {
|
|
||||||
backgroundColor: '#dd524d'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
popupShow:false,
|
popupShow:false,
|
||||||
cindex:-1,//操作的索引
|
cindex:-1,//操作的索引
|
||||||
editShow:false,
|
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:{
|
filters:{
|
||||||
quartername(val){
|
quartername(val){
|
||||||
let keys = {1:'第一季度',2:'第二季度',3:'第三季度',4:'第四季度'}
|
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
|
|
@ -230,9 +230,15 @@ export default {
|
||||||
seriesData.push(resData[key])
|
seriesData.push(resData[key])
|
||||||
})
|
})
|
||||||
const max = Math.max(...seriesData)
|
const max = Math.max(...seriesData)
|
||||||
let maxN = Math.ceil(max / 5) * 5
|
|
||||||
maxN = maxN === 0 ? 5 : maxN
|
if (max > 5) {
|
||||||
this.opts.yAxis.data[0].max = maxN
|
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 = {
|
let res = {
|
||||||
categories: xAxis,
|
categories: xAxis,
|
||||||
series: [
|
series: [
|
||||||
|
|
|
||||||
|
|
@ -10,13 +10,13 @@
|
||||||
<view class="content-box">
|
<view class="content-box">
|
||||||
<view
|
<view
|
||||||
class="menus-section"
|
class="menus-section"
|
||||||
v-for="(menu, index) in menuList"
|
v-for="(menu, index) in menus"
|
||||||
:key="index"
|
: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
|
>{{ 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-ul">
|
||||||
<view class="menu-li" v-for="(cdm, i) in menu.children" :key="i">
|
<view class="menu-li" v-for="(cdm, i) in menu.children" :key="i">
|
||||||
<view class="menu_item" @click="linknavFn(cdm)">
|
<view class="menu_item" @click="linknavFn(cdm)">
|
||||||
|
|
@ -31,6 +31,7 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import { mapGetters } from 'vuex'
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
|
@ -42,44 +43,40 @@ export default {
|
||||||
{
|
{
|
||||||
label: '气象监测',
|
label: '气象监测',
|
||||||
url: '/pages/index/meteorological',
|
url: '/pages/index/meteorological',
|
||||||
|
permission: 'endpoint.weather.index',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '智能监控',
|
label: '智能监控',
|
||||||
url: '/pages/index/monitor',
|
url: '/pages/index/monitor',
|
||||||
|
permission: 'endpoint.camera.index',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '土壤监控',
|
label: '土壤监控',
|
||||||
url: '/pages/index/soil-monitoring',
|
url: '/pages/index/soil-monitoring',
|
||||||
|
permission: 'endpoint.soil.index',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '水质监控',
|
label: '水质监控',
|
||||||
url: '/pages/index/water-quality',
|
url: '/pages/index/water-quality',
|
||||||
|
permission: 'endpoint.water.index',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '昆虫性诱监测',
|
label: '昆虫性诱监测',
|
||||||
url: '/pages/index/insect-monitors',
|
url: '/pages/index/insect-monitors',
|
||||||
|
permission: 'endpoint.insect.index',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '虫情监测',
|
label: '虫情监测',
|
||||||
url: '/pages/index/pests',
|
url: '/pages/index/pests',
|
||||||
|
permission: 'endpoint.worm_statics.index',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '杀虫灯检测',
|
label: '杀虫灯检测',
|
||||||
url: '/pages/index/insecticidal-lamp',
|
url: '/pages/index/insecticidal-lamp',
|
||||||
|
permission: 'endpoint.insecticidal_lamp.index',
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
// {
|
|
||||||
// label:'基础数据管理',
|
|
||||||
// children:[
|
|
||||||
// {
|
|
||||||
// label:'城镇数据',
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// label:'基地数据',
|
|
||||||
// },
|
|
||||||
// ],
|
|
||||||
// },
|
|
||||||
{
|
{
|
||||||
label: '全市基础数据',
|
label: '全市基础数据',
|
||||||
parent: '基础数据管理',
|
parent: '基础数据管理',
|
||||||
|
|
@ -87,10 +84,12 @@ export default {
|
||||||
{
|
{
|
||||||
label: '城镇数据',
|
label: '城镇数据',
|
||||||
url: '/pages/basics/town-base',
|
url: '/pages/basics/town-base',
|
||||||
|
permission: 'endpoint.town_street.index',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '基地数据',
|
label: '基地数据',
|
||||||
url: '/pages/basics/basics-base',
|
url: '/pages/basics/basics-base',
|
||||||
|
permission: 'endpoint.agricultural_basic.index',
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
|
@ -101,10 +100,12 @@ export default {
|
||||||
{
|
{
|
||||||
label: '城镇农作物',
|
label: '城镇农作物',
|
||||||
url: '/pages/crop/town-crop',
|
url: '/pages/crop/town-crop',
|
||||||
|
permission: 'endpoint.town_crops.index',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '基地农作物',
|
label: '基地农作物',
|
||||||
url: '/pages/crop/basics-crop',
|
url: '/pages/crop/basics-crop',
|
||||||
|
permission: 'endpoint.crops.index',
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
|
@ -115,10 +116,12 @@ export default {
|
||||||
{
|
{
|
||||||
label: '城镇产量',
|
label: '城镇产量',
|
||||||
url: '/pages/yield/town-yield',
|
url: '/pages/yield/town-yield',
|
||||||
|
permission: 'endpoint.town_crops_output.index',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '基地产量',
|
label: '基地产量',
|
||||||
url: '/pages/yield/basics-yield',
|
url: '/pages/yield/basics-yield',
|
||||||
|
permission: 'endpoint.crops_output.index',
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
|
@ -129,22 +132,27 @@ export default {
|
||||||
{
|
{
|
||||||
label: '稻虾价格',
|
label: '稻虾价格',
|
||||||
url: '/pages/estate/estate-price',
|
url: '/pages/estate/estate-price',
|
||||||
|
permission: 'endpoint.rice_shrimp_prices.index',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '稻虾每周价格',
|
label: '稻虾每周价格',
|
||||||
url: '/pages/estate/estate-week-price',
|
url: '/pages/estate/estate-week-price',
|
||||||
|
permission: 'endpoint.rice_shrimp_weekly_prices.index',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '稻虾产业',
|
label: '稻虾产业',
|
||||||
url: '/pages/estate/estate-industry',
|
url: '/pages/estate/estate-industry',
|
||||||
|
permission: 'endpoint.rice_shrimp_industries.index',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '稻虾流向',
|
label: '稻虾流向',
|
||||||
url: '/pages/estate/estate-flows',
|
url: '/pages/estate/estate-flows',
|
||||||
|
permission: 'endpoint.rice_shrimp_flows.index',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '大宗物资',
|
label: '大宗物资',
|
||||||
url: '/pages/estate/estate-materiels',
|
url: '/pages/estate/estate-materiels',
|
||||||
|
permission: 'endpoint.materiels.index',
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
|
@ -154,18 +162,48 @@ export default {
|
||||||
{
|
{
|
||||||
label: '设备管理',
|
label: '设备管理',
|
||||||
url: '/pages/device/index',
|
url: '/pages/device/index',
|
||||||
|
permission: 'endpoint.device.index',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '警报明细',
|
label: '警报明细',
|
||||||
url: '/pages/device/warning',
|
url: '/pages/device/warning',
|
||||||
|
permission: 'endpoint.warnings.index',
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
computed: {
|
||||||
|
...mapGetters(['userInfo']),
|
||||||
|
menus(){
|
||||||
|
|
||||||
|
return this.filterAsyncRoutes(this.menuList, this.userInfo?.permissions_slug ?? [])
|
||||||
|
}
|
||||||
|
},
|
||||||
onLoad() {},
|
onLoad() {},
|
||||||
methods: {
|
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) {
|
linknavFn(item) {
|
||||||
console.log(item)
|
console.log(item)
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load Diff
|
|
@ -44,7 +44,7 @@
|
||||||
<view class="top_box u-border-bottom">
|
<view class="top_box u-border-bottom">
|
||||||
<view class="tit">预警数据统计</view>
|
<view class="tit">预警数据统计</view>
|
||||||
<view class="set_warning">
|
<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>
|
</view>
|
||||||
<view class="cont-box">
|
<view class="cont-box">
|
||||||
|
|
|
||||||
|
|
@ -44,7 +44,7 @@
|
||||||
<view class="top_box u-border-bottom">
|
<view class="top_box u-border-bottom">
|
||||||
<view class="tit">预警数据统计</view>
|
<view class="tit">预警数据统计</view>
|
||||||
<view class="set_warning">
|
<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>
|
</view>
|
||||||
<view class="cont-box">
|
<view class="cont-box">
|
||||||
|
|
|
||||||
|
|
@ -1,222 +1,231 @@
|
||||||
<template>
|
<template>
|
||||||
<view class="login-page bg-page">
|
<view class="login-page bg-page">
|
||||||
<view class="img-a">
|
<view class="img-a">
|
||||||
<view class="t-b">
|
<view class="t-b"> 隆昌农业大数据监控平台 </view>
|
||||||
隆昌农业大数据监控平台
|
</view>
|
||||||
|
<view class="login-view" style="">
|
||||||
</view>
|
<view class="t-login">
|
||||||
</view>
|
<form class="cl">
|
||||||
<view class="login-view" style="">
|
<view class="t-a">
|
||||||
<view class="t-login">
|
<text class="txt">账号</text>
|
||||||
<form class="cl">
|
<input
|
||||||
<view class="t-a">
|
type="text"
|
||||||
<text class="txt">账号</text>
|
name="username"
|
||||||
<input type="text" name="username" placeholder="请输入您的账号"
|
placeholder="请输入您的账号"
|
||||||
v-model="username" />
|
v-model="username"
|
||||||
</view>
|
/>
|
||||||
<view class="t-a">
|
</view>
|
||||||
<text class="txt">密码</text>
|
<view class="t-a">
|
||||||
<input type="password" name="password" maxlength="18"
|
<text class="txt">密码</text>
|
||||||
placeholder="请输入您的密码" v-model="password" />
|
<input
|
||||||
</view>
|
type="password"
|
||||||
<button @tap="login()" type="button">登 录</button>
|
name="password"
|
||||||
<!-- <view class="reg" @tap="reg()">注 册</view> -->
|
maxlength="18"
|
||||||
</form>
|
placeholder="请输入您的密码"
|
||||||
</view>
|
v-model="password"
|
||||||
</view>
|
/>
|
||||||
</view>
|
</view>
|
||||||
|
<button @tap="login()" type="button">登 录</button>
|
||||||
|
<!-- <view class="reg" @tap="reg()">注 册</view> -->
|
||||||
|
</form>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<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'
|
import jwt from '@/api/jwt.js'
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
username: '', //手机号码
|
username: '', //手机号码
|
||||||
password: '' //密码
|
password: '', //密码
|
||||||
};
|
}
|
||||||
},
|
},
|
||||||
onLoad() {
|
onLoad() {},
|
||||||
|
methods: {
|
||||||
},
|
//当前登录按钮操作
|
||||||
methods: {
|
login() {
|
||||||
//当前登录按钮操作
|
if (!this.username) {
|
||||||
login() {
|
uni.showToast({ title: '请输入您的账号', icon: 'none' })
|
||||||
if (!this.username) {
|
return
|
||||||
uni.showToast({ title: '请输入您的账号', icon: 'none' });
|
}
|
||||||
return;
|
|
||||||
}
|
if (!this.password) {
|
||||||
|
uni.showToast({ title: '请输入您的密码', icon: 'none' })
|
||||||
if (!this.password) {
|
return
|
||||||
uni.showToast({ title: '请输入您的密码', icon: 'none' });
|
}
|
||||||
return;
|
let params = {
|
||||||
}
|
username: this.username,
|
||||||
let params = {
|
password: this.password,
|
||||||
username:this.username,
|
}
|
||||||
password:this.password
|
|
||||||
};
|
this.$http
|
||||||
|
.post('/api/auth/login', params, {
|
||||||
this.$http.post('/api/auth/login',params,{
|
custom: {
|
||||||
custom:{
|
auth: false,
|
||||||
auth:false
|
},
|
||||||
}
|
})
|
||||||
}).then(({data})=>{
|
.then(({ data }) => {
|
||||||
console.log(data);
|
console.log(data)
|
||||||
if(data.code==200){
|
if (data.code == 200) {
|
||||||
let _data = data.data;
|
let _data = data.data
|
||||||
let _info = _data.info;
|
let _info = _data.info
|
||||||
console.log(_data)
|
console.log(_data)
|
||||||
jwt.setAccessToken(_data.token)
|
jwt.setAccessToken(_data.token)
|
||||||
this.$store.dispatch('USER_INFO',_info);
|
this.$store.dispatch('getUserInfo')
|
||||||
uni.switchTab({
|
uni.switchTab({
|
||||||
url:'/pages/index/index'
|
url: '/pages/index/index',
|
||||||
})
|
})
|
||||||
uni.showToast({ title: '登录成功!', icon: 'none' });
|
uni.showToast({ title: '登录成功!', icon: 'none' })
|
||||||
}
|
}
|
||||||
|
})
|
||||||
}).catch(()=>{
|
.catch(() => {
|
||||||
uni.showToast({ title: '登录失败!', icon: 'none' });
|
uni.showToast({ title: '登录失败!', icon: 'none' })
|
||||||
})
|
})
|
||||||
|
},
|
||||||
},
|
},
|
||||||
|
}
|
||||||
}
|
|
||||||
};
|
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.login-page{
|
.login-page {
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
.txt {
|
.txt {
|
||||||
font-size: 32rpx;
|
font-size: 32rpx;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
color: #333333;
|
color: #333333;
|
||||||
}
|
}
|
||||||
.img-a {
|
.img-a {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 450rpx;
|
height: 450rpx;
|
||||||
background-image: url(../../static/head.png);
|
background-image: url(../../static/head.png);
|
||||||
background-size: 100%;
|
background-size: 100%;
|
||||||
}
|
}
|
||||||
.reg {
|
.reg {
|
||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
height: 90rpx;
|
height: 90rpx;
|
||||||
line-height: 90rpx;
|
line-height: 90rpx;
|
||||||
border-radius: 50rpx;
|
border-radius: 50rpx;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
background: #f5f6fa;
|
background: #f5f6fa;
|
||||||
color: #000000;
|
color: #000000;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
margin-top: 30rpx;
|
margin-top: 30rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.login-view {
|
.login-view {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
position: relative;
|
position: relative;
|
||||||
margin-top: -120rpx;
|
margin-top: -120rpx;
|
||||||
background-color: #ffffff;
|
background-color: #ffffff;
|
||||||
border-radius: 8% 8% 0% 0;
|
border-radius: 8% 8% 0% 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.t-login {
|
.t-login {
|
||||||
width: 600rpx;
|
width: 600rpx;
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
padding-top: 80rpx;
|
padding-top: 80rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.t-login button {
|
.t-login button {
|
||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
background: #2796f2;
|
background: #2796f2;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
height: 90rpx;
|
height: 90rpx;
|
||||||
line-height: 90rpx;
|
line-height: 90rpx;
|
||||||
border-radius: 50rpx;
|
border-radius: 50rpx;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
|
|
||||||
.t-login input {
|
.t-login input {
|
||||||
height: 90rpx;
|
height: 90rpx;
|
||||||
line-height: 90rpx;
|
line-height: 90rpx;
|
||||||
margin-bottom: 50rpx;
|
margin-bottom: 50rpx;
|
||||||
border-bottom: 1px solid #e9e9e9;
|
border-bottom: 1px solid #e9e9e9;
|
||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.t-login .t-a {
|
.t-login .t-a {
|
||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
|
|
||||||
.t-b {
|
.t-b {
|
||||||
text-align: left;
|
text-align: left;
|
||||||
font-size: 42rpx;
|
font-size: 42rpx;
|
||||||
color: #ffffff;
|
color: #ffffff;
|
||||||
padding: 130rpx 0 0 70rpx;
|
padding: 130rpx 0 0 70rpx;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
line-height: 70rpx;
|
line-height: 70rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.t-login .t-c {
|
.t-login .t-c {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
right: 22rpx;
|
right: 22rpx;
|
||||||
top: 22rpx;
|
top: 22rpx;
|
||||||
background: #5677fc;
|
background: #5677fc;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
font-size: 24rpx;
|
font-size: 24rpx;
|
||||||
border-radius: 50rpx;
|
border-radius: 50rpx;
|
||||||
height: 50rpx;
|
height: 50rpx;
|
||||||
line-height: 50rpx;
|
line-height: 50rpx;
|
||||||
padding: 0 25rpx;
|
padding: 0 25rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.t-login .t-d {
|
.t-login .t-d {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
color: #999;
|
color: #999;
|
||||||
margin: 80rpx 0;
|
margin: 80rpx 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.t-login .t-e {
|
.t-login .t-e {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
width: 250rpx;
|
width: 250rpx;
|
||||||
margin: 80rpx auto 0;
|
margin: 80rpx auto 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.t-login .t-g {
|
.t-login .t-g {
|
||||||
float: left;
|
float: left;
|
||||||
width: 50%;
|
width: 50%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.t-login .t-e image {
|
.t-login .t-e image {
|
||||||
width: 50rpx;
|
width: 50rpx;
|
||||||
height: 50rpx;
|
height: 50rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.t-login .t-f {
|
.t-login .t-f {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
margin: 150rpx 0 0 0;
|
margin: 150rpx 0 0 0;
|
||||||
color: #666;
|
color: #666;
|
||||||
}
|
}
|
||||||
|
|
||||||
.t-login .t-f text {
|
.t-login .t-f text {
|
||||||
margin-left: 20rpx;
|
margin-left: 20rpx;
|
||||||
color: #aaaaaa;
|
color: #aaaaaa;
|
||||||
font-size: 27rpx;
|
font-size: 27rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.t-login .uni-input-placeholder {
|
.t-login .uni-input-placeholder {
|
||||||
color: #aeaeae;
|
color: #aeaeae;
|
||||||
}
|
}
|
||||||
|
|
||||||
.cl {
|
.cl {
|
||||||
zoom: 1;
|
zoom: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
.cl:after {
|
.cl:after {
|
||||||
clear: both;
|
clear: both;
|
||||||
display: block;
|
display: block;
|
||||||
visibility: hidden;
|
visibility: hidden;
|
||||||
height: 0;
|
height: 0;
|
||||||
content: '\20';
|
content: '\20';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@
|
||||||
<view class="top-title-box">
|
<view class="top-title-box">
|
||||||
<view class="title">账号列表</view>
|
<view class="title">账号列表</view>
|
||||||
<view class="handle-option">
|
<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>
|
@click="addBtn()" type="primary">新增</u-button>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
@ -127,9 +127,9 @@
|
||||||
<view class="popup-form-info">
|
<view class="popup-form-info">
|
||||||
<view class="top_box u-border-bottom">
|
<view class="top_box u-border-bottom">
|
||||||
<view class="handle-btns">
|
<view class="handle-btns">
|
||||||
<view class="btn_del" @click="deleteInfoId(formInfo.id)">删除</view>
|
<view v-auth="['endpoint.admin_users.destroy']" class="btn_del" @click="deleteInfoId(formInfo.id)">删除</view>
|
||||||
<view class="btn_edit" @click="editPwdPopup(formInfo.id)">修改密码</view>
|
<view v-auth="['endpoint.admin_users.edit_password']" class="btn_edit" @click="editPwdPopup(formInfo.id)">修改密码</view>
|
||||||
<view class="btn_edit" @click="editInfoId(formInfo.id)">编辑</view>
|
<view v-auth="['endpoint.admin_users.edit']" class="btn_edit" @click="editInfoId(formInfo.id)">编辑</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="section_c">
|
<view class="section_c">
|
||||||
|
|
@ -235,6 +235,7 @@
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import {showLoading,hideLoading} from '@/com/utils.js'
|
import {showLoading,hideLoading} from '@/com/utils.js'
|
||||||
|
import checkPermission from '@/utils/permission.js'
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
|
@ -242,20 +243,6 @@
|
||||||
page:1,
|
page:1,
|
||||||
list:[],
|
list:[],
|
||||||
loading:'loadmore',
|
loading:'loadmore',
|
||||||
options: [
|
|
||||||
{
|
|
||||||
text: '编辑',
|
|
||||||
style: {
|
|
||||||
backgroundColor: '#007aff'
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
text: '删除',
|
|
||||||
style: {
|
|
||||||
backgroundColor: '#dd524d'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
popupShow:false,
|
popupShow:false,
|
||||||
cindex:-1,//操作的索引
|
cindex:-1,//操作的索引
|
||||||
editShow:false,
|
editShow:false,
|
||||||
|
|
@ -324,6 +311,26 @@
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed:{
|
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(){
|
seletedShow(){
|
||||||
let arrName = [];
|
let arrName = [];
|
||||||
for(let item of this.seletedBaseList){
|
for(let item of this.seletedBaseList){
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
<u-navbar title="友情链接" :background="background" :custom-back="goback"
|
<u-navbar title="友情链接" :background="background" :custom-back="goback"
|
||||||
:title-color="titleColor" :back-icon-color="titleColor">
|
:title-color="titleColor" :back-icon-color="titleColor">
|
||||||
<view class="nav_slot_right_box" slot="right">
|
<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>
|
</view>
|
||||||
</u-navbar>
|
</u-navbar>
|
||||||
<u-sticky z-index="99">
|
<u-sticky z-index="99">
|
||||||
|
|
@ -164,8 +164,8 @@
|
||||||
<view class="popup-form-info">
|
<view class="popup-form-info">
|
||||||
<view class="top_box u-border-bottom">
|
<view class="top_box u-border-bottom">
|
||||||
<view class="handle-btns">
|
<view class="handle-btns">
|
||||||
<view class="btn_del" @click="deleteInfoId(formInfo.id)">删除</view>
|
<view v-auth="['endpoint.friend_links.destroy']" class="btn_del" @click="deleteInfoId(formInfo.id)">删除</view>
|
||||||
<view class="btn_edit" @click="editInfoId(formInfo.id)">编辑</view>
|
<view v-auth="['endpoint.friend_links.edit']" class="btn_edit" @click="editInfoId(formInfo.id)">编辑</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="section_c">
|
<view class="section_c">
|
||||||
|
|
@ -218,6 +218,7 @@
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import {formatDate,navigateBack,showLoading,hideLoading} from '@/com/utils.js'
|
import {formatDate,navigateBack,showLoading,hideLoading} from '@/com/utils.js'
|
||||||
|
import checkPermission from '@/utils/permission.js'
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
|
@ -229,20 +230,6 @@
|
||||||
page:1,
|
page:1,
|
||||||
list:[],
|
list:[],
|
||||||
loading:'loadmore',
|
loading:'loadmore',
|
||||||
options: [
|
|
||||||
{
|
|
||||||
text: '编辑',
|
|
||||||
style: {
|
|
||||||
backgroundColor: '#007aff'
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
text: '删除',
|
|
||||||
style: {
|
|
||||||
backgroundColor: '#dd524d'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
popupShow:false,
|
popupShow:false,
|
||||||
cindex:-1,//操作的索引
|
cindex:-1,//操作的索引
|
||||||
editShow:false,
|
editShow:false,
|
||||||
|
|
@ -287,6 +274,28 @@
|
||||||
dropDownShow:false,
|
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:{
|
filters:{
|
||||||
timeFormat(val){
|
timeFormat(val){
|
||||||
return formatDate(val*1000, 'yyyy-MM-dd hh:mm');
|
return formatDate(val*1000, 'yyyy-MM-dd hh:mm');
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@
|
||||||
<view class="top-title-box">
|
<view class="top-title-box">
|
||||||
<view class="title">角色列表</view>
|
<view class="title">角色列表</view>
|
||||||
<view class="handle-option">
|
<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>
|
@click="addBtn()" type="primary">新增</u-button>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
@ -82,8 +82,8 @@
|
||||||
<view class="popup-form-info">
|
<view class="popup-form-info">
|
||||||
<view class="top_box">
|
<view class="top_box">
|
||||||
<view class="handle-btns">
|
<view class="handle-btns">
|
||||||
<view class="btn_del" @click="deleteRoleId(info.id)">删除</view>
|
<view v-auth="['endpoint.admin_roles.destroy']" class="btn_del" @click="deleteRoleId(info.id)">删除</view>
|
||||||
<view class="btn_edit" @click="editRoleId(info.id)">编辑</view>
|
<view v-auth="['endpoint.admin_roles.edit']" class="btn_edit" @click="editRoleId(info.id)">编辑</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="section_c">
|
<view class="section_c">
|
||||||
|
|
@ -106,6 +106,7 @@
|
||||||
<script>
|
<script>
|
||||||
import DaTreeVue2 from '@/components/da-tree-vue2/index.vue'
|
import DaTreeVue2 from '@/components/da-tree-vue2/index.vue'
|
||||||
import {showLoading,hideLoading} from '@/com/utils.js'
|
import {showLoading,hideLoading} from '@/com/utils.js'
|
||||||
|
import checkPermission from '@/utils/permission.js'
|
||||||
export default {
|
export default {
|
||||||
components: { DaTreeVue2 },
|
components: { DaTreeVue2 },
|
||||||
data() {
|
data() {
|
||||||
|
|
@ -114,20 +115,6 @@
|
||||||
page:1,
|
page:1,
|
||||||
rolelist:[],
|
rolelist:[],
|
||||||
loading:'loadmore',
|
loading:'loadmore',
|
||||||
options: [
|
|
||||||
{
|
|
||||||
text: '编辑',
|
|
||||||
style: {
|
|
||||||
backgroundColor: '#007aff'
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
text: '删除',
|
|
||||||
style: {
|
|
||||||
backgroundColor: '#dd524d'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
popupShow:false,
|
popupShow:false,
|
||||||
info:{},//详情
|
info:{},//详情
|
||||||
cindex:-1,//操作的索引
|
cindex:-1,//操作的索引
|
||||||
|
|
@ -144,6 +131,28 @@
|
||||||
defaultCheckedKeysValue: [],
|
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() {
|
onLoad() {
|
||||||
this.queryAdminRoleList();
|
this.queryAdminRoleList();
|
||||||
this.queryPermissions();
|
this.queryPermissions();
|
||||||
|
|
|
||||||
|
|
@ -40,16 +40,16 @@
|
||||||
<view class="arrow_R"></view>
|
<view class="arrow_R"></view>
|
||||||
</view>
|
</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">
|
<view class="icon_img">
|
||||||
<u-icon name="man-add" size="46"></u-icon>
|
<u-icon name="man-add" size="46"></u-icon>
|
||||||
</view>
|
</view>
|
||||||
<view class="item-c">
|
<view class="item-c" >
|
||||||
<view class="tname">角色管理</view>
|
<view class="tname">角色管理</view>
|
||||||
<view class="arrow_R"></view>
|
<view class="arrow_R"></view>
|
||||||
</view>
|
</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">
|
<view class="icon_img">
|
||||||
<u-icon name="account" size="46"></u-icon>
|
<u-icon name="account" size="46"></u-icon>
|
||||||
</view>
|
</view>
|
||||||
|
|
@ -58,7 +58,7 @@
|
||||||
<view class="arrow_R"></view>
|
<view class="arrow_R"></view>
|
||||||
</view>
|
</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">
|
<view class="icon_img">
|
||||||
<u-icon name="clock" size="46"></u-icon>
|
<u-icon name="clock" size="46"></u-icon>
|
||||||
</view>
|
</view>
|
||||||
|
|
@ -67,7 +67,7 @@
|
||||||
<view class="arrow_R"></view>
|
<view class="arrow_R"></view>
|
||||||
</view>
|
</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">
|
<view class="icon_img">
|
||||||
<u-icon name="attach" size="46"></u-icon>
|
<u-icon name="attach" size="46"></u-icon>
|
||||||
</view>
|
</view>
|
||||||
|
|
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue