You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
195 lines
5.5 KiB
JavaScript
195 lines
5.5 KiB
JavaScript
"use strict";
|
|
const common_vendor = require("../../common/vendor.js");
|
|
const _sfc_main = {
|
|
// 组件名称
|
|
name: "",
|
|
// 局部注册的组件
|
|
components: {},
|
|
// 组件参数 接收来自父组件的数据
|
|
props: {
|
|
from: {
|
|
type: String,
|
|
default: () => {
|
|
return "default";
|
|
}
|
|
},
|
|
list: {
|
|
type: Array,
|
|
default: () => {
|
|
return [];
|
|
}
|
|
},
|
|
speed: {
|
|
type: Number,
|
|
default: () => {
|
|
return -1;
|
|
}
|
|
},
|
|
query: {
|
|
type: Object,
|
|
default: () => {
|
|
return {
|
|
page: 1,
|
|
size: 10,
|
|
list: [],
|
|
isFinish: -1
|
|
};
|
|
}
|
|
},
|
|
tabActive: {
|
|
type: Number,
|
|
default: () => {
|
|
return 0;
|
|
}
|
|
},
|
|
loading: {
|
|
type: Boolean,
|
|
default: () => {
|
|
return true;
|
|
}
|
|
},
|
|
isLogin: {
|
|
type: Boolean
|
|
},
|
|
navInfo: {
|
|
type: Object,
|
|
default: () => {
|
|
return {};
|
|
}
|
|
}
|
|
},
|
|
// 组件状态值
|
|
data() {
|
|
return {
|
|
cdnBaseImg: this.G.store().cdnBaseImg,
|
|
tabbarHeight: 0
|
|
};
|
|
},
|
|
// 计算属性
|
|
computed: {},
|
|
// 侦听器
|
|
watch: {},
|
|
created() {
|
|
this.tabbarHeight = common_vendor.index.getStorageSync("TABBAR_HEIGHT");
|
|
common_vendor.index.__f__("log", "at components/list/apply.vue:130", "this.tabbarHeight", this.tabbarHeight);
|
|
},
|
|
mounted() {
|
|
},
|
|
// 组件方法
|
|
methods: {
|
|
reachBottom() {
|
|
let that = this;
|
|
common_vendor.index.__f__("log", "at components/list/apply.vue:137", 123123);
|
|
common_vendor.index.__f__("log", "at components/list/apply.vue:138", "that.query", that.query);
|
|
this.G.isLogin();
|
|
if (this.G.isLogin()) {
|
|
if (that.query.isFinish == -1 || that.query.isFinish == that.query.size) {
|
|
that.query.page++;
|
|
that.$emit("update:query", that.query);
|
|
that.$emit("uploadList");
|
|
}
|
|
}
|
|
},
|
|
goDetail($item, $index) {
|
|
let that = this;
|
|
common_vendor.index.navigateTo({
|
|
url: `/root/detail/apply?id=${$item.id}&type=${that.tabActive + 1}&relationId=${$item.relationId}`
|
|
// url: "/root/detail/apply?id=" + $item.id + "&type=" + (that.tabActive + 1),
|
|
});
|
|
},
|
|
goLogin() {
|
|
common_vendor.index.reLaunch({
|
|
url: "/root/person/loginIndex"
|
|
});
|
|
},
|
|
goTel($item) {
|
|
common_vendor.index.__f__("log", "at components/list/apply.vue:161", $item);
|
|
if ($item) {
|
|
common_vendor.index.makePhoneCall({
|
|
phoneNumber: $item
|
|
});
|
|
}
|
|
},
|
|
sendApply(_item) {
|
|
common_vendor.index.$emit("sendApply", { ..._item, active: this.tabActive + 1 });
|
|
}
|
|
}
|
|
};
|
|
if (!Array) {
|
|
const _component_g_loading = common_vendor.resolveComponent("g-loading");
|
|
const _component_g_empty = common_vendor.resolveComponent("g-empty");
|
|
const _component_g_button = common_vendor.resolveComponent("g-button");
|
|
const _component_g_panel_hr = common_vendor.resolveComponent("g-panel-hr");
|
|
(_component_g_loading + _component_g_empty + _component_g_button + _component_g_panel_hr)();
|
|
}
|
|
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
return common_vendor.e({
|
|
a: $props.loading && $props.speed == -1
|
|
}, $props.loading && $props.speed == -1 ? {
|
|
b: common_vendor.p({
|
|
paddingBottom: "g_pb_120"
|
|
})
|
|
} : {}, {
|
|
c: !$props.loading && $props.speed == 0 && $props.isLogin
|
|
}, !$props.loading && $props.speed == 0 && $props.isLogin ? {
|
|
d: common_vendor.p({
|
|
text: $props.isLogin ? "暂无数据" : "请登录"
|
|
})
|
|
} : {}, {
|
|
e: !$props.isLogin
|
|
}, !$props.isLogin ? {
|
|
f: common_vendor.p({
|
|
text: "您还有没有登录,请登录后查看工单"
|
|
}),
|
|
g: common_vendor.o($options.goLogin),
|
|
h: common_vendor.p({
|
|
btnText: "去登录",
|
|
size: "small"
|
|
})
|
|
} : {}, {
|
|
i: $props.speed > 0
|
|
}, $props.speed > 0 ? {
|
|
j: common_vendor.f($props.query.list, (item, index, i0) => {
|
|
return common_vendor.e({
|
|
a: item.tel
|
|
}, item.tel ? {
|
|
b: $data.cdnBaseImg + "tel.svg"
|
|
} : {
|
|
c: $data.cdnBaseImg + "order_tel_gray.svg"
|
|
}, {
|
|
d: common_vendor.o(($event) => $options.goTel(item.tel), index),
|
|
e: common_vendor.t(item.userName),
|
|
f: common_vendor.t(item.setTitle),
|
|
g: common_vendor.t(item.storeJobName + "@" + (item.upFullName || item.upAgencyName)),
|
|
h: common_vendor.t(item.time),
|
|
i: common_vendor.t(item.status_text)
|
|
}, $props.from == "chat" ? {
|
|
j: common_vendor.o(($event) => $options.sendApply(item), index),
|
|
k: "ce93ebae-4-" + i0,
|
|
l: common_vendor.p({
|
|
btnText: "发送",
|
|
fontSize: "14",
|
|
type: "primary",
|
|
size: "mini"
|
|
}),
|
|
m: common_vendor.o(() => {
|
|
}, index)
|
|
} : {}, {
|
|
n: index,
|
|
o: common_vendor.o(($event) => $options.goDetail(item, index), index)
|
|
});
|
|
}),
|
|
k: $props.from == "chat",
|
|
l: common_vendor.p({
|
|
str: $props.query.isFinish >= 0 && $props.query.isFinish < $props.query.size ? $props.speed + "个工单" : "加载中"
|
|
})
|
|
} : {}, {
|
|
m: common_vendor.n(!$props.loading && $props.speed == 0 ? "" : ""),
|
|
n: common_vendor.n(!$props.loading && $props.speed == 0 ? "g_bg_f_5" : ""),
|
|
o: common_vendor.n($props.isLogin ? "" : "m-login-false")
|
|
});
|
|
}
|
|
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-ce93ebae"]]);
|
|
wx.createComponent(Component);
|
|
//# sourceMappingURL=../../../.sourcemap/mp-weixin/components/list/apply.js.map
|