问题反馈修改

This commit is contained in:
仲么了
2023-08-29 16:14:09 +08:00
parent 7c79eddc05
commit 38b827af46
23 changed files with 330 additions and 144 deletions

View File

@@ -94,3 +94,16 @@ export function updateChatStatus(params) {
},
});
}
/**
* 更新反馈状态
*/
export function updateFeedBackStatus(params) {
console.log(params);
return request({
url: '/cs-system-boot/feedback/auditFeedBack',
method: 'post',
data: params,
});
}

View File

@@ -41,7 +41,7 @@ export const queryAppInfoByType = (type) => {
export const queryUserPushConfig = () => {
return request({
url: '/cs-system-boot/appInfoSet/queryByUserId',
url: '/user-boot/appInfoSet/queryByUserId',
method: 'post',
header: {
'Content-Type': 'application/json',
@@ -56,7 +56,7 @@ export const queryUserPushConfig = () => {
export const updatePushConfig = (params) => {
return request({
url: '/cs-system-boot/appInfoSet/update',
url: '/user-boot/appInfoSet/update',
method: 'post',
header: {
'Content-Type': 'application/json',

View File

@@ -38,7 +38,9 @@ export default (options = {}) => {
success: async (res) => {
console.log(res)
if (arr.indexOf(options.url) > -1) {
setTimeout(() => {
arr.splice(arr.indexOf(options.url), 1)
}, 300)
}
if (res.data.resultCode !== 10000 && res.data.code !== 'A0000') {
errHandler(res.data)
@@ -49,7 +51,9 @@ export default (options = {}) => {
},
fail: (err) => {
if (arr.indexOf(options.url) > -1) {
setTimeout(() => {
arr.splice(arr.indexOf(options.url), 1)
}, 300)
}
reject(err)
uni.showToast({

View File

@@ -1,9 +1,10 @@
import request from './request'
import cache from './cacheKey.js'
import { getImageUrl } from '@/common/api/basic'
import { apiUpdatePush } from '@/common/api/user'
import { queryDictDataCache } from '../api/dictionary.js'
import {getImageUrl} from '@/common/api/basic'
import {apiUpdatePush} from '@/common/api/user'
import {queryDictDataCache} from '../api/dictionary.js'
import cacheKey from './cacheKey.js'
const toast = (title, duration = 1500, call, mask = false, icon = 'none') => {
if (Boolean(title) === false) {
return
@@ -18,6 +19,7 @@ const toast = (title, duration = 1500, call, mask = false, icon = 'none') => {
call && call()
}, duration)
}
/**
* @description 格式化时间
* @param time
@@ -101,6 +103,7 @@ function formatTime(time, option) {
)
}
}
const h5Helper = {
isAndroid: function () {
return window.navigator.appVersion.toLowerCase().indexOf('android') != -1
@@ -210,6 +213,7 @@ const loginSuccess = (data, jump = true) => {
console.log(escape, atob)
var userInfo = JSON.parse(decodeURIComponent(escape(atob(strings[1].replace(/-/g, '+').replace(/_/g, '/')))))
userInfo.authorities = userInfo.authorities[0]
uni.setStorageSync(cache.userInfo, userInfo)
if (userInfo.headSculpture) {
getImageUrl(userInfo.headSculpture).then((res) => {
userInfo.avatar = res.data
@@ -226,13 +230,13 @@ const loginSuccess = (data, jump = true) => {
if (jump) {
queryDictDataCache().then((res) => {
uni.setStorageSync(cacheKey.dictData, res.data)
})
uni.reLaunch({
url: '/pages/index/index',
fail: (err) => {
console.log(err)
},
})
})
}
})
}
@@ -245,7 +249,7 @@ const refreshPrePage = (number = 1, time = 1500) => {
let pages = getCurrentPages()
let prePage = pages[pages.length - number - 1]
if (prePage && time) {
prePage.$vm.store.reload()
prePage.$vm.store?.reload()
setTimeout(() => {
uni.navigateBack({
delta: number,

View File

@@ -2,8 +2,8 @@
"name" : "灿能物联",
"appid" : "__UNI__88BC25B",
"description" : "",
"versionName" : "1.1.5",
"versionCode" : 115,
"versionName" : "1.1.6",
"versionCode" : 116,
"transformPx" : false,
/* 5+App */
"app-plus" : {

View File

@@ -144,10 +144,10 @@ export default {
iconPath: '/static/report.png',
text: '告警',
},
{
iconPath: '/static/record.png',
text: '记录',
},
// {
// iconPath: '/static/record.png',
// text: '记录',
// },
{
iconPath: '/static/about.png',
text: '关于',
@@ -208,7 +208,7 @@ export default {
trigger(e) {
console.log(e)
if (e.item.text === '分享') {
this.$refs.share.open()
uni.navigateTo({url: '/pages/device/share?id=' + this.devId})
} else if (e.item.text === '删除') {
uni.showModal({
title: '提示',

View File

@@ -111,8 +111,8 @@
<view class="content-des">请拖动图中的蓝色定位图标选择监测点位置(左上角)</view>
<uni-forms>
<uni-data-select
v-model="point.position"
:localdata="positionListRange"
v-model="point.linePostion"
:localdata="positionList"
@change="positionChange"
></uni-data-select>
<uni-easyinput
@@ -159,16 +159,6 @@ export default {
deviceInfo: {},
}
},
computed:{
positionListRange(){
return this.positionList.map(item => {
return {
...item,
disable: this.point.linePostion !== item.id && this.pointList.some(item2 => item2.linePostion === item.id)
}
})
}
},
onLoad(options) {
this.deviceInfo = JSON.parse(decodeURIComponent(options.deviceInfo))
console.log(this.deviceInfo)
@@ -178,7 +168,6 @@ export default {
return {
...item,
name: item.label,
position: item.linePostion,
}
})
console.log(this.pointList, 'this.poinitList')
@@ -224,10 +213,9 @@ export default {
this.formData.topologyDiagramUrl = this.imageList[this.activeGplot].filePath
this.formData.topologyDiagram = this.imageList[this.activeGplot].id
this.pointList.forEach((item) => {
console.log(item.position)
this.imageList[this.activeGplot].csLineTopologyTemplateVOList.forEach((item3) => {
console.log(item3.linePostion)
if (item3.linePostion === item.position) {
if (item3.linePostion === item.linePostion) {
item.lat = item3.lat
item.lng = item3.lng
}
@@ -311,7 +299,7 @@ export default {
this.$refs.point.open()
},
addPoint() {
if (!this.point.position) {
if (!this.point.linePostion) {
this.$util.toast('请选择监测点')
return
}
@@ -319,13 +307,15 @@ export default {
this.point.name = this.point.alias
} else {
this.positionList.forEach((item) => {
if (item.id == this.point.position) {
if (item.id === this.point.linePostion) {
this.point.name = item.name
}
})
}
if (this.point.coordinate) {
this.point.lat = this.point.coordinate.x
this.point.lng = this.point.coordinate.y
}
this.pointList[this.editIndex] = this.point
console.log(this.pointList)
this.closeDrawer()
@@ -360,6 +350,16 @@ export default {
// this.point.lng = e.detail.y
},
submit() {
// 检查pointLlist监测点是否重复并给出提示
let arr = []
this.pointList.forEach((item) => {
arr.push(item.linePostion)
})
let set = new Set(arr)
if (set.size !== arr.length) {
this.$util.toast('监测点不能重复')
return
}
updateDevice({
pointList: this.pointList,
id: this.imageList[this.activeGplot].id

View File

@@ -45,24 +45,24 @@
<uni-data-select v-model="formData.type" :localdata="typeRange"
@change="typeChange(item)"></uni-data-select>
</uni-forms-item> -->
<!-- <uni-forms-item label="位置">-->
<!-- <view style="display: flex;">-->
<!-- <uni-easyinput-->
<!-- :clearable="false"-->
<!-- type="textarea"-->
<!-- autoHeight-->
<!-- v-model="formData.area"-->
<!-- placeholder="请输入位置信息"-->
<!-- />-->
<!-- <uni-icons-->
<!-- type="location"-->
<!-- color="#007aff"-->
<!-- size="26"-->
<!-- class="ml20"-->
<!-- @click="chooseLocation"-->
<!-- ></uni-icons>-->
<!-- </view>-->
<!-- </uni-forms-item>-->
<!-- <uni-forms-item label="位置">-->
<!-- <view style="display: flex;">-->
<!-- <uni-easyinput-->
<!-- :clearable="false"-->
<!-- type="textarea"-->
<!-- autoHeight-->
<!-- v-model="formData.area"-->
<!-- placeholder="请输入位置信息"-->
<!-- />-->
<!-- <uni-icons-->
<!-- type="location"-->
<!-- color="#007aff"-->
<!-- size="26"-->
<!-- class="ml20"-->
<!-- @click="chooseLocation"-->
<!-- ></uni-icons>-->
<!-- </view>-->
<!-- </uni-forms-item>-->
<uni-forms-item label="拓扑图" v-if="formData.projectId">
<view style="display: flex">
<view style="flex: 1">
@@ -111,7 +111,8 @@
v-for="(item, key) in imageList"
:key="key"
/>
<view v-if="imageList.length === 0" style="text-align: center" class="mt50 mb50">暂无拓扑图</view>
<view v-if="imageList.length === 0" style="text-align: center" class="mt50 mb50">暂无拓扑图
</view>
<view class="btn-wrap">
<view class="btn-wrap-item" @click="closeDrawer"> 取消</view>
<view class="btn-wrap-item ml20" @click="confirmGplot"> 确定</view>
@@ -139,7 +140,7 @@
<uni-forms>
<uni-data-select
v-model="point.position"
:localdata="positionListRange"
:localdata="positionList"
@change="positionChange"
></uni-data-select>
<uni-easyinput
@@ -183,16 +184,20 @@ export default {
positionList: [],
imageList: [],
isAdaptive: false, // 是否适应当前项目
dialogOpen: false
}
},
computed:{
positionListRange(){
return this.positionList.map(item => {
return {
...item,
disable: this.point.linePostion !== item.id && this.pointList.some(item2 => item2.linePostion === item.id)
}
})
onBackPress() {
if (this.dialogOpen) {
this.closeDrawer()
return true
} else if (this.type === 3) {
return false
} else if (this.type === 2) {
this.type = 1
return true
} else {
return false
}
},
onLoad() {
@@ -287,7 +292,7 @@ export default {
},
scanCode() {
uni.scanCode({
success (res) {
success(res) {
console.log('条码类型:' + res.scanType)
console.log('条码内容:' + res.result)
let content = JSON.parse(res.result)
@@ -329,10 +334,12 @@ export default {
},
chooseGplot() {
this.$refs.gplot.open()
this.dialogOpen = true
},
closeDrawer() {
this.$refs.gplot.close()
this.$refs.point.close()
this.dialogOpen = false
},
add() {
this.$refs.point.open()
@@ -351,8 +358,10 @@ export default {
}
})
}
if (this.point.coordinate) {
this.point.lat = this.point.coordinate.x
this.point.lng = this.point.coordinate.y
}
this.pointList[this.editIndex] = this.point
console.log(this.pointList)
this.closeDrawer()
@@ -373,6 +382,7 @@ export default {
this.point.alias = ''
}
}
this.dialogOpen = true
this.$refs.point.open()
this.$forceUpdate()
},
@@ -392,6 +402,16 @@ export default {
if (!this.formData.topologyDiagram) {
return this.$util.toast('请选择拓扑图')
}
// 检查pointLlist监测点是否重复并给出提示
let arr = []
this.pointList.forEach((item) => {
arr.push(item.position)
})
let set = new Set(arr)
if (set.size !== arr.length) {
this.$util.toast('监测点不能重复')
return
}
addDevice({
...this.formData,
list: this.pointList,
@@ -400,6 +420,7 @@ export default {
console.log(res)
this.$util.toast('提交成功')
setTimeout(() => {
this.type = 3
uni.navigateBack({delta: 1})
}, 1500)
})

View File

@@ -22,11 +22,11 @@
>{{ item.text }}
</view>
</view>
<view class="content device" :style="{ minHeight: 'calc(100vh - ' + navHeight + 'px)' }">
<view class="content" :style="{ minHeight: 'calc(100vh - ' + navHeight + 'px)' }">
<view v-show="navMenuActive == 0">
<uni-card
:title="item.name"
:extra="item.mac"
extra="🔍"
@click="jumpProject(item)"
v-for="(item, index) in store.data"
:key="index"

View File

@@ -22,7 +22,7 @@
<view class="message">
<uni-card
:title="item.name"
:extra="item.mac"
extra="🔍"
@click="jump(item)"
v-for="(item, index) in store.data"
:style="{marginTop:index===0?'0':''}"
@@ -39,7 +39,7 @@
</view>
</view>
</uni-card>
<Cn-empty v-if="store.empty" style="padding-top: 200rpx"></Cn-empty>
<Cn-empty v-if="store.empty" style="padding-top: 400rpx"></Cn-empty>
<uni-load-more v-if="store.data && store.data.length > 0" :status="store.status"></uni-load-more>
</view>
</view>

View File

@@ -23,7 +23,7 @@
<uni-easyinput
type="textarea"
autoHeight
maxlength="250"
maxlength="999"
v-model="formData.description"
placeholder="请输入工程描述"
/>
@@ -72,14 +72,9 @@ export default {
this.formData.id = this.engineering.id
uni.setNavigationBarTitle({title: '工程编辑'})
}
uni.getLocation({
type: 'wgs84',
success: function (res) {
console.log(res)
console.log('当前位置的经度:' + res.longitude)
console.log('当前位置的纬度:' + res.latitude)
},
})
if(options.from === 'index'){
this.$util.toast('请先创建一个工程')
}
// console.log(area);
console.log(this.$util.prePage())
},

View File

@@ -103,7 +103,7 @@ export default {
},
onLoad(options) {
this.formData.userId = uni.getStorageSync('userInfo').userIndex
this.formData.engineeringId = uni.getStorageSync('engineering').engineeringId
this.formData.engineeringId = uni.getStorageSync('engineering').id
}
}
</script>

View File

@@ -19,7 +19,8 @@ export default {
data() {
return {
loading: false,
engineeringList: []
engineeringList: [],
options: {}
}
},
computed: {
@@ -42,7 +43,8 @@ export default {
return result
},
},
onLoad() {
onLoad(options) {
this.options = options
this.engineeringList = uni.getStorageSync('engineeringList')
},
onShow() {
@@ -51,7 +53,7 @@ export default {
})
},
onNavigationBarButtonTap(e) {
uni.redirectTo({
uni.navigateTo({
url: '/pages/engineering/new',
})
},
@@ -59,7 +61,12 @@ export default {
confirm(e) {
console.log(e)
let engineering = this.engineeringList.find((item) => item.name === e.item.name)
if (this.options.from === 'projectNew') {
// 创建项目的时候选择工程 用完即删
uni.setStorageSync('projectSelectEngineering', engineering)
} else {
uni.setStorageSync('engineering', engineering)
}
uni.navigateBack()
},
}

View File

@@ -23,7 +23,7 @@
<view class="header-item-value">{{ devCount.eventCount || 0 }}</view>
<view class="header-item-label">事件数量</view>
</view>
<view class="header-item">
<view class="header-item" @click="projectNum(false)">
<view class="header-item-value">{{ devCount.projectCount || 0 }}</view>
<view class="header-item-label">项目个数</view>
</view>
@@ -35,7 +35,8 @@
<view class="header-item">
<view class="header-item-value">{{
devCount.currentOnLineDevCount + devCount.currentOffLineDevCount || 0
}}</view>
}}
</view>
<view class="header-item-label">设备总数</view>
</view>
<view class="header-item" @click="jump('currentOnLineDevs')">
@@ -54,7 +55,7 @@
<view class="header-item-value">{{ devCount.currentEventCount || 0 }}</view>
<view class="header-item-label">事件数量</view>
</view>
<view class="header-item" @click="projectNum">
<view class="header-item" @click="projectNum(true)">
<view class="header-item-value">{{ devCount.currentProjectCount || 0 }}</view>
<view class="header-item-label">项目个数</view>
</view>
@@ -80,10 +81,18 @@ export default {
url: '/pages/zhuanzhi/warning',
})
},
projectNum() {
projectNum(now) {
console.log(now)
if (now) {
let engineering = uni.getStorageSync('engineering')
uni.navigateTo({
url: '/pages/project/list?engineeringName=' + engineering.name + '&engineeringId=' + engineering.id,
})
} else {
uni.navigateTo({
url: '/pages/project/list',
})
}
},
jump(type) {
switch (type) {
@@ -99,7 +108,8 @@ export default {
}
},
},
created() {},
created() {
},
}
</script>
<style lang="scss">

View File

@@ -16,7 +16,7 @@
</template>
<template slot="right">
<text class="hide-txt mr5" style="font-size: 28rpx">{{
select.engineeringName || '创建工程'
select.engineeringName || emptyEngineeringName
}}
</text>
<uni-icons type="bottom" size="16" color="#111" v-if="select.engineeringName"></uni-icons>
@@ -74,7 +74,17 @@ export default {
navTabHeight: 0
}
},
computed: {
emptyEngineeringName() {
if (this.userInfo.authorities === 'tourist') {
return '创建工程'
} else if (this.userInfo.authorities === 'market_user') {
return '请联系管理员配置工程'
} else {
return '创建工程'
}
}
},
methods: {
selectEngineering() {
if (this.select.engineeringName) {
@@ -82,6 +92,17 @@ export default {
url: '/pages/home/selectEngineering',
})
} else {
if(this.userInfo.authorities === 'tourist'){
return uni.showToast({
title: '此功能仅对VIP用户开放',
icon: 'none',
})
}else if(this.userInfo.authorities === 'market_user'){
return uni.showToast({
title: '请联系管理员配置工程',
icon: 'none',
})
}
uni.navigateTo({
url: '/pages/engineering/new',
})
@@ -95,6 +116,8 @@ export default {
if (this.engineeringList.length === 0) {
console.log('没有工程')
uni.removeStorageSync(this.$cacheKey.engineering)
this.select.engineeringName = ''
this.select.engineeringId = ''
this.projectList = []
} else {
if (!engineering) {

View File

@@ -1,16 +1,28 @@
<template>
<view class="content">
<uni-list :border="false">
<uni-list-item :show-badge="item.chatCount > 0" badgeType="error" isDot badge-text="新消息" :title="item.title"
:note="item.createTime" clickable v-for="(item, index) in store.data" :key="index" @click="jump(item)" />
</uni-list>
<view class="message-list">
<view class="message-list-item" v-for="(item, index) in store.data" :key="index" @click="jump(item)">
<view class="hide-txt message-list-item-title">{{ item.title }}</view>
<view class="message-list-item-footer">
<view class="mr20 message-list-item-footer-status message-list-item-footer-status-close" v-if="item.status === '0'">
已关闭
</view>
<view class="mr20 message-list-item-footer-status message-list-item-footer-status-processing" v-else-if="item.status === '1'">
待处理
</view>
<view class="mr20 message-list-item-footer-status message-list-item-footer-status-over" v-else-if="item.status === '2'">
已解决
</view>
<view class="message-list-item-footer-time"> {{ item.createTime }}</view>
<uni-badge class="uni-badge-left-margin" :text="item.chatCount"/>
</view>
</view>
<Cn-empty v-if="store.empty"></Cn-empty>
<uni-load-more v-if="store.data && store.data.length > 0" :status="store.status"></uni-load-more>
</view>
</template>
<script>
import { queryFeedBackPage } from '../../common/api/feedback'
import {queryFeedBackPage} from '../../common/api/feedback'
import list from '../../common/js/list'
export default {
@@ -29,15 +41,59 @@ export default {
this.store.reload()
},
jump(item) {
uni.navigateTo({ url: '/pages/message/feedbackDetail?id=' + item.id +'&chatCount=' + item.chatCount })
}
uni.navigateTo({url: '/pages/message/feedbackDetail?id=' + item.id + '&chatCount=' + item.chatCount})
},
}
}
</script>
<style lang="scss">
.content {
.message-list {
padding-top: 20rpx;
.message-list-item {
padding: 28rpx;
background: #fff;
border-bottom: 1rpx solid #ddd;
&-title {
font-size: 28rpx;
color: #3b4144;
}
.message-list-item-footer {
margin-top: 8rpx;
display: flex;
align-items: center;
&-time{
margin-right: 20rpx;
flex: 1;
color: #999;
font-size: 12px;
}
&-status {
padding: 4rpx 12rpx;
font-size: 24rpx;
border-radius: 4rpx;
&-over {
background-color: #f0f9eb;
border-color: #e1f3d8;
color: #67c23a;
}
&-close {
background-color: #f4f4f5;
border-color: #e9e9eb;
color: #909399;
}
&-processing {
background-color: #fdf6ec;
border-color: #faecd8;
color: #e6a23c;
}
}
}
}
}
@@ -45,9 +101,21 @@ export default {
background-color: $uni-theme-white !important;
}
/deep/ .uni-badge {
background-color: unset !important;
color: #dd524d !important;
font-size: 28rpx !important;
.list-footer {
display: flex;
flex-direction: column;
justify-content: space-between;
&-status {
flex: 1;
color: #999;
font-size: 24rpx;
}
}
///deep/ .uni-badge {
// background-color: unset !important;
// color: #dd524d !important;
// font-size: 28rpx !important;
//}
</style>

View File

@@ -6,22 +6,31 @@
<view class="detail-content-title mb20">{{ pageData.title }}</view>
<view> {{ pageData.createTime }}</view>
<view class="mt10 mb10">{{ pageData.description }}</view>
<uni-file-picker readonly v-model="imageValue" mode="grid" />
<uni-file-picker readonly v-model="imageValue" mode="grid"/>
</view>
<view class="detail-content " style="margin-bottom:0">
<view class="detail-content-title ">
<view class="title">回复</view>
<view class="title-btn" @click="open">新增</view>
<view class="title">消息列表</view>
<template v-if="pageData.status === '1'">
<view class="title-btn mr10" @click="updateFeedBackStatus('2')">解决</view>
<view class="title-btn mr10" @click="updateFeedBackStatus('0')">关闭</view>
</template>
<template v-if="pageData.status === '2'">
<view class="title-btn mr10" @click="updateFeedBackStatus('0')">关闭</view>
</template>
<view class="title-btn" @click="open">回复</view>
</view>
</view>
<uni-list>
<uni-list-item :title="item.userName" :note="item.chatContent" :rightText="item.createTime"
v-for="(item, index) in pageData.csFeedbackChatPOList" :key="index" />
<Cn-empty v-if="pageData.csFeedbackChatPOList && pageData.csFeedbackChatPOList.length == 0"></Cn-empty>
v-for="(item, index) in pageData.csFeedbackChatPOList" :key="index"/>
<Cn-empty
v-if="pageData.csFeedbackChatPOList && pageData.csFeedbackChatPOList.length == 0"></Cn-empty>
</uni-list>
<!-- 输入框示例 -->
<uni-popup ref="inputDialog" type="dialog">
<uni-popup-dialog ref="inputClose" type="info" mode="input" title="输入内容" value="对话框预置提示内容!"
<uni-popup-dialog ref="inputClose" type="info" mode="input" title="输入内容"
value="对话框预置提示内容!"
placeholder="请输入内容" @confirm="dialogInputConfirm">
<uni-easyinput type="textarea" :maxlength="250" autoHeight v-model="chatContent"
placeholder="请输入内容"></uni-easyinput>
@@ -32,7 +41,8 @@
</Cn-page>
</template>
<script>
import { queryFeedBackDetail, AddFeedbackChat, updateChatStatus } from '../../common/api/feedback'
import {queryFeedBackDetail, AddFeedbackChat, updateChatStatus, updateFeedBackStatus} from '../../common/api/feedback'
export default {
data() {
return {
@@ -45,8 +55,7 @@ export default {
"url": "/static/logo.png",
}
],
pageData: {
},
pageData: {},
pageOption: {}
}
},
@@ -60,6 +69,14 @@ export default {
}
},
methods: {
updateFeedBackStatus(status) {
updateFeedBackStatus({
id: this.pageOption.id,
status: status
}).then(res => {
this.init()
})
},
init() {
this.loading = true
queryFeedBackDetail(this.pageOption.id).then(res => {
@@ -78,7 +95,7 @@ export default {
})
},
dialogInputConfirm() {
AddFeedbackChat({ chatContent: this.chatContent, id: this.pageOption.id }).then(res => {
AddFeedbackChat({chatContent: this.chatContent, id: this.pageOption.id}).then(res => {
console.log(res);
this.$util.toast('回复成功')
this.init()
@@ -87,13 +104,17 @@ export default {
},
open() {
this.$refs.inputDialog.open()
}
},
over() {
},
close() {
},
}
}
</script>
<style lang='scss'>
.detail {
padding: 20rpx 0;
padding: 0 0 20rpx;
.detail-content {
padding: 20rpx 30rpx;

View File

@@ -3,19 +3,19 @@
<view class="mine" slot="body">
<view class="mine-nav" style="margin-top: 20rpx">
<view class="mine-nav-label">稳态越限</view>
<switch color="#376cf3" @change="change('dataInfo')" :checked="config.dataInfo === 1"/>
<switch style="transform: scale(0.8)" color="#376cf3" @change="change('dataInfo')" :checked="config.dataInfo === 1"/>
</view>
<view class="mine-nav" style="border-bottom: none">
<view class="mine-nav-label">暂态事件</view>
<switch color="#376cf3" @change="change('eventInfo')" :checked="config.eventInfo === 1"/>
<switch style="transform: scale(0.8)" color="#376cf3" @change="change('eventInfo')" :checked="config.eventInfo === 1"/>
</view>
<view class="mine-nav" style="border-bottom: none">
<view class="mine-nav-label">设备状态</view>
<switch color="#376cf3" @change="change('deviceInfo')" :checked="config.deviceInfo === 1"/>
<switch style="transform: scale(0.8)" color="#376cf3" @change="change('deviceInfo')" :checked="config.deviceInfo === 1"/>
</view>
<view class="mine-nav" style="border-bottom: none">
<view class="mine-nav-label">设备消息</view>
<switch color="#376cf3" @change="change('systemInfo')" :checked="config.systemInfo === 1"/>
<switch style="transform: scale(0.8)" color="#376cf3" @change="change('systemInfo')" :checked="config.systemInfo === 1"/>
</view>
</view>
</Cn-page>

View File

@@ -17,6 +17,7 @@
@input="store.search()"></uni-search-bar>
<view class="message">
<uni-card :title="item.name" @click="jump(item)"
extra="🔍"
v-for="(item, index) in store.data" :key="index"
:style="{marginTop:index===0?'0':''}">
<view class="term-list-bottom">
@@ -30,7 +31,7 @@
</view>
</view>
</uni-card>
<Cn-empty v-if="store.empty" style="padding-top: 200px"></Cn-empty>
<Cn-empty v-if="store.empty" style="padding-top: 400rpx"></Cn-empty>
<uni-load-more v-if="store.data && store.data.length > 0" :status="store.status"></uni-load-more>
</view>
</view>
@@ -48,10 +49,11 @@ export default {
}
},
methods: {
init() {
init(engineeringId) {
this.userInfo = uni.getStorageSync(this.$cacheKey.userInfo)
this.store = this.DataSource('/cs-device-boot/project/queryProject')
this.store.params.searchValue = ''
this.store.params.engineeringId = engineeringId || ''
this.store.reload()
},
back() {
@@ -84,8 +86,8 @@ export default {
})
},
},
onLoad() {
this.init()
onLoad({engineeringId}) {
this.init(engineeringId)
},
}
</script>

View File

@@ -7,7 +7,7 @@
<uni-forms-item label="工程名称" @click.native.stop.prevent="selectEngineering">
<uni-easyinput
v-model="formData.engineeringName"
placeholder="请输入项目名称"
placeholder="请选择工程"
:clearable="false"
:disabled="true"
/>
@@ -37,6 +37,7 @@
<uni-easyinput
type="textarea"
autoHeight
maxlength="999"
v-model="formData.description"
placeholder="请输入项目描述"
/>
@@ -127,10 +128,13 @@ export default {
},
onShow() {
if (!this.options.project) {
let engineering = uni.getStorageSync(this.$cacheKey.engineering)
let engineering = uni.getStorageSync('projectSelectEngineering')
if (engineering) {
uni.removeStorageSync('projectSelectEngineering')
this.formData.engineeringId = engineering.id
this.formData.engineeringName = engineering.name
}
}
},
onLoad(options) {
this.options = options
@@ -145,6 +149,10 @@ export default {
this.formData[key] = this.project[key]
}
}
} else {
let engineering = uni.getStorageSync('engineering')
this.formData.engineeringId = engineering.id
this.formData.engineeringName = engineering.name
}
uni.getLocation({
type: 'wgs84',
@@ -175,9 +183,10 @@ export default {
},
methods: {
selectEngineering() {
if (this.options.project) return
console.log(123)
if (this.options.project) return this.$util.toast('项目已经创建,不能修改工程')
uni.navigateTo({
url: '/pages/home/selectEngineering',
url: '/pages/home/selectEngineering?from=projectNew',
})
},
beforeRemove(e) {
@@ -322,11 +331,14 @@ export default {
background: #fff !important;
color: #111;
}
.new {
padding: 34rpx;
.project-new{
.project-new {
}
.content {
.content-des {
font-size: 28rpx;

View File

@@ -232,7 +232,6 @@ export default {
overflow: hidden;
.login-box-logo {
background: $uni-theme-color;
height: 100rpx;
width: 100rpx;
margin: 0 auto;

7
readme
View File

@@ -3,6 +3,13 @@
营销用户
13888888888
VIP用户
13764779092
13333333333
运维管理元
njcnyw
1.工程用户 1899999999
2.营销用户 1888888888
3.VIP用户 187777777777
4.运维管理元 18666666666

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.7 KiB

After

Width:  |  Height:  |  Size: 25 KiB