Commit e62711ae by chenwq

feat(环境配置): 将默认环境索引改为2并添加日报模板列表

修改config.js中的默认环境索引为2以匹配预发布环境
在supervisorDaily.js中添加dailyReportTempList集中管理日报模板,替换多处硬编码的模板检查逻辑
1 parent 0d7f0f0a
......@@ -18,7 +18,7 @@ export const appId = "wx570d9331f9ace0bd";
* 4预发布
* 5cdptest
*/
let index = 1;
let index = 2;
const accountInfo = wx.getAccountInfoSync();
const systemInfo = wx.getSystemInfoSync();
const envName = accountInfo.miniProgram.envVersion;
......
......@@ -35,6 +35,7 @@ Page({
tabActive: "",
tabList: [],
dataAttrName: "tmlpFormData",
dailyReportTempList: ["qinggai-temp-001", "uuid-temp-001", "uuid-temp-011"],
/** 模版表单数据对象
* { 模版key: [ 模版下面的表单项数据对象 ] }
*/
......@@ -161,7 +162,7 @@ Page({
radioEvent(e) {
let pAttr = e.target.id;
let { attr } = e.detail;
let { tmlpFormData, tmlpObj, trainTmlpSuffix, tmlpCode } = this.data;
let { tmlpFormData, tmlpObj, trainTmlpSuffix, tmlpCode, dailyReportTempList } = this.data;
tmlpObj["organizeTraining" + trainTmlpSuffix]?.forEach((item) => {
if (!item.name.includes("isTrainingOrganized")) {
item.isHide = tmlpFormData[attr] == "否" ? true : false;
......@@ -181,7 +182,7 @@ Page({
}
const pAttrList = Object.keys(allRuleObj);
console.log(tmlpCode, "pAttrList---");
if (["qinggai-temp-001", "uuid-temp-001"].includes(tmlpCode)) {
if (dailyReportTempList.includes(tmlpCode)) {
pAttrList.forEach((pAttrItem) => {
tmlpObj[pAttrItem].forEach((item) => {
if (!item.name.includes("dayOffStatus")) {
......@@ -304,6 +305,7 @@ Page({
currentYear,
selectedMonth,
selectedWeek,
dailyReportTempList
} = this.data;
console.log(tmlpEditList, "tmlpEditList");
console.log(tmlpCode, "tmlpCode");
......@@ -337,7 +339,7 @@ Page({
}
this.setData({
hasDailyValue: false,
isTodayEdit: ["qinggai-temp-001", "uuid-temp-001"].includes(tmlpCode),
isTodayEdit: dailyReportTempList.includes(tmlpCode),
});
wx.$util.showLoading();
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!