Browse Source

(+) 专家系统

master
liujiangyong 1 year ago
parent
commit
53adeb3104
  1. 3
      weapp/app.json
  2. BIN
      weapp/images/liuguoyong.jpg
  3. BIN
      weapp/images/yangwei.jpg
  4. 87
      weapp/package/expertSystem/expertSystem.js
  5. 7
      weapp/package/expertSystem/expertSystem.json
  6. 18
      weapp/package/expertSystem/expertSystem.wxml
  7. 36
      weapp/package/expertSystem/expertSystem.wxss
  8. 12
      weapp/pages/workbench/workbench.js

3
weapp/app.json

@ -28,7 +28,8 @@
"deviceBigdataGraph/deviceBigdataGraph", "deviceBigdataGraph/deviceBigdataGraph",
"deviceBigdataGraph/statusDetail/statusDetail", "deviceBigdataGraph/statusDetail/statusDetail",
"report/report", "report/report",
"deviceBigdataGraph/lifeWarning/lifeWarning" "deviceBigdataGraph/lifeWarning/lifeWarning",
"expertSystem/expertSystem"
] ]
} }
], ],

BIN
weapp/images/liuguoyong.jpg

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.3 KiB

BIN
weapp/images/yangwei.jpg

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.9 KiB

87
weapp/package/expertSystem/expertSystem.js

@ -0,0 +1,87 @@
// package/expertSystem/expertSystem.js
Page({
/**
* 页面的初始数据
*/
data: {
list: [
{
name: '刘国勇',
job: '信息化专家',
phone: '18170019996',
expertise: '信息化系统、物联网、结构监测',
img: '/images/liuguoyong.jpg',
},
{
name: '杨威',
job: '资深运维专家',
phone: '18888672373',
expertise: '系统运维、物联网',
img: '/images/yangwei.jpg',
},
]
},
toCall(e) {
wx.makePhoneCall({
phoneNumber: e.currentTarget.dataset.phone,
})
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
}
})

7
weapp/package/expertSystem/expertSystem.json

@ -0,0 +1,7 @@
{
"navigationBarBackgroundColor": "#1979ff",
"navigationBarTextStyle": "white",
"navigationBarTitleText": "专家系统",
"enablePullDownRefresh": false,
"usingComponents": {}
}

18
weapp/package/expertSystem/expertSystem.wxml

@ -0,0 +1,18 @@
<!--package/expertSystem/expertSystem.wxml-->
<view class="page">
<view class="card flex flex-start" wx:for="{{list}}" wx:key="*this">
<!-- <view class="img" style="background-color: beige;"></view> -->
<image class="img" src="{{item.img}}" mode="aspectFit" />
<view class="right">
<view class="right-top flex flex-between">
<view class="name">{{item.name}}</view>
<button class="btn" size="mini" type="primary" bindtap="toCall" data-phone="{{item.phone}}">立即咨询</button>
</view>
<view class="right-bottom">
<view class="info">职务:{{item.job}}</view>
<view class="info">电话:{{item.phone}}</view>
<view class="info">专业领域:{{item.expertise}}</view>
</view>
</view>
</view>
</view>

36
weapp/package/expertSystem/expertSystem.wxss

@ -0,0 +1,36 @@
/* package/expertSystem/expertSystem.wxss */
.page {
padding-bottom: 30px;
}
.card {
box-sizing: border-box;
width: 100%;
height: 100%;
background-color: #fff;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
border-radius: 5px;
overflow: hidden;
margin-top: 10px;
padding: 10px;
}
.img {
width: 100px;
height: 100px;
margin-right: 10px;
}
.right {
width: calc(100% - 110px);
}
.btn {
background-color: #1979ff !important;
margin: 0;
}
.info {
font-size: 14px;
color: #333;
}

12
weapp/pages/workbench/workbench.js

@ -19,12 +19,12 @@ Page({
{ {
iconPath: '/images/workbench/diagnosis.png', iconPath: '/images/workbench/diagnosis.png',
text: '智能诊断', text: '智能诊断',
page: '/package/riskManagement/riskManagement' page: '开发中'
}, },
{ {
iconPath: '/images/workbench/expert_systems.png', iconPath: '/images/workbench/expert_systems.png',
text: '专家系统', text: '专家系统',
page: '/package/riskManagement/riskManagement' page: '/package/expertSystem/expertSystem'
}, },
{ {
iconPath: '/images/workbench/report.png', iconPath: '/images/workbench/report.png',
@ -40,6 +40,14 @@ Page({
}, },
navigator(e) { navigator(e) {
if (e.currentTarget.dataset.page === '开发中') {
wx.showToast({
title: '此模块开发中,敬请期待',
icon: 'none',
duration: 2000
})
return;
}
wx.navigateTo({ wx.navigateTo({
url: e.currentTarget.dataset.page, url: e.currentTarget.dataset.page,
}) })

Loading…
Cancel
Save