| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556 |
- <template>
- <My_listbox ref="List" @getlist="getList" bottomHeight="70">
- <view style="height: 10px" />
- <user-list :list="list" @onClick="onClick" />
- </My_listbox>
- </template>
- <script>
- import userList from "../../components/userList.vue";
- export default {
- components: { userList },
- data() {
- return {
- content: {
- where: {
- condition: "",
- status: "启用",
- },
- },
- total: 0,
- list: [],
- };
- },
- onLoad(options) {
- this.getList(true);
- uni.setNavigationBarTitle({
- title: options.title || "选择用户",
- });
- },
- methods: {
- getList(init = false) {
- if (this.paging(this.content, init)) return;
- this.$Http
- .basic({
- id: "20240410142002",
- content: this.content,
- })
- .then((res) => {
- console.log("选择负责人", res);
- this.$refs.List.RefreshToComplete();
- if (this.cutoff(res.msg)) return;
- this.total = res.total;
- (this.list =
- res.pageNumber == 1 ? res.data : this.list.concat(res.data)),
- this.colors;
- this.content = this.$refs.List.paging(this.content, res);
- });
- },
- onClick(item) {
- this.$Http.routeSelected(item);
- },
- },
- };
- </script>
- <style></style>
|