Browse Source

子组件少事件

data-paga-xiaowang
mk 2 years ago
parent
commit
ab4b69e993
  1. BIN
      images/index/bg_center.png
  2. BIN
      images/morenews/clearnews.png
  3. BIN
      images/morenews/read.png
  4. 2
      pages/index/index.wxml
  5. 20
      subpages/searchResult/pages/resiInfo/component/graph/graph.js
  6. 4
      subpages/searchResult/pages/resiInfo/resiInfo.wxml
  7. 4
      utils/config.js

BIN
images/index/bg_center.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 340 KiB

BIN
images/morenews/clearnews.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 134 KiB

BIN
images/morenews/read.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

2
pages/index/index.wxml

@ -7,7 +7,7 @@
</view> </view>
</view> </view>
<view class="text-wrapper_8"> <view class="text-wrapper_8">
<image src="../../images/index/bg_center.png" class="bg-image"/> <image src="https://elink-esua-epdc.oss-cn-qingdao.aliyuncs.com/epmet/test/internal/20240412/bca77e0435014a4680679c2c77d4fa50.png" class="bg-image"/>
<text lines="1" class="text_30">数字化社区平台</text> <text lines="1" class="text_30">数字化社区平台</text>
<text lines="1" class="paragraph_1">打造社区工作新模式<br/>用数据提升基层治理与服务水平</text> <text lines="1" class="paragraph_1">打造社区工作新模式<br/>用数据提升基层治理与服务水平</text>

20
subpages/searchResult/pages/resiInfo/component/graph/graph.js

@ -3,16 +3,14 @@ import {
getFamilyRelationshipList getFamilyRelationshipList
} from "../../../../../../utils/api"; } from "../../../../../../utils/api";
var chart; var chart;
const formatNumber = n => {
n = n.toString()
return n[1] ? n : '0' + n
}
Component({ Component({
properties: { properties: {
resiId: { resiId: {
type: String, type: String,
value: '', value: '',
observer(val) {
this.getData()
}
} }
}, },
data: { data: {
@ -20,13 +18,7 @@ Component({
lazyLoad: true lazyLoad: true
// onInit: initChart // onInit: initChart
}, },
tabList: [{
label: "问题突出类别",
value: 1
}, {
label: '行业领域分析',
value: 2
}],
tabValue: 1 tabValue: 1
}, },
lifetimes: { lifetimes: {
@ -46,10 +38,8 @@ Component({
let than = this let than = this
chart.on('click', function (param) { chart.on('click', function (param) {
if (param.dataType == 'node') { if (param.dataType == 'node') {
console.log('点击了节点',param)
than.triggerEvent('clickGraphNode', {data: param.data.data }); than.triggerEvent('clickGraphNode', {data: param.data.data });
} else { } else {
console.log('点击了边',param)
} }
}) })
canvas.setChart(chart); canvas.setChart(chart);
@ -57,7 +47,6 @@ Component({
type: "0", type: "0",
id: this.data.resiId id: this.data.resiId
} }
getFamilyRelationshipList(params).then(({ getFamilyRelationshipList(params).then(({
data data
}) => { }) => {
@ -132,7 +121,6 @@ Component({
}, },
})) }))
var option = { var option = {
legend: [{ legend: [{

4
subpages/searchResult/pages/resiInfo/resiInfo.wxml

@ -130,7 +130,7 @@
<view class="item"> <view class="item">
<view class="label">户籍所在地:</view> <view class="label">户籍所在地:</view>
<View class="value"> {{ item.placeOfDomicile === 'null'?'--':item.placeOfDomicile}}</View> <View class="value"> {{ item.placeOfDomicile?item.placeOfDomicile:'--'}}</View>
</view> </view>
<view class="item"> <view class="item">
<text class="must">*</text> <text class="must">*</text>
@ -301,7 +301,7 @@
</view> </view>
<view class="card" id="graph"> <view class="card" id="graph">
<view class="title">关系图谱</view> <view class="title">关系图谱</view>
<resi-graph resiId="{{resiId}}" bind:clickGraphNode="clickGraphNode"></resi-graph> <resi-graph resiId="{{resiId}}" bind:clickGraphNode="clickGraphNode" wx:if="{{resiId}}"></resi-graph>
</view> </view>
<!-- 走访打卡 --> <!-- 走访打卡 -->

4
utils/config.js

@ -5,9 +5,9 @@ module.exports = {
}; };
function BASEURL() { function BASEURL() {
// return 'https://epmet-preview.elinkservice.cn/api/' // 演示环境 return 'https://epmet-preview.elinkservice.cn/api/' // 演示环境
// return 'http://192.168.1.144/api/' //测试环境 // return 'http://192.168.1.144/api/' //测试环境
return 'http://219.146.91.110:30801/api/' // return 'http://219.146.91.110:30801/api/'
// return 'https://epmet-preview.elinkservice.cn/api/' // 演示环境 // return 'https://epmet-preview.elinkservice.cn/api/' // 演示环境
// return 'http://192.168.1.144/api/' //测试环境 // return 'http://192.168.1.144/api/' //测试环境

Loading…
Cancel
Save