| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689 |
- "use strict";
- const common_vendor = require("../../../../common/vendor.js");
- const hook_useOnLoad_index = require("../../../../hook/use-on-load/index.js");
- const pagesAdmin_satisfaction_service_satisfactionQuestions_index = require("../../service/satisfactionQuestions/index.js");
- const utils_icon = require("../../../../utils/icon.js");
- const pagesAdmin_satisfaction_business_satisfactionQuestions_fn = require("./fn.js");
- const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
- __name: "satisfactionQuestions",
- setup(__props) {
- const app = getApp();
- let time = null;
- const currentUser = common_vendor.ref({});
- const taskId = common_vendor.ref("");
- const objType = common_vendor.ref("3");
- const quesList = common_vendor.ref({});
- common_vendor.ref([]);
- const point = common_vendor.ref("");
- const complete = common_vendor.ref(false);
- const anonymousType = common_vendor.ref(0);
- const showModal_Anonymous = common_vendor.ref(false);
- const showModal_User = common_vendor.ref(false);
- let quesAnswers = common_vendor.reactive({
- MemberId: "",
- TaskId: "-1",
- SysAppId: "visit",
- SubjectId: "",
- UserAgent: "",
- IP: "",
- Location: "",
- Mobile: "",
- UserName: "",
- Sex: "",
- Age: "",
- ThirdPartyId: "",
- AnswerUseTime: 0,
- PushDept: "",
- PushDeptName: "",
- BedNo: "",
- HospitalNo: "",
- CardNo: "",
- AnswerList: []
- });
- const { getCurrentUser } = common_vendor.mapGetters({
- getCurrentUser: "getCurrentUser"
- });
- const main = async (options) => {
- currentUser.value = getCurrentUser();
- const params = {
- SubjectId: options.subjectId,
- TaskId: options.taskId
- };
- const resp = await pagesAdmin_satisfaction_service_satisfactionQuestions_index.QuerySubjectListToChannelTask_V3(params);
- if (!common_vendor.isEmpty(resp)) {
- objType.value = resp[0].GroupType;
- let anonymous = resp[0].Anonymous === "false" ? false : resp[0].Anonymous === "true" ? true : resp[0].Anonymous || "";
- anonymousType.value = anonymous === "" ? 3 : anonymous === false ? 1 : 2;
- showModal_Anonymous.value = anonymous == 3 ? true : false;
- taskId.value = options.taskId;
- quesAnswers.SubjectId = options.subjectId;
- if (anonymous != 3) {
- isAnonymous(anonymous);
- }
- querySubjectInfoById_V3();
- getSec();
- } else {
- common_vendor.showModal("该任务已失效", () => {
- common_vendor.goToUrl(`/pages/business/tabbar/homePage/homePage`, { skipWay: "reLaunch" });
- });
- return;
- }
- };
- const isAnonymous = (type) => {
- if (type == 1) {
- showModal_Anonymous.value = false;
- showModal_User.value = true;
- } else {
- currentUser.value = {};
- showModal_Anonymous.value = false;
- }
- };
- const querySubjectInfoById_V3 = async () => {
- const resp = await pagesAdmin_satisfaction_service_satisfactionQuestions_index.QuerySubjectInfoById_V3({
- SubjectId: quesAnswers.SubjectId
- });
- if (common_vendor.isNotEmpty(resp)) {
- if (resp[0].Status != 0) {
- common_vendor.showModal("该问卷已失效", () => {
- common_vendor.navigateBack(1);
- });
- return;
- }
- if (resp[0].State != 1) {
- common_vendor.showModal("该问卷未发布", () => {
- common_vendor.navigateBack(1);
- });
- return;
- }
- quesAnswers.PushDept = resp[0].DeptId;
- quesAnswers.PushDeptName = resp[0].PushDeptName;
- resp[0].QuestionList.forEach((item, index) => {
- item.AnswerList = [];
- item.MustQuest = item.MustQuest == "false" ? false : true;
- item.RuleInfo = item.RuleInfo != "" ? JSON.parse(item.RuleInfo) : "";
- if (item.QuestType == "Select") {
- item.AnswerList = 0;
- }
- if (common_vendor.isNotEmpty(item.MatrixQuestionList)) {
- item.MatrixQuestionList.forEach((childItem) => {
- childItem.AnswerList = [];
- childItem.RuleInfo = childItem.RuleInfo != "" ? JSON.parse(childItem.RuleInfo) : "";
- let answerItem = {
- Answer: [],
- Blank: index,
- QuestId: childItem.QuestId,
- QuestType: item.QuestType,
- MustQuest: item.MustQuest
- };
- quesAnswers.AnswerList.push(answerItem);
- if (common_vendor.isNotEmpty(childItem.QuestionItemList)) {
- childItem.QuestionItemList.forEach((sunItem) => {
- sunItem.Check = false;
- });
- }
- });
- } else {
- let answerItem = {
- Answer: [],
- Blank: index,
- QuestId: item.QuestId,
- QuestType: item.QuestType,
- MustQuest: item.MustQuest
- };
- quesAnswers.AnswerList.push(answerItem);
- }
- });
- resp[0].QuestionList = bySort(resp[0].QuestionList);
- quesList.value = resp[0];
- common_vendor.index.__f__("log", "at pagesAdmin/satisfaction/business/satisfactionQuestions/satisfactionQuestions.vue:460", quesList.value);
- }
- };
- const getSec = () => {
- time = setTimeout(() => {
- let answerUseTime = quesAnswers.AnswerUseTime;
- answerUseTime++;
- quesAnswers.AnswerUseTime = answerUseTime;
- getSec();
- }, 1e3);
- };
- const bySort = (list) => {
- let find = 0;
- let sort = 0;
- let item = {};
- for (var t = 0; t < list.length; t++) {
- item = list[t];
- if (item.QuestType == "SubTitle") {
- sort = 0;
- item.Num = toChinesNum(find + 1);
- find++;
- } else {
- item.Sort = sort + 1;
- sort++;
- }
- item.SortNum = t;
- if (common_vendor.isNotEmpty(item.QuestionItemList)) {
- item.QuestionItemList.forEach((childItem, childIndex) => {
- childItem.SortNum = childIndex;
- if (common_vendor.isNotEmpty(childItem.QuestionItem)) {
- childItem.QuestionItem.forEach((sunItem, sunIndex) => {
- sunItem.SortNum = sunIndex;
- });
- }
- });
- }
- }
- return list;
- };
- const toChinesNum = (num) => {
- var changeNum = ["一", "二", "三", "四", "五", "六", "七", "八", "九", "十"], newNum = "", arr = num.toString().split("");
- arr[0] = parseInt(arr[0]) - 1;
- if (arr[0] == -1 && arr.length == 1) {
- return "零";
- }
- if (arr.length > 1) {
- arr[1] = parseInt(arr[1]) - 1;
- if (!arr[0]) {
- newNum = !arr[0] && arr[1] == -1 ? changeNum[9] : changeNum[9] + changeNum[arr[1]];
- } else {
- newNum = changeNum[arr[0]] + changeNum[9] + (changeNum[arr[1]] ? changeNum[arr[1]] : "");
- }
- } else {
- newNum = changeNum[arr[0]];
- }
- return newNum;
- };
- const choiceOption = (e) => {
- let index = e.currentTarget.dataset.index;
- let childIndex = e.currentTarget.dataset.childindex;
- let answerIndex = 0;
- let questionList = quesList.value.QuestionList;
- let answerList = quesAnswers.AnswerList;
- answerList.forEach((itm, ind) => {
- if (itm.QuestId == questionList[index].QuestId) {
- answerIndex = ind;
- }
- });
- if (questionList[index].QuestType == "Radio" || questionList[index].QuestType == "Scale") {
- if (questionList[index].AnswerList[0] != questionList[index].QuestionItemList[childIndex].ItemId) {
- questionList[index].AnswerList = [];
- questionList[index].AnswerList.push(questionList[index].QuestionItemList[childIndex].ItemId);
- }
- answerList[answerIndex].Answer = questionList[index].QuestionItemList[childIndex].ItemId;
- } else if (questionList[index].QuestType == "Checkbox") {
- let flag = false;
- questionList[index].AnswerList.forEach((item) => {
- if (item == questionList[index].QuestionItemList[childIndex].ItemId) {
- flag = true;
- }
- });
- if (flag) {
- questionList[index].AnswerList = questionList[index].AnswerList.filter((item) => {
- return item != questionList[index].QuestionItemList[childIndex].ItemId;
- });
- answerList[answerIndex].Answer = answerList[answerIndex].Answer.filter((fiItem) => {
- return fiItem != questionList[index].QuestionItemList[childIndex].ItemId;
- });
- } else {
- if (questionList[index].RuleInfo.MaxLength < questionList[index].AnswerList.length + 1) {
- common_vendor.showModal("最多选择" + questionList[index].RuleInfo.MaxLength + "项");
- return;
- }
- questionList[index].AnswerList.push(questionList[index].QuestionItemList[childIndex].ItemId);
- answerList[answerIndex].Answer.push(questionList[index].QuestionItemList[childIndex].ItemId);
- }
- }
- quesList.value.QuestionList = questionList;
- quesAnswers.AnswerList = answerList;
- };
- const bindPickerChange = (e) => {
- let index = e.currentTarget.dataset.index;
- let val = e.detail.value;
- let questionList = quesList.value.QuestionList;
- let answerList = quesAnswers.AnswerList;
- let answerIndex = 0;
- answerList.forEach((itm, ind) => {
- if (itm.QuestId == questionList[index].QuestId) {
- answerIndex = ind;
- }
- });
- questionList[index].AnswerList = val;
- answerList[answerIndex].Answer = questionList[index].QuestionItemList[val].ItemId;
- quesList.value.QuestionList = questionList;
- quesAnswers.AnswerList = answerList;
- };
- const choiceMatrixOption = (e) => {
- let index = e.currentTarget.dataset.index;
- let childIndex = e.currentTarget.dataset.childindex;
- let sunIndex = e.currentTarget.dataset.sunindex;
- let questionList = quesList.value.QuestionList;
- let answerList = quesAnswers.AnswerList;
- let answerIndex = 0;
- answerList.forEach((itm, ind) => {
- if (itm.QuestId == questionList[index].MatrixQuestionList[childIndex].QuestId) {
- answerIndex = ind;
- }
- });
- if (questionList[index].QuestType == "MatrixRadio" || questionList[index].QuestType == "MatrixScale") {
- if (questionList[index].MatrixQuestionList[childIndex].AnswerList[0] != questionList[index].MatrixQuestionList[childIndex].QuestionItemList[sunIndex].ItemId) {
- questionList[index].MatrixQuestionList[childIndex].AnswerList = [];
- questionList[index].MatrixQuestionList[childIndex].AnswerList.push(
- questionList[index].MatrixQuestionList[childIndex].QuestionItemList[sunIndex].ItemId
- );
- }
- answerList[answerIndex].Answer = questionList[index].MatrixQuestionList[childIndex].QuestionItemList[sunIndex].ItemId;
- } else if (questionList[index].QuestType == "MatrixCheckbox") {
- let flag = false;
- questionList[index].MatrixQuestionList[childIndex].AnswerList.forEach((item) => {
- if (item == questionList[index].MatrixQuestionList[childIndex].QuestionItemList[sunIndex].ItemId) {
- flag = true;
- }
- });
- if (flag) {
- questionList[index].MatrixQuestionList[childIndex].AnswerList = questionList[index].MatrixQuestionList[childIndex].AnswerList.filter((item) => {
- return item != questionList[index].MatrixQuestionList[childIndex].QuestionItemList[sunIndex].ItemId;
- });
- answerList[answerIndex].Answer = answerList[answerIndex].Answer.filter((fiItem) => {
- return fiItem != questionList[index].MatrixQuestionList[childIndex].QuestionItemList[sunIndex].ItemId;
- });
- } else {
- questionList[index].MatrixQuestionList[childIndex].AnswerList.push(
- questionList[index].MatrixQuestionList[childIndex].QuestionItemList[sunIndex].ItemId
- );
- answerList[answerIndex].Answer.push(
- questionList[index].MatrixQuestionList[childIndex].QuestionItemList[sunIndex].ItemId
- );
- }
- }
- quesList.value.QuestionList = questionList;
- quesAnswers.AnswerList = answerList;
- };
- const choiceFile = (e) => {
- let index = e.currentTarget.dataset.index;
- let questionList = quesList.value.QuestionList;
- let answerList = quesAnswers.AnswerList;
- let answerIndex = 0;
- answerList.forEach((itm, ind) => {
- if (itm.QuestId == questionList[index].QuestId) {
- answerIndex = ind;
- }
- });
- if (answerList[answerIndex].Answer.length >= questionList[index].RuleInfo.FileCount) {
- common_vendor.showModal("最多上传" + questionList[index].RuleInfo.FileCount + "张图片");
- return;
- }
- common_vendor.index.chooseMedia({
- count: questionList[index].RuleInfo.FileCount,
- mediaType: ["image"],
- sourceType: ["album", "camera"],
- sizeType: ["compressed"],
- async success(res) {
- common_vendor.index.showLoading({
- title: "上传中。。。"
- });
- for (var i = 0; i < res.tempFiles.length; i++) {
- let m = 1024 * 1024;
- if (res.tempFiles[i].size < m) {
- let imgUrl = await uploadFile(
- res.tempFiles[i].tempFilePath,
- questionList[index].RuleInfo.FileCount,
- answerList[answerIndex].Answer
- );
- if (common_vendor.isNotEmpty(imgUrl)) {
- imgUrl = imgUrl.indexOf("http") > -1 ? imgUrl : common_vendor.useDomain() + imgUrl.replace(/\\/g, "/");
- answerList[answerIndex].Answer.push(imgUrl);
- questionList[index].AnswerList = answerList[answerIndex].Answer;
- quesList.value.QuestionList = questionList;
- quesAnswers.AnswerList = answerList;
- if (res.tempFiles.length - 1 == i) {
- common_vendor.index.hideLoading();
- }
- }
- } else {
- common_vendor.index.hideLoading();
- common_vendor.showModal("文件不得大于" + questionList[index].RuleInfo.FileSize + "M");
- return;
- }
- }
- }
- });
- };
- const uploadFile = (imgItem, fileCount, imgList2) => {
- return new Promise((resolve, reject) => {
- if (imgList2.length >= fileCount) {
- common_vendor.index.hideLoading();
- common_vendor.showModal("最多上传" + fileCount + "张图片");
- return;
- }
- common_vendor.index.uploadFile({
- url: pagesAdmin_satisfaction_service_satisfactionQuestions_index.UploadZxFile,
- filePath: imgItem,
- name: "newsFile",
- formData: {
- user: "test"
- },
- header: {
- token: common_vendor.index.getStorageSync("token")
- },
- data: {},
- success(res) {
- const data = JSON.parse(res.data);
- if (data.RespCode == "10000") {
- resolve(data.url);
- } else {
- common_vendor.showModal(data.msg);
- }
- }
- });
- });
- };
- const closeImg = (e) => {
- let index = e.currentTarget.dataset.index;
- let imgItem = e.currentTarget.dataset.imgitem;
- let questionList = quesList.value.QuestionList;
- let answerList = quesAnswers.AnswerList;
- let answerIndex = 0;
- answerList.forEach((itm, ind) => {
- if (itm.QuestId == questionList[index].QuestId) {
- answerIndex = ind;
- }
- });
- answerList[answerIndex].Answer = answerList[answerIndex].Answer.filter((item) => {
- return item != imgItem;
- });
- questionList[index].AnswerList = answerList[answerIndex].Answer;
- quesList.value.QuestionList = questionList;
- quesAnswers.AnswerList = answerList;
- };
- const setVal = (e) => {
- let index = e.currentTarget.dataset.index;
- let childIndex = e.currentTarget.dataset.childindex;
- let questionList = quesList.value.QuestionList;
- let answerList = quesAnswers.AnswerList;
- let answerIndex = 0;
- if (questionList[index].QuestType == "MatrixInput") {
- if (questionList[index].MatrixQuestionList[childIndex].AnswerList.length == questionList[index].MatrixQuestionList[childIndex].RuleInfo.MaxLength) {
- common_vendor.showToast(
- "最多输入" + questionList[index].MatrixQuestionList[childIndex].RuleInfo.MaxLength + "个字"
- );
- return;
- }
- answerList.forEach((itm, ind) => {
- if (itm.QuestId == questionList[index].MatrixQuestionList[childIndex].QuestId) {
- answerIndex = ind;
- }
- });
- questionList[index].MatrixQuestionList[childIndex].AnswerList = e.detail.value;
- } else {
- if (questionList[index].RuleInfo.DataType != "无") {
- let dataTypeOptions = questionList[index].RuleInfo.DataTypeOptions;
- for (var i = 0; i < dataTypeOptions.length; i++) {
- if (questionList[index].RuleInfo.DataType == dataTypeOptions[i].Value) {
- const regRule = dataTypeOptions[i].Rule;
- let reg = null;
- if (regRule.startsWith("/") && regRule.endsWith("/")) {
- reg = new RegExp(regRule.slice(1, -1));
- } else {
- reg = new RegExp(regRule);
- }
- if (!reg.test(e.detail.value)) {
- common_vendor.showModal("请输入" + dataTypeOptions[i].Text);
- questionList[index].AnswerList = "";
- answerList[answerIndex].Answer = "";
- this.setData({
- "quesList.QuestionList": questionList,
- "quesAnswers.AnswerList": answerList
- });
- return;
- }
- }
- }
- }
- if (questionList[index].AnswerList.length == questionList[index].RuleInfo.MaxLength) {
- common_vendor.showToast("最多输入" + questionList[index].RuleInfo.MaxLength + "个字");
- return;
- }
- answerList.forEach((itm, ind) => {
- if (itm.QuestId == questionList[index].QuestId) {
- answerIndex = ind;
- }
- });
- questionList[index].AnswerList = e.detail.value;
- }
- answerList[answerIndex].Answer = e.detail.value;
- quesList.value.QuestionList = questionList;
- quesAnswers.AnswerList = answerList;
- };
- const submit = async () => {
- common_vendor.index.showLoading();
- await common_vendor.sleep(1e3);
- if (complete.value)
- return;
- const answers = { ...quesAnswers };
- for (var i = 0; i < answers.AnswerList.length; i++) {
- let item = answers.AnswerList[i];
- if (item.MustQuest && common_vendor.isEmpty(item.Answer)) {
- common_vendor.showToast("存在未填写的问卷");
- point.value = "p" + item.Blank;
- return;
- }
- }
- answers.AnswerList.forEach((item) => {
- if (typeof item.Answer == "object") {
- item.Answer = item.Answer.join();
- }
- });
- answers.AnswerList = JSON.stringify(quesAnswers.AnswerList);
- quesAnswers.IP = (await getIP()).cip;
- quesAnswers.Location = (await getIP()).cname;
- quesAnswers.UserAgent = app.globalData.smallPro_systemInfo;
- quesAnswers.Mobile = currentUser.value.mobile;
- quesAnswers.UserName = currentUser.value.memberName;
- quesAnswers.MemberId = currentUser.value.memberId;
- quesAnswers.Sex = currentUser.value.sex;
- quesAnswers.Age = currentUser.value.age;
- quesAnswers.ThirdPartyId = currentUser.value.memberId || common_vendor.index.getStorageSync("openid");
- quesAnswers.BedNo = "";
- quesAnswers.HospitalNo = objType.value == "4" ? currentUser.value.cardNo : "";
- quesAnswers.CardNo = objType.value == "3" ? currentUser.value.cardNo : "";
- quesAnswers.TaskId = taskId.value;
- let res = await pagesAdmin_satisfaction_service_satisfactionQuestions_index.CommitAnswer_V3(quesAnswers);
- clearTimeout(time);
- if (common_vendor.isNotEmpty(res)) {
- common_vendor.showModal("提交成功!", () => {
- common_vendor.navigateBack(1);
- });
- }
- };
- const getIP = () => {
- return new Promise((resolve, reject) => {
- common_vendor.index.request({
- url: "https://pv.sohu.com/cityjson?ie=utf-8",
- success: (res) => {
- const result = res.data.substring(res.data.indexOf("{"), res.data.lastIndexOf("}") + 1);
- const obj = JSON.parse(result);
- resolve(obj);
- }
- });
- });
- };
- const goBack = () => {
- common_vendor.index.navigateBack({
- delta: 1
- });
- };
- const yjfk = () => {
- };
- const goSelMember = () => {
- };
- const confirmMember = () => {
- };
- hook_useOnLoad_index.useOnLoad((options) => {
- main(options);
- });
- return (_ctx, _cache) => {
- return common_vendor.e({
- a: common_vendor.unref(utils_icon.icon).satisfaction.ques_top_bg,
- b: common_vendor.t(quesList.value.SubjectTitle),
- c: common_vendor.t(quesList.value.Remark),
- d: complete.value
- }, complete.value ? {} : {}, {
- e: common_vendor.f(quesList.value.QuestionList, (item, index, i0) => {
- return common_vendor.e({
- a: item.QuestType != "SubTitle"
- }, item.QuestType != "SubTitle" ? {
- b: common_vendor.t(item.Sort),
- c: common_vendor.t(item.Question)
- } : {}, {
- d: item.QuestType == "SubTitle"
- }, item.QuestType == "SubTitle" ? {
- e: common_vendor.t(item.Num),
- f: common_vendor.t(item.Question)
- } : {}, {
- g: item.QuestType == "Input"
- }, item.QuestType == "Input" ? {
- h: common_vendor.t(item.Question),
- i: index,
- j: "最多输入" + item.RuleInfo.MaxLength + "个字",
- k: item.RuleInfo.MaxLength,
- l: item.AnswerList,
- m: common_vendor.o(setVal, index)
- } : {}, {
- n: item.QuestType == "MatrixInput"
- }, item.QuestType == "MatrixInput" ? {
- o: common_vendor.f(item.MatrixQuestionList, (childItem, childIndex, i1) => {
- return {
- a: common_vendor.t(childItem.Question),
- b: childIndex,
- c: "最多输入" + childItem.RuleInfo.MaxLength + "个字",
- d: childItem.RuleInfo.MaxLength,
- e: childItem.AnswerList,
- f: common_vendor.o(setVal, `MatrixInput-${index}-${childIndex}`),
- g: `MatrixInput-${index}-${childIndex}`
- };
- }),
- p: index
- } : {}, {
- q: item.QuestType == "Radio" || item.QuestType == "Checkbox"
- }, item.QuestType == "Radio" || item.QuestType == "Checkbox" ? {
- r: common_vendor.f(item.QuestionItemList, (childItem, childIndex, i1) => {
- return {
- a: common_vendor.t(childItem.ItemName),
- b: common_vendor.n(common_vendor.unref(pagesAdmin_satisfaction_business_satisfactionQuestions_fn.fn).answer(item, childItem.ItemId) ? "active_option" : ""),
- c: childIndex,
- d: common_vendor.o(choiceOption, `Checkbox-${index}-${childIndex}`),
- e: `Checkbox-${index}-${childIndex}`
- };
- }),
- s: index
- } : {}, {
- t: item.QuestType == "Select"
- }, item.QuestType == "Select" ? {
- v: common_vendor.t(item.QuestionItemList[item.AnswerList].ItemName),
- w: common_vendor.unref(utils_icon.icon).satisfaction.right,
- x: item.QuestionItemList,
- y: index,
- z: item.AnswerList,
- A: common_vendor.o(bindPickerChange, index)
- } : {}, {
- B: item.QuestType == "MatrixRadio" || item.QuestType == "MatrixCheckbox" || item.QuestType == "MatrixScale"
- }, item.QuestType == "MatrixRadio" || item.QuestType == "MatrixCheckbox" || item.QuestType == "MatrixScale" ? {
- C: common_vendor.f(item.MatrixQuestionList[0].QuestionItemList, (childItem, childIndex, i1) => {
- return {
- a: common_vendor.t(childItem.ItemName),
- b: `${item.QuestType}0-${index}-${childIndex}`
- };
- }),
- D: common_vendor.unref(pagesAdmin_satisfaction_business_satisfactionQuestions_fn.fn).getWidth(item.MatrixQuestionList[0].QuestionItemList.length) + "%",
- E: common_vendor.f(item.MatrixQuestionList, (childItem, childIndex, i1) => {
- return {
- a: common_vendor.t(childItem.Question),
- b: common_vendor.f(childItem.QuestionItemList, (sunItem, sunIndex, i2) => {
- return common_vendor.e(item.QuestType == "MatrixRadio" || item.QuestType == "MatrixScale" ? {
- a: common_vendor.unref(pagesAdmin_satisfaction_business_satisfactionQuestions_fn.fn).answer(childItem, sunItem.ItemId) ? common_vendor.unref(utils_icon.icon).satisfaction.circle_active : common_vendor.unref(utils_icon.icon).satisfaction.circle
- } : {}, item.QuestType == "MatrixCheckbox" ? {
- b: common_vendor.unref(pagesAdmin_satisfaction_business_satisfactionQuestions_fn.fn).answer(childItem, sunItem.ItemId) ? common_vendor.unref(utils_icon.icon).satisfaction.checkBox_circle_active : common_vendor.unref(utils_icon.icon).satisfaction.checkBox_circle
- } : {}, {
- c: sunIndex,
- d: common_vendor.o(choiceMatrixOption, `${item.QuestType}-${index}-${childIndex}-${sunIndex}`),
- e: `${item.QuestType}-${index}-${childIndex}-${sunIndex}`
- });
- }),
- c: childIndex,
- d: `${item.QuestType}-${index}-${childIndex}`
- };
- }),
- F: common_vendor.unref(pagesAdmin_satisfaction_business_satisfactionQuestions_fn.fn).getWidth(item.MatrixQuestionList[0].QuestionItemList.length) + "%",
- G: item.QuestType == "MatrixRadio" || item.QuestType == "MatrixScale",
- H: item.QuestType == "MatrixCheckbox",
- I: index
- } : {}, {
- J: item.QuestType == "UploadImage"
- }, item.QuestType == "UploadImage" ? {
- K: common_vendor.unref(utils_icon.icon).satisfaction.add,
- L: index,
- M: common_vendor.o(choiceFile, index),
- N: common_vendor.f(item.AnswerList, (imgItem, imgIndex, i1) => {
- return {
- a: imgItem,
- b: imgItem,
- c: common_vendor.o(closeImg, `UploadImage-${index}-${imgIndex}`),
- d: `UploadImage-${index}-${imgIndex}`
- };
- }),
- O: common_vendor.unref(utils_icon.icon).satisfaction.cha_green,
- P: index,
- Q: common_vendor.t(item.RuleInfo.FileSize),
- R: common_vendor.t(item.RuleInfo.FileCount)
- } : {}, {
- S: item.QuestType == "Scale"
- }, item.QuestType == "Scale" ? {
- T: common_vendor.f(item.QuestionItemList, (childItem, childIndex, i1) => {
- return {
- a: common_vendor.t(childItem.ItemName),
- b: common_vendor.unref(pagesAdmin_satisfaction_business_satisfactionQuestions_fn.fn).answer(item, childItem.ItemId) ? common_vendor.unref(utils_icon.icon).satisfaction.circle_active : common_vendor.unref(utils_icon.icon).satisfaction.circle,
- c: childIndex,
- d: common_vendor.o(choiceOption, `Scale-${index}-${childIndex}`),
- e: `Scale-${index}-${childIndex}`
- };
- }),
- U: index
- } : {}, {
- V: "p" + index,
- W: common_vendor.n(item.QuestType == "SubTitle" ? "sub_title" : ""),
- X: index
- });
- }),
- f: point.value,
- g: common_vendor.unref(utils_icon.icon).satisfaction.yjfk,
- h: common_vendor.o(yjfk),
- i: common_vendor.n(complete.value ? "backgroundCustom_D9" : ""),
- j: common_vendor.o(submit),
- k: showModal_Anonymous.value
- }, showModal_Anonymous.value ? {
- l: common_vendor.o(($event) => isAnonymous(1)),
- m: common_vendor.o(($event) => isAnonymous(2))
- } : {}, {
- n: showModal_User.value
- }, showModal_User.value ? common_vendor.e({
- o: currentUser.value.memberName
- }, currentUser.value.memberName ? {
- p: common_vendor.t(currentUser.value.memberName),
- q: common_vendor.t(currentUser.value.sex == 1 ? "男" : currentUser.value.sex == 2 ? "女" : "未知"),
- r: common_vendor.t(currentUser.value.age),
- s: common_vendor.t(currentUser.value.mobile),
- t: common_vendor.unref(utils_icon.icon).satisfaction.right,
- v: common_vendor.o(goSelMember)
- } : {}, {
- w: common_vendor.unref(utils_icon.icon).satisfaction.right,
- x: common_vendor.o(goSelMember),
- y: currentUser.value.memberName
- }, currentUser.value.memberName ? {
- z: common_vendor.o(goBack),
- A: common_vendor.o(confirmMember)
- } : {}) : {});
- };
- }
- });
- const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-8c1ff8ec"]]);
- wx.createPage(MiniProgramPage);
- //# sourceMappingURL=../../../../../.sourcemap/mp-weixin/pagesAdmin/satisfaction/business/satisfactionQuestions/satisfactionQuestions.js.map
|