diff --git a/app.js b/app.js index d10434d..52b554d 100644 --- a/app.js +++ b/app.js @@ -50,7 +50,8 @@ App({ globalData: { versionCode: 'V1', userInfo: {}, - headerUrl: "http://42.193.40.239:8017/" + // headerUrl: "http://42.193.40.239:8017/" + headerUrl: "http://192.168.110.186:8017/" }, // 文件服务器地址 @@ -61,7 +62,6 @@ App({ FileType: { avatar: "SysPhoto", // 用户头像 resumptionAcs: "WorkFile", // 履职附件 - taskAcs: "TaskAttachment", // 任务附件 msgAcs: "MsgAcs", // 消息附件 eventAcs: "eventAcs", //突发事件上报 diff --git a/app.json b/app.json index 507a949..8a037fe 100644 --- a/app.json +++ b/app.json @@ -10,20 +10,17 @@ "pages/msg/push-index/index", "pages/msg/push/index", "pages/web/index", - "pages/statistic/y-j/index/index", "pages/statistic/j-b-x-x/index/index", "pages/statistic/g-z-t-j/index/index", "pages/statistic/g-z-r-z/index/index", "pages/statistic/g-z-r-z/detail/index", - "pages/work/s-b/index/index", "pages/work/d-b-s-x/index/index", - "pages/work/d-b-s-x/detail/index", - "pages/emergency/y-a/index/index", "pages/emergency/s-b/index/index", - "pages/emergency/t-x/index/index" + "pages/emergency/t-x/index/index", + "pages/work/d-b-s-x/up/index" ], "window": { "backgroundTextStyle": "light", diff --git a/images/home/icon-emergency.png b/images/home/icon-emergency.png deleted file mode 100644 index e04fe41..0000000 Binary files a/images/home/icon-emergency.png and /dev/null differ diff --git a/images/home/icon_tab1.png b/images/home/icon_tab1.png index 83af2a2..d84a62f 100644 Binary files a/images/home/icon_tab1.png and b/images/home/icon_tab1.png differ diff --git a/images/home/icon_tab2.png b/images/home/icon_tab2.png index 6c608e3..8e8189e 100644 Binary files a/images/home/icon_tab2.png and b/images/home/icon_tab2.png differ diff --git a/images/home/icon_tab3.png b/images/home/icon_tab3.png index cb965da..1ce8ffa 100644 Binary files a/images/home/icon_tab3.png and b/images/home/icon_tab3.png differ diff --git a/images/home/icon_tab4.png b/images/home/icon_tab4.png index 0e2d84d..73150dc 100644 Binary files a/images/home/icon_tab4.png and b/images/home/icon_tab4.png differ diff --git a/images/home/icon_tab5.png b/images/home/icon_tab5.png deleted file mode 100644 index f13c610..0000000 Binary files a/images/home/icon_tab5.png and /dev/null differ diff --git a/images/home/icon_w_1.png b/images/home/icon_w_1.png new file mode 100644 index 0000000..90fb680 Binary files /dev/null and b/images/home/icon_w_1.png differ diff --git a/images/home/icon_w_2.png b/images/home/icon_w_2.png new file mode 100644 index 0000000..bcf692d Binary files /dev/null and b/images/home/icon_w_2.png differ diff --git a/images/home/icon_w_3.png b/images/home/icon_w_3.png new file mode 100644 index 0000000..af3f7a1 Binary files /dev/null and b/images/home/icon_w_3.png differ diff --git a/images/home/icon_yj_1.png b/images/home/icon_yj_1.png new file mode 100644 index 0000000..7066d21 Binary files /dev/null and b/images/home/icon_yj_1.png differ diff --git a/images/home/icon_yj_2.png b/images/home/icon_yj_2.png new file mode 100644 index 0000000..9813478 Binary files /dev/null and b/images/home/icon_yj_2.png differ diff --git a/images/home/icon_yj_3.png b/images/home/icon_yj_3.png new file mode 100644 index 0000000..9883feb Binary files /dev/null and b/images/home/icon_yj_3.png differ diff --git a/pages/index/index.js b/pages/index/index.js index 8f3bccc..52c18b8 100644 --- a/pages/index/index.js +++ b/pages/index/index.js @@ -183,48 +183,48 @@ Page({ name: "工作日志", href: "/pages/statistic/g-z-r-z/index/index" }, { - icon: "icon_tab1", + icon: "icon_tab2", name: "工作统计", href: "/pages/statistic/g-z-t-j/index/index" }, { - icon: "icon_tab1", + icon: "icon_tab3", name: "应急统计", href: "/pages/statistic/y-j/index/index" }, { - icon: "icon_tab1", + icon: "icon_tab4", name: "基本信息", href: "/pages/statistic/j-b-x-x/index/index" }], // 工作台 tab2: [{ - icon: "icon_tab6", + icon: "icon_w_1", name: "上报动态", href: "/pages/work/s-b/index/index", }, { - icon: "icon_tab2", + icon: "icon_w_2", name: "待办事项", href: "/pages/work/d-b-s-x/index/index?id=0" }, { - icon: "icon_tab4", + icon: "icon_w_3", name: "已办事项", href: "/pages/work/d-b-s-x/index/index?id=1" }, ], // 应急指挥 tab3: [{ - icon: "icon_tab5", + icon: "icon_yj_1", name: "应急预案", href: "/pages/emergency/y-a/index/index", }, { - icon: "icon_tab5", + icon: "icon_yj_2", name: "事件上报", href: "/pages/emergency/s-b/index/index" }, { - icon: "icon_tab5", + icon: "icon_yj_3", name: "应急通讯录", href: "/pages/emergency/t-x/index/index" }, diff --git a/pages/logs/logs.js b/pages/logs/logs.js index 85f6aac..a856148 100644 --- a/pages/logs/logs.js +++ b/pages/logs/logs.js @@ -6,13 +6,6 @@ Page({ logs: [] }, onLoad() { - this.setData({ - logs: (wx.getStorageSync('logs') || []).map(log => { - return { - date: util.formatTime(new Date(log)), - timeStamp: log - } - }) - }) - } -}) + + }, +}) \ No newline at end of file diff --git a/pages/logs/logs.wxml b/pages/logs/logs.wxml index 0b6b645..600a10a 100644 --- a/pages/logs/logs.wxml +++ b/pages/logs/logs.wxml @@ -1,6 +1,4 @@ - - {{index + 1}}. {{log.date}} - - + {{s}} + \ No newline at end of file diff --git a/pages/statistic/g-z-r-z/index/index.js b/pages/statistic/g-z-r-z/index/index.js index f66b7f2..af5e389 100644 --- a/pages/statistic/g-z-r-z/index/index.js +++ b/pages/statistic/g-z-r-z/index/index.js @@ -56,7 +56,7 @@ Page({ */ getList: function () { const time = this.data.currentIndex == 0 ? formatTime(new Date(), '-') : this.data.dateFilter - app.axios("GET", "app", "/work/sendWorkPage", { + app.axios("GET", "app", "/work/wkDynamicsPage", { page: this.data.page, limit: this.data.pageSize, startTime: time, @@ -109,6 +109,7 @@ Page({ * 生命周期函数--监听页面显示 */ onShow() { + this.data.page = 1; this.getList(); }, diff --git a/pages/work/d-b-s-x/detail/index.js b/pages/work/d-b-s-x/detail/index.js deleted file mode 100644 index 461c13b..0000000 --- a/pages/work/d-b-s-x/detail/index.js +++ /dev/null @@ -1,207 +0,0 @@ -// pages/task/check/index/index.js -import * as echarts from '../../../../ec-canvas/echarts'; -let chart = null; -const app = getApp() - -/** - * 获取像素比 - */ -const getPixelRatio = () => { - let pixelRatio = 0 - wx.getSystemInfo({ - success: function (res) { - pixelRatio = res.pixelRatio - }, - fail: function () { - pixelRatio = 0 - } - }) - return pixelRatio -} - -/** - * 设置echarts - */ -function initChart(data) { - if (chart == null) return - chart.init((canvas, width, height) => { - var dpr = getPixelRatio(); - const chart = echarts.init(canvas, null, { - width: width, - height: height, - devicePixelRatio: dpr - }); - canvas.setChart(chart); - - const option = { - angleAxis: { - show: false, - max: (100 * 360) / 180, //-45度到225度,二者偏移值是270度除360度 - type: "value", - startAngle: 180, //极坐标初始角度 - splitLine: { - show: false, - }, - }, - barMaxWidth: 10, //圆环宽度 - radiusAxis: { - show: false, - type: "category", - }, - //圆环位置和大小 - polar: { - center: ["50%", "80%"], - radius: "250%", - }, - - series: [{ - type: "bar", - data: [{ - //上层圆环,显示数据 - value: 50, - itemStyle: { - color: "#0062FF", - }, - }, ], - barGap: "-100%", //柱间距离,上下两层圆环重合 - coordinateSystem: "polar", - roundCap: true, //顶端圆角 - z: 3, //圆环层级,同zindex - }, - { - //下层圆环,显示最大值 - type: "bar", - data: [{ - value: 100, - itemStyle: { - color: "#EBEDF0", - borderWidth: 0, - }, - }, ], - barGap: "-100%", - coordinateSystem: "polar", - roundCap: true, - z: 1, - }, - //仪表盘 - { - type: "gauge", - axisLine: { - show: false, - }, - splitLine: { - show: false, - }, - axisTick: { - show: false, - }, - axisLabel: { - show: false, - }, - splitLabel: { - show: false, - }, - pointer: false, - detail: { - formatter: function () { - return `{number|${50 + "%\n"}}{wcl|完成进度}`; - }, - rich: { - number: { - fontSize: 18, - textAlign: "center", - color: "#202229", - fontWeight: "bolder", - }, - wcl: { - fontSize: 12, - textAlign: "center", - color: "#606977", - }, - }, - color: "#fff", - offsetCenter: ["0", "20"], - }, - title: { - show: false, - }, - data: [{ - value: 50, - }, ], - }, - ], - }; - - chart.clear(); - chart.setOption(option); - return chart; - }) -} - -Page({ - - /** - * 页面的初始数据 - */ - data: { - topBarH: app.globalData.CustomBar, - }, - - /** - * 生命周期函数--监听页面加载 - */ - onLoad(options) { - - }, - - /** - * 生命周期函数--监听页面初次渲染完成 - */ - onReady() { - chart = this.selectComponent('#d-chart') - initChart({}) - this.setData(this.data) - }, - - /** - * 生命周期函数--监听页面显示 - */ - onShow() { - - }, - - /** - * 生命周期函数--监听页面隐藏 - */ - onHide() { - - }, - - /** - * 生命周期函数--监听页面卸载 - */ - onUnload() { - - }, - - /** - * 页面相关事件处理函数--监听用户下拉动作 - */ - onPullDownRefresh() { - - }, - - /** - * 页面上拉触底事件的处理函数 - */ - onReachBottom() { - - }, - - /** - * 用户点击右上角分享 - */ - onShareAppMessage() { - - } -}) \ No newline at end of file diff --git a/pages/work/d-b-s-x/detail/index.json b/pages/work/d-b-s-x/detail/index.json deleted file mode 100644 index 965b8e8..0000000 --- a/pages/work/d-b-s-x/detail/index.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "usingComponents": {}, - "navigationStyle": "custom" -} \ No newline at end of file diff --git a/pages/work/d-b-s-x/detail/index.wxml b/pages/work/d-b-s-x/detail/index.wxml deleted file mode 100644 index d25bec3..0000000 --- a/pages/work/d-b-s-x/detail/index.wxml +++ /dev/null @@ -1,42 +0,0 @@ - - - - - - - - - 基本信息 - - - 任务周期: - 2022-09-15至2022-09-20 - - - 发布时间: - 2022-09-15 - - - 发布人: - 某某人 - - - 事项内容: - 关于某某某某某某某某某某某项工作的任务要求,关于某某某某某某某某工作的任务要求。 - - - - - - - - - 完成进度 - - - - - - - - \ No newline at end of file diff --git a/pages/work/d-b-s-x/detail/index.wxss b/pages/work/d-b-s-x/detail/index.wxss deleted file mode 100644 index 9d986f8..0000000 --- a/pages/work/d-b-s-x/detail/index.wxss +++ /dev/null @@ -1,77 +0,0 @@ -/* pages/task/check/index/index.wxss */ -.item-bg { - padding: 20rpx 20rpx 0rpx 20rpx; - background-color: #f5f5f5; -} - -.item { - background: #FFFFFF; - box-shadow: 0rpx 0rpx 12rpx 2rpx #DDECF3; - border-radius: 12rpx; - padding: 16rpx; -} - -.item .content { - padding: 15rpx 0; - border-bottom: 1rpx dashed #f5f5f5; -} - -.item .file::before { - display: block; - content: ' '; - width: 20rpx; - height: 20rpx; - margin-right: 20rpx; - border-radius: 50%; - background-color: var(--blue); -} - -.item .lab { - font-size: 28rpx; - font-weight: bold; - color: #222222; -} - -.item .val { - font-size: 28rpx; - color: #222222; -} - -.item .cloud { - width: 40rpx; - height: 40rpx; - margin-left: 20rpx; -} - -.item .people { - width: calc((100vw - 120rpx) / 4); - margin-top: 20rpx; -} - -.item .people .avatar { - width: 88rpx; - height: 88rpx; - border-radius: 50%; - background-color: #f5f5f5; -} - -.item .people .name { - font-size: 28rpx; - font-weight: bold; - color: #222222; -} - -.item .single { - width: 8rpx; - height: 34rpx; - background: #4882EE; - border-radius: 4rpx; - margin-right: 10rpx; -} - -.item-bg .charts { - width: 280rpx; - height: 200rpx; - margin-right: 30rpx; - margin-top: 30rpx; -} \ No newline at end of file diff --git a/pages/work/d-b-s-x/index/index.js b/pages/work/d-b-s-x/index/index.js index a07b01c..3ce61e2 100644 --- a/pages/work/d-b-s-x/index/index.js +++ b/pages/work/d-b-s-x/index/index.js @@ -16,11 +16,19 @@ Page({ lab: '已办事项', val: 1 }], - list: [{ - type: 0 - }, { - type: 1 - }] + + page: 1, + pageSize: 10, + list: [] + }, + + /** + * 输入内容 + */ + inputContent: function (e) { + const name = e.currentTarget.dataset.name; + this.data[name] = e.detail.value; + this.refresh(); }, /** @@ -29,9 +37,56 @@ Page({ tabSelect: function (params) { const index = params.currentTarget.dataset.index; this.data.curTab = index; + this.data.freshIng = true; this.setData(this.data) }, + /** + * 时间筛选 + */ + bindDateChange: function (params) { + const name = params.currentTarget.dataset.name; + this.data[name] = params.detail.value; + this.data.freshIng = true; + this.setData(this.data); + }, + + /** + * 刷新 + */ + refresh: function (params) { + this.data.page = 1; + this.getList(); + }, + + /** + * 获取列表 + */ + getList: function () { + app.axios("GET", "app", "/work/receiveWork", { + page: this.data.page, + limit: this.data.pageSize, + startTime: this.data.startTime || '', + endTime: this.data.endTime || '', + condition: this.data.condition || '', + state: parseInt(this.data.curTab) + 1, + userId: app.globalData.userInfo.userId + }, false).then(res => { + this.data.freshIng = false; + if (res.code == 1) { + let page = Number.parseInt(res.data.pageNum); + if (this.data.page == 1) { + this.data.list = res.data.list; + } else { + var list = this.data.list; + if (this.data.page == page) this.data.list = [...list, ...res.data.list] + } + if (res.data.list?.length > 0) this.data.page = page + 1 + } + this.setData(this.data) + }) + }, + /** * 跳转详情 */ @@ -42,11 +97,26 @@ Page({ }) }, + /** + * 前往上传 + */ + toUp: function (params) { + const item = params.currentTarget.dataset.item; + const detail = params.currentTarget.dataset.detail; + wx.navigateTo({ + url: `/pages/work/d-b-s-x/up/index?detail=${detail}`, + success: res => { + res.eventChannel.emit('getItem', item) + } + }) + }, + /** * 生命周期函数--监听页面加载 */ onLoad(options) { this.data.curTab = options.id; + this.data.freshIng = true; this.setData(this.data) }, diff --git a/pages/work/d-b-s-x/index/index.wxml b/pages/work/d-b-s-x/index/index.wxml index 48a8a5a..42986ec 100644 --- a/pages/work/d-b-s-x/index/index.wxml +++ b/pages/work/d-b-s-x/index/index.wxml @@ -12,35 +12,38 @@ - + - + - 开始时间: {{dateFilter}} + 开始时间: {{startTime}} - + - 结束时间: {{dateFilter}} + 结束时间: {{endTime}} - + - + - 常规工作 - 督办工作 - - 关于某某某某某某某某某某某项工作的任务要求,关于某某某某某某某某工作的任务要求。 + {{item.typeName}} + 前往完成 + 查看详情 + {{item.title}} + 任务周期:{{item.startTime}} 至 {{item.endTime}} + 接收时间:{{item.createTime}} + \ No newline at end of file diff --git a/pages/work/d-b-s-x/index/index.wxss b/pages/work/d-b-s-x/index/index.wxss index fc98f46..ba3a127 100644 --- a/pages/work/d-b-s-x/index/index.wxss +++ b/pages/work/d-b-s-x/index/index.wxss @@ -82,10 +82,23 @@ page { } .item .tv { - font-size: 28rpx; - font-weight: 500; + font-size: 32rpx; color: #222222; padding-top: 20rpx; + margin-bottom: 10rpx; +} + +.item .time { + font-size: 26rpx; + color: #666666; + padding-top: 10rpx; +} + +.item .done { + color: rgb(12, 118, 240); + border-radius: 8rpx; + padding: 5rpx 20rpx; + background-color: rgba(0, 0, 0, 0.2); } .item .bottom { diff --git a/pages/work/d-b-s-x/up/index.js b/pages/work/d-b-s-x/up/index.js new file mode 100644 index 0000000..e7dfedb --- /dev/null +++ b/pages/work/d-b-s-x/up/index.js @@ -0,0 +1,262 @@ +// 上报动态 +import Utils from "../../../../utils/util" +const app = getApp(); + +Page({ + + /** + * 页面的初始数据 + */ + data: { + topBarH: app.globalData.CustomBar, + baseUrl: app.FILE_SERVER_URL, + + dateFilter: Utils.formatTime(new Date(), '-'), + showTypePop: false, + showTaskPop: false, + TypeData: [], + postData: {} + }, + + /** + * 时间 + */ + bindDateChange: function (params) { + const name = params.currentTarget.dataset.name; + this.data.postData[name] = params.detail.value; + this.setData(this.data) + }, + + /** + * 显示/关闭任务弹窗 + */ + popTaskModal: function (params) { + const type = params.currentTarget.dataset.type; + this.data[type] = !this.data[type]; + this.setData(this.data) + }, + + /** + * 显示/关闭弹窗 + */ + popModal: function (params) { + const type = params.currentTarget.dataset.type; + this.data[type] = !this.data[type]; + this.setData(this.data) + }, + + /** + * 通知类型 + */ + typeChange: function (params) { + const index = params.currentTarget.dataset.index; + this.data.postData.type = index + 1; + this.data.postData.typeId = this.data.TypeData[index].typeId; + this.data.showTypePop = false; + this.setData(this.data) + }, + + /** + * 输入内容 + */ + inputContent: function (e) { + const name = e.currentTarget.dataset.name; + this.data.postData[name] = e.detail.value; + }, + + /** + * 选择文件 + */ + chooseFile: function () { + wx.chooseImage({ + count: 1, + type: 'all', + success: (res) => { + const tempFilePaths = res.tempFiles; + const path = tempFilePaths[0].path; + this.postImg(path) + } + }) + }, + + /** + * 获取工作类型 + */ + getType: function () { + app.axios("GET", "app", "/work/wkTypes", { + classify: 2 + }).then(res => { + if (res.code == 1) { + this.data.TypeData = res.data; + this.setData(this.data) + } + }) + }, + + /** + * 上传图片 + */ + postImg(filePath) { + wx.showLoading({ + title: '文件上传中...', + }) + app.uploadFile(this.data.detail.wkUserId, app.FileType.resumptionAcs, filePath).then(res => { + wx.hideLoading(); + this.getFiles(); + }) + }, + + /** + * 获取图片 + */ + getFiles: function () { + app.axios("GET", "common", "/upload/getFile", { + otcid: this.data.detail.wkUserId, + otctype: app.FileType.resumptionAcs + }).then(res => { + if (res.code == 1) { + this.data.files = res.data; + this.setData(this.data) + } + }) + }, + + /** + * 删除图片 + * @param {*} params + */ + deleteFile: function (e) { + var id = e.currentTarget.dataset.id; + wx.showModal({ + title: '删除提示', + content: '是否要删除该附件?', + success: (res) => { + if (res.confirm) { + app.axios("GET", 'common', "/upload/delFile", { + documentId: id, + }).then(res => { + if (res.code == 1) { + this.getFiles(); + } + }) + } + } + }) + }, + + /** + * 发布 + */ + push: function () { + this.data.postData.userId = app.globalData.userInfo.userId; + this.data.postData.wkUserId = this.data.detail.wkUserId; + if (!this.data.postData.workContent) { + wx.showToast({ + title: '请输入内容', + icon: 'none' + }) + return + } + if (!this.data.postData.completionTime) { + wx.showToast({ + title: '请设置时间', + icon: 'none' + }) + return + } + app.axios("POST", "app", "/work/receiveWorkComplete", this.data.postData).then(res => { + if (res.code == 1) { + wx.showToast({ + title: '发布成功', + icon: 'none' + }) + setTimeout(() => { + wx.navigateBack() + }, 1500); + } else { + wx.showToast({ + title: res.message, + icon: 'none' + }) + } + }) + }, + + /** + * 预览文件 + */ + filePre: function (params) { + const url = params.currentTarget.dataset.url; + const imgs = []; + this.data.files.forEach(item => { + imgs.push(this.data.baseUrl + item.filepath) + }) + wx.previewImage({ + urls: imgs, + current: this.data.baseUrl + url + }) + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad(options) { + this.data.readonly = options.detail == 1; + const eventChannel = this.getOpenerEventChannel() + eventChannel.on('getItem', (item) => { + this.data.detail = item; + if (this.data.readonly) this.data.postData = item; + this.setData(this.data) + this.getFiles(); + }) + }, + + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady() { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow() { + + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide() { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload() { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh() { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom() { + + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage() { + + } +}) \ No newline at end of file diff --git a/pages/work/d-b-s-x/up/index.json b/pages/work/d-b-s-x/up/index.json new file mode 100644 index 0000000..c666f1f --- /dev/null +++ b/pages/work/d-b-s-x/up/index.json @@ -0,0 +1,6 @@ +{ + "usingComponents": { + "tree": "/components/tree/index" + }, + "navigationStyle": "custom" +} \ No newline at end of file diff --git a/pages/work/d-b-s-x/up/index.wxml b/pages/work/d-b-s-x/up/index.wxml new file mode 100644 index 0000000..5c6c5c9 --- /dev/null +++ b/pages/work/d-b-s-x/up/index.wxml @@ -0,0 +1,71 @@ + + + + + + + + 任务标题 + + + + + + 任务类型 + + + + + + 任务周期 + + + + + 开始时间: {{detail.startTime||'-'}} + + + + + 结束时间: {{detail.endTime||'-'}} + + + + + + + + + 完成情况 + + + + + + 完成时间 + + + + + 选择时间: {{postData.completionTime||'-'}} + + + + + + + 附件 + 添加图片 + + + + + + + + + + + + 上报 + \ No newline at end of file diff --git a/pages/work/d-b-s-x/up/index.wxss b/pages/work/d-b-s-x/up/index.wxss new file mode 100644 index 0000000..6ccb7fa --- /dev/null +++ b/pages/work/d-b-s-x/up/index.wxss @@ -0,0 +1,113 @@ +/* pages/msg/push/index.wxss */ +scroll-view { + background-color: #f5f5f5; + box-sizing: border-box; +} + +.filter { + margin: 0 10rpx; + height: 80rpx; + display: flex; + flex-direction: row; + background-color: white; + border-radius: 10rpx; +} + +.filter picker { + flex: 1; + height: 100%; + display: flex; + align-items: center; +} + +.item { + background-color: #ffffff; + margin: 32rpx 20rpx 20rpx 20rpx; + padding: 20rpx; + position: relative; + border-radius: 10rpx; + z-index: 2; +} + +.item .header { + margin-top: 16rpx; +} + +.item .header .single { + width: 8rpx; + height: 36rpx; + background: #4882EE; + border-radius: 4rpx; + margin-right: 10rpx; +} + +.item .header .title { + font-size: 30rpx; + font-weight: bold; + color: #222222; +} + +.item .put { + width: 100%; + background: #F5F7FC; + border-radius: 12rpx; + min-height: 72rpx; + padding: 15rpx; + margin-top: 16rpx; + color: #333333; + font-size: 28rpx; +} + +.grid { + margin-top: 20rpx; + display: grid; + grid-gap: 20rpx 20rpx; + grid-template-columns: calc((100vw - 140rpx)/3) auto auto; +} + +.grid .img { + width: calc((100vw - 140rpx)/3); + height: calc((100vw - 140rpx)/3); + background-color: #f5f5f5; + border-radius: 10rpx; +} + +.grid .del { + position: absolute; + bottom: 0; + left: 0; + z-index: 1; + font-size: 40rpx; +} + +.option { + position: fixed; + bottom: calc(constant(safe-area-inset-bottom) + 30rpx); + bottom: calc(env(safe-area-inset-bottom) + 30rpx); + left: 0; + right: 0; + margin-top: 30rpx; + padding: 16rpx 32rpx; + background: #FFFFFF; + box-shadow: 0rpx 0rpx 12rpx 2rpx #DDECF3; + z-index: 10; +} + +.option .btn { + padding: 14rpx; + display: flex; + align-items: center; + justify-content: center; + background: #409CFF; + color: #FFFFFF; + border-radius: 12rpx; +} + +.option .btn:active { + opacity: 0.8; +} + +.space { + height: calc(constant(safe-area-inset-bottom) + 150rpx); + height: calc(env(safe-area-inset-bottom) + 150rpx); +} \ No newline at end of file diff --git a/pages/work/s-b/index/index.js b/pages/work/s-b/index/index.js index 209f919..39c21e1 100644 --- a/pages/work/s-b/index/index.js +++ b/pages/work/s-b/index/index.js @@ -25,7 +25,6 @@ Page({ const name = params.currentTarget.dataset.name; this.data.postData[name] = params.detail.value; this.setData(this.data) - console.info(this.data.postData) }, /** @@ -85,7 +84,7 @@ Page({ */ getType: function () { app.axios("GET", "app", "/work/wkTypes", { - classify: 1 + classify: 2 }).then(res => { if (res.code == 1) { this.data.TypeData = res.data; @@ -150,8 +149,7 @@ Page({ */ push: function () { this.data.postData.userId = app.globalData.userInfo.userId; - this.data.postData.workId = this.data.uuid; - this.data.postData.listperformid = ''; + this.data.postData.dynamicsId = this.data.uuid; if (!this.data.postData.title) { wx.showToast({ title: '请输入工作标题', @@ -180,7 +178,7 @@ Page({ }) return } - app.axios("POST", "app", "/work/workAdd", this.data.postData).then(res => { + app.axios("POST", "app", "/work/wkDynamicsAdd", this.data.postData).then(res => { if (res.code == 1) { wx.showToast({ title: '发布成功', diff --git a/pages/work/s-b/index/index.wxml b/pages/work/s-b/index/index.wxml index fbfeadd..33f4338 100644 --- a/pages/work/s-b/index/index.wxml +++ b/pages/work/s-b/index/index.wxml @@ -19,7 +19,7 @@ 工作内容 - + @@ -37,12 +37,6 @@ - - - - 关闭任务 - - @@ -62,7 +56,7 @@ 上报 - + @@ -81,24 +75,4 @@ - - - - - - 选择需要完成的任务 - - - - - - - - - - - - \ No newline at end of file