123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173 |
- "use strict";
- var common_vendor = require("../common/vendor.js");
- var api_follow = require("../api/follow.js");
- require("../common/request.js");
- const _sfc_main = {
- data() {
- return {
- followId: null,
- follow: null,
- doctor: null,
- form: null
- };
- },
- onLoad(options) {
- this.followId = options.followId;
- },
- onShow() {
- this.getFollowById();
- },
- methods: {
- doFollow() {
- common_vendor.index.showModal({
- title: "\u63D0\u793A",
- content: "\u786E\u8BA4\u63D0\u4EA4\u5417\u5417?",
- showCancel: true,
- cancelText: "\u53D6\u6D88",
- confirmText: "\u786E\u5B9A",
- success: (res) => {
- if (res.confirm) {
- var data = {
- followId: this.followId,
- formJson: JSON.stringify(this.form)
- };
- api_follow.doFollow(data).then((res2) => {
- if (res2.code == 200) {
- common_vendor.index.showToast({
- icon: "success",
- title: "\u64CD\u4F5C\u6210\u529F"
- });
- setTimeout(function() {
- common_vendor.index.$emit("refreshFollowList");
- common_vendor.index.navigateBack({
- delta: 1
- });
- }, 500);
- } else {
- common_vendor.index.showToast({
- icon: "none",
- title: res2.msg
- });
- }
- }, (rej) => {
- });
- }
- }
- });
- },
- getFollowById() {
- var data = { followId: this.followId };
- api_follow.getFollowById(data).then((res) => {
- if (res.code == 200) {
- this.follow = res.follow;
- this.doctor = res.doctor;
- this.form = JSON.parse(this.follow.formJson);
- this.form.forEach(function(element) {
- if (element.type == 3) {
- element.answers = "";
- }
- });
- }
- }, (err) => {
- });
- }
- }
- };
- if (!Array) {
- const _easycom_u_alert2 = common_vendor.resolveComponent("u-alert");
- const _easycom_u_radio2 = common_vendor.resolveComponent("u-radio");
- const _easycom_u_radio_group2 = common_vendor.resolveComponent("u-radio-group");
- const _easycom_u_checkbox2 = common_vendor.resolveComponent("u-checkbox");
- const _easycom_u_checkbox_group2 = common_vendor.resolveComponent("u-checkbox-group");
- const _easycom_u__textarea2 = common_vendor.resolveComponent("u--textarea");
- (_easycom_u_alert2 + _easycom_u_radio2 + _easycom_u_radio_group2 + _easycom_u_checkbox2 + _easycom_u_checkbox_group2 + _easycom_u__textarea2)();
- }
- const _easycom_u_alert = () => "../uni_modules/uview-plus/components/u-alert/u-alert.js";
- const _easycom_u_radio = () => "../uni_modules/uview-plus/components/u-radio/u-radio.js";
- const _easycom_u_radio_group = () => "../uni_modules/uview-plus/components/u-radio-group/u-radio-group.js";
- const _easycom_u_checkbox = () => "../uni_modules/uview-plus/components/u-checkbox/u-checkbox.js";
- const _easycom_u_checkbox_group = () => "../uni_modules/uview-plus/components/u-checkbox-group/u-checkbox-group.js";
- const _easycom_u__textarea = () => "../uni_modules/uview-plus/components/u--textarea/u--textarea.js";
- if (!Math) {
- (_easycom_u_alert + _easycom_u_radio + _easycom_u_radio_group + _easycom_u_checkbox + _easycom_u_checkbox_group + _easycom_u__textarea)();
- }
- function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
- return common_vendor.e({
- a: common_vendor.p({
- fontSize: "13",
- type: "info",
- description: "\u4E3A\u4E86\u7ED9\u60A8\u63D0\u4F9B\u66F4\u597D\u7684\u670D\u52A1\uFF0C\u5E0C\u671B\u60A8\u80FD\u7528\u51E0\u5206\u949F\u65F6\u95F4\uFF0C\u5C06\u60A8\u7684\u611F\u53D7\u548C\u5EFA\u8BAE\u544A\u8BC9\u6211\u4EEC\uFF0C\u6211\u4EEC\u975E\u5E38\u91CD\u89C6\u60A8\u7684\u5B9D\u8D35\u610F\u89C1!"
- }),
- b: common_vendor.t(_ctx.dortor != null ? $data.doctor.doctorName : ""),
- c: $data.follow != null
- }, $data.follow != null ? {
- d: common_vendor.t($data.follow.num),
- e: common_vendor.t($data.follow.totalNum)
- } : {}, {
- f: common_vendor.t($data.follow.planTime),
- g: common_vendor.f($data.form, (item, index, i0) => {
- return common_vendor.e({
- a: common_vendor.t(item.question),
- b: item.require
- }, item.require ? {} : {}, {
- c: item.type == 1
- }, item.type == 1 ? {
- d: common_vendor.f(item.options, (option, subIndex, i1) => {
- return {
- a: subIndex,
- b: "5724fc07-2-" + i0 + "-" + i1 + "," + ("5724fc07-1-" + i0),
- c: common_vendor.p({
- customStyle: {
- marginBottom: "8px"
- },
- label: option,
- name: option
- })
- };
- }),
- e: "5724fc07-1-" + i0,
- f: common_vendor.o(($event) => item.answers = $event),
- g: common_vendor.p({
- placement: "column",
- modelValue: item.answers
- })
- } : {}, {
- h: item.type == 2
- }, item.type == 2 ? {
- i: common_vendor.f(item.options, (option, subIndex, i1) => {
- return {
- a: subIndex,
- b: "5724fc07-4-" + i0 + "-" + i1 + "," + ("5724fc07-3-" + i0),
- c: common_vendor.p({
- customStyle: {
- marginBottom: "8px"
- },
- label: option,
- name: option
- })
- };
- }),
- j: "5724fc07-3-" + i0,
- k: common_vendor.o(($event) => item.answers = $event),
- l: common_vendor.p({
- placement: "column",
- modelValue: item.answers
- })
- } : {}, {
- m: item.type == 3
- }, item.type == 3 ? {
- n: "5724fc07-5-" + i0,
- o: common_vendor.o(($event) => item.answers = $event),
- p: common_vendor.p({
- count: true,
- maxlength: "200",
- placeholder: "\u8BF7\u8F93\u5165\u5185\u5BB9",
- modelValue: item.answers
- })
- } : {});
- }),
- h: common_vendor.o(($event) => $options.doFollow())
- });
- }
- var MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-5724fc07"], ["__file", "E:/Project/2023/\u95EE\u8BCA\u5E73\u53F0/his_user_miniapp/pages_user/doFollow.vue"]]);
- wx.createPage(MiniProgramPage);
|