当前位置:网站首页>Click to hide the column in wechat applet, and then click to show it
Click to hide the column in wechat applet, and then click to show it
2022-07-25 09:23:00 【zk_ Kang】
First map ,

In the applet ,js Load the foreground data in
DATA_TO_ListOneResetUserPwd: function (that, data) {
var rows = data;//data Data queried for , You can generate it yourself according to your own situation
for (var i = 0; i < rows.length; i++) {
var tempObject = {};
tempObject.menuid = rows[i].MENU_ID;
tempObject.index = i;
tempObject.Arrays = [];
if (rows[i].MENU_ID.toString().length == "2") {
tempObject.image ="../../../../../resources/img/menu/xia.png"
// tempObject.MENU_NAME_tow = rows[i].MENU_NAME;
tempObject.CHCKED = false;// This is control , Initialize the display
tempObject.Arrays.push(rows[i].MENU_NAME);
}
tempObject.Arrays2 = [];
if (rows[i].MENU_ID.toString().length == "4") {
tempObject.CHCKED = true;// Initialize hide
if (rows[i].QXBJ!=null){
var qx = rows[i].QXBJ.split('_');
tempObject.EDIT_BJ = parseInt(qx[0]);
tempObject.SH_BJ = parseInt(qx[1]);
tempObject.SELECT_BJ = parseInt(qx[2]);
tempObject.PRINT_BJ = parseInt(qx[3]);
tempObject.QXALL = parseInt(qx[4]);
}else{
tempObject.EDIT_BJ = 0;
tempObject.SH_BJ = 0;
tempObject.SELECT_BJ = 0;
tempObject.PRINT_BJ = 0;
tempObject.QXALL = 0;
}
tempObject.Arrays2.push(rows[i].MENU_NAME);
}
that.data.listOne.push(tempObject);
}
that.setData({
listOne: that.data.listOne,
});
},js Click method in
clickLine:function(e){// Click event , Perform explicit and implicit control
var that= this;
var index = e.currentTarget.dataset.index;
var menuid = e.currentTarget.dataset.menuid;
var Alllist = that.data.listOne;
for (var i = 0; i < Alllist.length; i++) {
if (Alllist[i].menuid.toString().length==4 && Alllist[i].menuid.toString().substring(0, 2) == menuid) {
if (Alllist[i].CHCKED == true) {
Alllist[i].CHCKED = false;
} else {
Alllist[i].CHCKED = true;
}
}
}
that.setData({
listOne: Alllist,
// ALLList: that.data.ALLList,
// _Total: data.total
});
wxhl in :
<view class='hz-main_tow' wx:for="{
{listOne}}" wx:for-item="row" wx:key="Arrays">
<view data-menuid="{
{row.menuid}}" class='hz-list' data-index="{
{row.index}}" hidden="{
{row.CHCKED}}" bindtap='clickLine' wx:for="{
{row.Arrays}}" wx:for-item="item" wx:key="title" >
<text class='hz-content'>{
{item}}</text>
<image src="{
{row.image}}" style='max-height:15px;max-width:15px;padding-left: 10px;'></image>
</view>
<view data-menuid="{
{row.menuid}}" data-index="{
{row.index}}" hidden="{
{row.CHCKED}}" class='hz-list' wx:for="{
{row.Arrays2}}" wx:for-item="item" wx:key="title" >
<checkbox-group data-index="{
{row.index}}" name="CHCKED_{
{row.menuid}}" data-menuid="{
{row.menuid}}" bindchange="changeCHCMenuid" >
<label >
<checkbox color="green" value="{
{row.menuid}}" checked="{
{row.QXALL}}"><text class='selectCon-list-tit_tow'>{
{item}}</text></checkbox>
</label>
</checkbox-group>
<checkbox-group bindchange="changeCHCMenuid_Two" data-index="{
{row.index}}" data-menuid="{
{row.menuid}}">
<label class='selectCon-tit-label'>
<checkbox color="green" value="1" name="cboQxEdit" checked="{
{row.EDIT_BJ}}"> edit </checkbox>
</label>
<label wx:key="id" class='selectCon-tit-label'>
<checkbox color="green" value="2" name="cboQxSH" checked="{
{row.SH_BJ}}"> to examine </checkbox>
</label>
<label wx:key="id" class='selectCon-tit-label'>
<checkbox color="green" value="3" name="cboQxSearch" checked="{
{row.SELECT_BJ}}"> Inquire about </checkbox>
</label>
<label wx:key="id" class='selectCon-tit-label'>
<checkbox color="green" value="4" name="cboQxPrint" checked="{
{row.PRINT_BJ}}"> Print </checkbox>
</label>
</checkbox-group>
</view>
</view>
边栏推荐
猜你喜欢

分布式一致性协议之Raft

『每日一问』简单聊聊JMM/说说对JMM的了解

Shell script
![[deep learning] overview | the latest progress of deep learning](/img/b9/6117862397dcda4d555c819e913c9b.png)
[deep learning] overview | the latest progress of deep learning

idea实用tips---如今将pom.xml(红色)改为pom.xml(蓝色)

Ten thousand words long, one word thoroughly! Finally, someone has made business intelligence (BI) clear

数据控制语言(DCL)

使用nexus3发布yum私服(离线-内网)

Ranking of data results in MySQL

在Ubuntu中安装MySQL并创建新用户
随机推荐
什么是单机、集群与分布式?
Redis数据库基础
ActiveMQ -- AMQ of persistent mechanism
OverTheWire-Natas
什么是贫血模型和充血模型?
无法再web服务器上启动调试,web服务器未能找到请求资源
[stl]stack & queue simulation implementation
保姆级Scanner类使用详解
PHP介绍
activemq--可持久化机制之AMQ
Probe into Druid query timeout configuration → who is the querytimeout of datasource and jdbctemplate effective?
&lt;T&gt;泛型方法演示
Composition of the interview must ask items
&lt; T&gt; Generic method demonstration
[common tools] obtain system status information based on psutil and gputil
数据查询语言(DQL)
API健康状态自检
Redis安装(Ubuntu)
Comments on specific applications of camera
ActiveMQ -- JDBC with persistent mechanism