| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566 |
- Page({
- data: {
- active: "",
- page: null,
- ops: [],
- unfolds: [],
- },
- onLoad(options) {
- getApp().globalData.Language.getLanguagePackage(this, '360°画像');
- const ops = wx.getStorageSync('auth').wportrayal.options.filter(v => ["Client", "Project", "Contacts", "Sales"].includes(v))
- this.setData({
- active: ops[0],
- unfolds: [ops[0]]
- })
- this.setData({
- ops: ops.map(v => {
- return {
- name: v,
- title: {
- "Client": "客户",
- "Project": "项目",
- "Contacts": "联系人",
- "Sales": "业务员"
- } [v]
- }
- }),
- })
- },
- onChange(event) {
- const active = event.detail.name;
- if (!this.data.unfolds.includes(active)) {
- this.data.unfolds.push(active);
- }
- this.setData({
- active,
- unfolds: this.data.unfolds
- });
- this.getList({
- detail: active
- });
- },
- getList({
- detail
- }) {
- if (detail && this.data.active == "") return setTimeout(() => {
- this.getList({
- detail: detail
- })
- })
- if (detail && this.data.active != detail) return;
- const page = this.selectComponent("#" + this.data.active);
- if (page) {
- if (page.data.total == null) page.getList();
- this.data.page = page;
- }
- },
- changeSearchShow() {
- this.data.page.changeSearchShow();
- },
- openFiltrate() {
- this.data.page.setData({
- showFiltrate: true
- });
- }
- })
|