From 4e127bf4cf2647ef3b469d3e805fe64a450b9a97 Mon Sep 17 00:00:00 2001 From: haha Date: Sun, 3 Aug 2025 18:18:48 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9svg-icon?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- yanzhu-ui-app/.vscode/settings.json | 5 +- .../pageage/project_checked/add/index.js | 111 +++++++--------- .../pageage/project_checked/add/index.wxml | 110 +++++++++++----- .../pageage/project_checked/list/index.wxml | 119 +++++++++++++----- yanzhu-ui-app/miniprogram/project.config.json | 2 + 5 files changed, 222 insertions(+), 125 deletions(-) diff --git a/yanzhu-ui-app/.vscode/settings.json b/yanzhu-ui-app/.vscode/settings.json index a76fba2d..a9242489 100644 --- a/yanzhu-ui-app/.vscode/settings.json +++ b/yanzhu-ui-app/.vscode/settings.json @@ -22,5 +22,8 @@ "minapp-vscode.format.printWidth": 100, "minapp-vscode.format.useTabs": false, "minapp-vscode.disableCustomComponentAutocompletion": false, - "minapp-vscode.disableAutoWxssCompelte": false + "minapp-vscode.disableAutoWxssCompelte": false, + "less.compile": { + "outExt": ".wxss" + } } \ No newline at end of file diff --git a/yanzhu-ui-app/miniprogram/pageage/project_checked/add/index.js b/yanzhu-ui-app/miniprogram/pageage/project_checked/add/index.js index 441f5b41..e232a628 100644 --- a/yanzhu-ui-app/miniprogram/pageage/project_checked/add/index.js +++ b/yanzhu-ui-app/miniprogram/pageage/project_checked/add/index.js @@ -1,40 +1,36 @@ // pageage/project_checked/add/index.js -import config from '../../../config' -import fmt from '../../../utils/date.js' -import { - getToken, - getUserInfo -} from '../../../utils/auth' +import config from "../../../config"; +import fmt from "../../../utils/date.js"; +import { getToken, getUserInfo } from "../../../utils/auth"; import { projectCheckedList, - projectCheckedListCount -} from '../../../api/project' + projectCheckedListCount, +} from "../../../api/project"; import { findPlanDatas, findRecursionPlan, findPreviousSchedule, - submitPlanSchedule -} from '../../../api/project' + submitPlanSchedule, +} from "../../../api/project"; -const app = getApp() +const app = getApp(); Page({ - /** * 页面的初始数据 */ data: { maxDate: new Date(2088, 1, 1).getTime(), - minDate: new Date().getTime() + (3600 * 48 * 1000), + minDate: new Date().getTime() + 3600 * 48 * 1000, form: { - taskName: '', + taskName: "", task: null, - intro: '',//验收描述 + intro: "", //验收描述 imageUrls: [], - groupDeptUser: '',//班组长 - checkingDate: '',//验收时间 - technicianUser: '',//技术专员 - superviseUser: '',//监理专员 + groupDeptUser: "", //班组长 + checkingDate: "", //验收时间 + technicianUser: "", //技术专员 + superviseUser: "", //监理专员 }, projectUserInfo: {}, projectId: "", @@ -55,8 +51,8 @@ Page({ onLoad(options) { if (!getToken()) { wx.redirectTo({ - url: '../../../pages/login/login', - }) + url: "../../../pages/login/login", + }); } const proUserInfo = getUserInfo(); this.setData({ @@ -72,11 +68,11 @@ Page({ listData: [], total: 0, form: { - taskName: '', + taskName: "", task: null, - intro: '', - checkingDate: fmt(new Date()).format("YYYY-MM-DD HH:mm:ss"), - } + intro: "", + checkingDate: fmt(new Date()).format("YYYY-MM-DD"), + }, }); this.initPlanDatas(); }, @@ -96,28 +92,28 @@ Page({ findPlanDatas(app.globalData.useProjectId).then((res) => { let treeDatas = this.buildTree(res.data, 1, ""); this.setData({ - planOptions: treeDatas - }) + planOptions: treeDatas, + }); }); }, closePicker() { this.setData({ - picker: false - }) + picker: false, + }); }, /** - * 打开选择窗 - */ + * 打开选择窗 + */ openPicker() { this.setData({ - picker: true - }) + picker: true, + }); }, /** - * 构建树结构 - * @param {*} all - * @param {*} id - */ + * 构建树结构 + * @param {*} all + * @param {*} id + */ buildTree(all, id, path) { let tmps = all.filter((d) => d.parentId == id); if (tmps.length > 0) { @@ -134,65 +130,51 @@ Page({ this.setData({ form: { task: item, - taskName: item.fullPath + taskName: item.fullPath, }, - picker: false - }) + picker: false, + }); } }, /** * 生命周期函数--监听页面初次渲染完成 */ - onReady() { - - }, + onReady() {}, /** * 生命周期函数--监听页面显示 */ - onShow() { - - }, + onShow() {}, /** * 生命周期函数--监听页面隐藏 */ - onHide() { - - }, + onHide() {}, /** * 生命周期函数--监听页面卸载 */ - onUnload() { - - }, + onUnload() {}, /** * 页面相关事件处理函数--监听用户下拉动作 */ - onPullDownRefresh() { - - }, + onPullDownRefresh() {}, /** * 页面上拉触底事件的处理函数 */ - onReachBottom() { - - }, + onReachBottom() {}, /** * 用户点击右上角分享 */ - onShareAppMessage() { - - }, + onShareAppMessage() {}, returnToPage: function () { /*关闭当前页面,跳转到其它页面。*/ wx.redirectTo({ - url: '../list/index', - }) + url: "../list/index", + }); }, onScrollToLower() { let nal = Math.ceil(this.data.total / this.data.pageSize); @@ -205,5 +187,4 @@ Page({ console.log("已经到底了,没有数据可加载!!!"); } }, - -}) \ No newline at end of file +}); diff --git a/yanzhu-ui-app/miniprogram/pageage/project_checked/add/index.wxml b/yanzhu-ui-app/miniprogram/pageage/project_checked/add/index.wxml index bb567664..fb243780 100644 --- a/yanzhu-ui-app/miniprogram/pageage/project_checked/add/index.wxml +++ b/yanzhu-ui-app/miniprogram/pageage/project_checked/add/index.wxml @@ -1,6 +1,6 @@ - + @@ -14,18 +14,32 @@ - - + + 分包单位 - {{projectUserInfo.subDeptName}} - + {{ projectUserInfo.subDeptName }} 工程部位 -