tupian
This commit is contained in:
@@ -1,17 +1,33 @@
|
||||
"use strict";
|
||||
const common_vendor = require("../../common/vendor.js");
|
||||
const request_api = require("../../request/api.js");
|
||||
const _sfc_main = {
|
||||
__name: "checklist",
|
||||
setup(__props) {
|
||||
common_vendor.useRouter();
|
||||
const list = common_vendor.ref([]);
|
||||
const edit = () => {
|
||||
common_vendor.index.navigateTo({
|
||||
url: "/pages/editchecklist/editchecklist"
|
||||
});
|
||||
};
|
||||
common_vendor.onLoad(() => {
|
||||
request_api.getCheckTableList().then((res) => {
|
||||
if (res.code === 0) {
|
||||
list.value = res.data.records;
|
||||
}
|
||||
});
|
||||
});
|
||||
return (_ctx, _cache) => {
|
||||
return {
|
||||
a: common_vendor.o(($event) => edit())
|
||||
a: common_vendor.f(list.value, (item, k0, i0) => {
|
||||
return {
|
||||
a: common_vendor.t(item.name),
|
||||
b: common_vendor.o(($event) => edit(), item.id),
|
||||
c: item.id
|
||||
};
|
||||
}),
|
||||
b: common_vendor.o(($event) => edit())
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1 +1 @@
|
||||
<view class="{{['page', 'padding', 'data-v-4d00090a', virtualHostClass]}}" style="{{virtualHostStyle}}"><view class="padding bg-white radius flex justify-between data-v-4d00090a"><view class="data-v-4d00090a">危化品使用安全专题检查</view><view class="data-v-4d00090a"><button class="bg-blue cu-btn margin-right-xs data-v-4d00090a" bindtap="{{a}}">编辑</button><button class="bg-red cu-btn data-v-4d00090a">删除</button></view></view><button class="lg cuIcon-add bg-blue round margin-top-xl data-v-4d00090a">新增检查表</button></view>
|
||||
<view class="{{['page', 'padding', 'data-v-4d00090a', virtualHostClass]}}" style="{{virtualHostStyle}}"><view wx:for="{{a}}" wx:for-item="item" wx:key="c" class="padding bg-white radius flex justify-between margin-bottom data-v-4d00090a"><view class="data-v-4d00090a">{{item.a}}</view><view class="data-v-4d00090a"><button class="bg-blue cu-btn margin-right-xs data-v-4d00090a" bindtap="{{item.b}}">编辑</button><button class="bg-red cu-btn data-v-4d00090a">删除</button></view></view><button class="lg cuIcon-add bg-blue round margin-top-xl data-v-4d00090a" bindtap="{{b}}">新增检查表</button></view>
|
||||
Reference in New Issue
Block a user