新增发布工作

This commit is contained in:
du 2024-06-07 15:58:25 +08:00
parent 8d356e43e6
commit 120e49a293
14 changed files with 229 additions and 74 deletions

7
app.js
View File

@ -52,8 +52,8 @@ App({
userInfo: {}, userInfo: {},
// headerUrl: "http://42.193.40.239:8017/" //线上 // headerUrl: "http://42.193.40.239:8017/" //线上
// headerUrl: "http://192.168.110.10:8017/" //线下 // headerUrl: "http://192.168.110.10:8017/" //线下
headerUrl: "http://192.168.110.186:8017/" // headerUrl: "http://192.168.110.186:8017/"
// headerUrl: "https://city.sczysoft.com/df/" headerUrl: "https://city.sczysoft.com/df/"
}, },
// https://city.sczysoft.com/df/doc.html //接口 // https://city.sczysoft.com/df/doc.html //接口
// https://city.sczysoft.com/dffile //查看拼接 // https://city.sczysoft.com/dffile //查看拼接
@ -72,13 +72,14 @@ App({
resumptionAcs: "WorkFile", // 履职附件 resumptionAcs: "WorkFile", // 履职附件
msgAcs: "MsgAcs", // 消息附件 msgAcs: "MsgAcs", // 消息附件
eventAcs: "eventAcs", //突发/应急事件上报 eventAcs: "eventAcs", //突发/应急事件上报
demandsEscalation :"demandsEscalation",//群众诉求上报
userSign: "UserSign", //用户签名 userSign: "UserSign", //用户签名
EmergencyImg: "Content", // 应急预案---一图一表 EmergencyImg: "Content", // 应急预案---一图一表
EmergencyFile: "EmergencyFile", // 应急预案---文件 EmergencyFile: "EmergencyFile", // 应急预案---文件
EmergencyPlanFile: "EmergencyPlanFile", // 应急演练---文件 EmergencyPlanFile: "EmergencyPlanFile", // 应急演练---文件
workManagement : 'workManagement',//工作管理
}, },
// 请求函数封装 // 请求函数封装

Binary file not shown.

Before

Width:  |  Height:  |  Size: 356 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

View File

@ -8,10 +8,10 @@ Page({
* 页面的初始数据 * 页面的初始数据
*/ */
data: { data: {
username: 'admin', // username: 'admin',
password: 'Daofu202406', // password: 'Daofu202406',
// username: '', username: '',
// password: '', password: '',
showLogin: true, showLogin: true,
newname:'', newname:'',
newphone:'', newphone:'',

View File

@ -1,5 +1,5 @@
<!--pages/login/index.wxml--> <!--pages/login/index.wxml-->
<image class="bg-img" src="/images/bg.png" mode="aspectFill" /> <image class="bg-img" src="https://city.sczysoft.com/dffile/resource/df/bg.png" mode="aspectFill" />
<view class="top"> <view class="top">
<text class="nh">您好!</text> <text class="nh">您好!</text>
<text class="des">欢迎来到鲜水镇“智慧鲜水”数字化平台</text> <text class="des">欢迎来到鲜水镇“智慧鲜水”数字化平台</text>

View File

@ -224,9 +224,17 @@ Page({
*/ */
toMsgDetail: function (params) { toMsgDetail: function (params) {
const item = params.currentTarget.dataset.item; const item = params.currentTarget.dataset.item;
wx.navigateTo({ console.log(params,'params===>');
url: `/pages/the-masses/web/index?id=${item.publicContentId}`, if (params.currentTarget.dataset.type == 'partyMember') {
}) wx.navigateTo({
url: `/pages/the-masses/web/index?id=${item.learnContentId}&type=partyMember`,
})
}else{
wx.navigateTo({
url: `/pages/the-masses/web/index?id=${item.publicContentId}&type=publicContent`,
})
}
}, },
/** /**

View File

@ -45,11 +45,11 @@
<!-- 云学习 --> <!-- 云学习 -->
<swiper wx:if="{{curTab==2}}" class="item-bg swiper-msg" autoplay indicator-dots indicator-active-color='#ffffff'> <swiper wx:if="{{curTab==2}}" class="item-bg swiper-msg" autoplay indicator-dots indicator-active-color='#ffffff'>
<swiper-item class="item" wx:for="{{notice}}" wx:key="{{item}}"> <swiper-item class="item" wx:for="{{notice}}" wx:key="{{item}}">
<image catchtap="toMsgDetail" data-item="{{item}}" class="img" src="{{baseImgUrl+item.coverPath}}" mode="widthFix"></image> <image catchtap="toMsgDetail" data-type="partyMember" data-item="{{item}}" class="img" src="{{baseImgUrl+item.coverPath}}" mode="widthFix"></image>
<text class="title ellipsis">{{item.title}}</text> <text class="title ellipsis">{{item.title}}</text>
</swiper-item> </swiper-item>
</swiper> </swiper>
<view wx:if="{{curTab==2}}" class="studyOption" wx:for="{{list}}" wx:key="{{item}}" catchtap="toMsgDetail" data-item="{{item}}"> <view wx:if="{{curTab==2}}" class="studyOption" wx:for="{{list}}" wx:key="{{item}}" catchtap="toMsgDetail" data-item="{{item}}" data-type="partyMember">
<view class="study_left"> <view class="study_left">
<image src="{{baseImgUrl+item.coverPath}}" /> <image src="{{baseImgUrl+item.coverPath}}" />
<!-- <view>政策法规</view> --> <!-- <view>政策法规</view> -->
@ -62,12 +62,12 @@
<view wx:if="{{curTab==3}}"> <view wx:if="{{curTab==3}}">
<swiper class="item-bg swiper-msg" autoplay indicator-dots indicator-active-color='#ffffff'> <swiper class="item-bg swiper-msg" autoplay indicator-dots indicator-active-color='#ffffff'>
<swiper-item class="item" wx:for="{{notice}}" wx:key="{{item}}"> <swiper-item class="item" wx:for="{{notice}}" wx:key="{{item}}">
<image catchtap="toMsgDetail" data-item="{{item}}" class="img" src="{{baseImgUrl+item.coverPath}}" mode="widthFix"></image> <image catchtap="toMsgDetail" data-type="publicContent" data-item="{{item}}" class="img" src="{{baseImgUrl+item.coverPath}}" mode="widthFix"></image>
<text class="title ellipsis">{{item.title}}</text> <text class="title ellipsis">{{item.title}}</text>
</swiper-item> </swiper-item>
</swiper> </swiper>
<view class="study"> <view class="study">
<view class="studyOption" wx:for="{{list}}" wx:key="{{item}}" catchtap="toMsgDetail" data-item="{{item}}"> <view class="studyOption" wx:for="{{list}}" wx:key="{{item}}" catchtap="toMsgDetail" data-item="{{item}}" data-type="publicContent">
<view class="study_left"> <view class="study_left">
<image src="{{baseImgUrl+item.coverPath}}" /> <image src="{{baseImgUrl+item.coverPath}}" />
<!-- <view>政策法规</view> --> <!-- <view>政策法规</view> -->

View File

@ -242,10 +242,21 @@ Page({
* 通知详情 * 通知详情
*/ */
toMsgDetail: function (params) { toMsgDetail: function (params) {
// const item = params.currentTarget.dataset.item;
// wx.navigateTo({
// url: `/pages/the-masses/web/index?id=${item.publicContentId}`,
// })
const item = params.currentTarget.dataset.item; const item = params.currentTarget.dataset.item;
wx.navigateTo({ console.log(params,'params===>');
url: `/pages/the-masses/web/index?id=${item.publicContentId}`, if (params.currentTarget.dataset.type == 'partyMember') {
}) wx.navigateTo({
url: `/pages/the-masses/web/index?id=${item.learnContentId}&type=partyMember`,
})
}else{
wx.navigateTo({
url: `/pages/the-masses/web/index?id=${item.publicContentId}&type=publicContent`,
})
}
}, },
onLoad(option) { onLoad(option) {

View File

@ -61,11 +61,11 @@
<!-- 云学习 --> <!-- 云学习 -->
<swiper wx:if="{{curTab==2}}" class="item-bg swiper-msg" autoplay indicator-dots indicator-active-color='#ffffff'> <swiper wx:if="{{curTab==2}}" class="item-bg swiper-msg" autoplay indicator-dots indicator-active-color='#ffffff'>
<swiper-item class="item" wx:for="{{notice}}" wx:key="{{item}}"> <swiper-item class="item" wx:for="{{notice}}" wx:key="{{item}}">
<image catchtap="toMsgDetail" data-item="{{item}}" class="img" src="{{baseImgUrl+item.coverPath}}" mode="widthFix"></image> <image catchtap="toMsgDetail" data-item="{{item}}" data-type="partyMember" class="img" src="{{baseImgUrl+item.coverPath}}" mode="widthFix"></image>
<text class="title ellipsis">{{item.title}}</text> <text class="title ellipsis">{{item.title}}</text>
</swiper-item> </swiper-item>
</swiper> </swiper>
<view wx:if="{{curTab==2}}" class="studyOption" wx:for="{{list}}" wx:key="{{item}}" catchtap="toMsgDetail" data-item="{{item}}"> <view wx:if="{{curTab==2}}" class="studyOption" wx:for="{{list}}" wx:key="{{item}}" catchtap="toMsgDetail" data-item="{{item}}" data-type="partyMember">
<view class="study_left"> <view class="study_left">
<image src="{{baseImgUrl+item.coverPath}}" /> <image src="{{baseImgUrl+item.coverPath}}" />
<!-- <view>政策法规</view> --> <!-- <view>政策法规</view> -->
@ -78,12 +78,12 @@
<view wx:if="{{curTab==3}}"> <view wx:if="{{curTab==3}}">
<swiper class="item-bg swiper-msg" autoplay indicator-dots indicator-active-color='#ffffff'> <swiper class="item-bg swiper-msg" autoplay indicator-dots indicator-active-color='#ffffff'>
<swiper-item class="item" wx:for="{{notice}}" wx:key="{{item}}"> <swiper-item class="item" wx:for="{{notice}}" wx:key="{{item}}">
<image catchtap="toMsgDetail" data-item="{{item}}" class="img" src="{{baseImgUrl+item.coverPath}}" mode="widthFix"></image> <image catchtap="toMsgDetail" data-item="{{item}}" data-type="publicContent" class="img" src="{{baseImgUrl+item.coverPath}}" mode="widthFix"></image>
<text class="title ellipsis">{{item.title}}</text> <text class="title ellipsis">{{item.title}}</text>
</swiper-item> </swiper-item>
</swiper> </swiper>
<view class="study"> <view class="study">
<view class="studyOption" wx:for="{{list}}" wx:key="{{item}}" catchtap="toMsgDetail" data-item="{{item}}"> <view class="studyOption" wx:for="{{list}}" wx:key="{{item}}" catchtap="toMsgDetail" data-item="{{item}}" data-type="publicContent">
<view class="study_left"> <view class="study_left">
<image src="{{baseImgUrl+item.coverPath}}" /> <image src="{{baseImgUrl+item.coverPath}}" />
<!-- <view>政策法规</view> --> <!-- <view>政策法规</view> -->

View File

@ -148,7 +148,7 @@ Page({
wx.showLoading({ wx.showLoading({
title: '文件上传中...', title: '文件上传中...',
}) })
app.uploadFile(this.data.uuid, app.FileType.resumptionAcs, filePath).then(res => { app.uploadFile(this.data.uuid, app.FileType.demandsEscalation, filePath).then(res => {
wx.hideLoading(); wx.hideLoading();
this.getFiles(); this.getFiles();
}) })
@ -160,7 +160,7 @@ Page({
getFiles: function () { getFiles: function () {
app.axios("GET", "common", "/upload/getFile", { app.axios("GET", "common", "/upload/getFile", {
otcid: this.data.postData.difficultyId || this.data.uuid, otcid: this.data.postData.difficultyId || this.data.uuid,
otctype: app.FileType.resumptionAcs otctype: app.FileType.demandsEscalation
}).then(res => { }).then(res => {
if (res.code == 1) { if (res.code == 1) {
this.data.files = res.data; this.data.files = res.data;

View File

@ -69,8 +69,7 @@ Page({
startTime: this.data.startTime || '', startTime: this.data.startTime || '',
endTime: this.data.endTime || '', endTime: this.data.endTime || '',
condition: this.data.condition || '', condition: this.data.condition || '',
// state: parseInt(this.data.curTab) + 1, userId: app.globalData.userInfo.userId
// userId: app.globalData.userInfo.userId
}, false).then(res => { }, false).then(res => {
console.log(res,'res====>'); console.log(res,'res====>');
this.data.freshIng = false; this.data.freshIng = false;
@ -92,9 +91,10 @@ Page({
* 跳转详情 * 跳转详情
*/ */
toDetail: function (params) { toDetail: function (params) {
const item = params.currentTarget.dataset.item; const item = params.currentTarget.dataset.item.workId;
console.log(item,'item==>');
wx.navigateTo({ wx.navigateTo({
url: '/pages/g-z-t/d-b-s-x/detail/index', url: `/pages/work/f-b-g-z/serve/index?workId=${item}&detail=1`,
}) })
}, },

View File

@ -24,17 +24,17 @@
<scroll-view scroll-y style="height: calc(100vh - 280rpx - {{topBarH}}px);" refresher-enabled bindrefresherrefresh="refresh" bindscrolltolower="getList" lower-threshold="300" refresher-triggered="{{freshIng}}"> <scroll-view scroll-y style="height: calc(100vh - 280rpx - {{topBarH}}px);" refresher-enabled bindrefresherrefresh="refresh" bindscrolltolower="getList" lower-threshold="300" refresher-triggered="{{freshIng}}">
<!-- 列表 --> <!-- 列表 -->
<view class="item-bg" wx:for="{{2}}"> <view class="item-bg" wx:for="{{list}}">
<view class="item"> <view class="item">
<view class="head h-div v-center"> <view class="head h-div v-center">
<view class="single"></view> <view class="single"></view>
<view class="title ellipsis flex">常规工作</view> <view class="title ellipsis flex">{{item.typeName}}</view>
<!-- <view catchtap="toUp" data-item="{{item}}" data-detail="{{0}}" class="done" wx:if="{{item.workState !=3}}">前往完成</view> --> <!-- <view catchtap="toUp" data-item="{{item}}" data-detail="{{0}}" class="done" wx:if="{{item.workState !=3}}">前往完成</view> -->
<view data-item="{{item}}" data-detail="{{1}}" class="done" >查看详情</view> <view data-item="{{item}}" data-detail="{{1}}" class="done" catchtap="toDetail">查看详情</view>
</view> </view>
<view class="tv"></view> <view class="tv">{{item.title}}</view>
<view class="time">任务周期:2024-05-01 至 2024-06-20</view> <view class="time">任务周期:{{item.startTime}}至 {{item.endTime}}</view>
<view class="time">接收时间:2024-05-01</view> <view class="time">接收时间:{{item.modifyTime}}</view>
<image class="bottom-img" src="/images/task/icon-bottom-line.png" mode="aspectFill" /> <image class="bottom-img" src="/images/task/icon-bottom-line.png" mode="aspectFill" />
</view> </view>
</view> </view>

View File

@ -10,11 +10,23 @@ Page({
data: { data: {
topBarH: app.globalData.CustomBar, topBarH: app.globalData.CustomBar,
baseUrl: app.FILE_SERVER_URL, baseUrl: app.FILE_SERVER_URL,
userInfo:{},
dateFilter: Utils.formatTime(new Date(), '-'), dateFilter: Utils.formatTime(new Date(), '-'),
showTaskPop: false, showTaskPop: false,
showTypePop: false,
postData: {} showWorkType: false,
postData: {},
//筛选树结构
areaCode:'',
areaPathName:'',
unitTreepros: {
key: 'performclassname',
val: 'listperformid'
},
listperformid:'',
unitTreelist: [],
TypeList:[],
detail:true,
}, },
/** /**
@ -66,7 +78,8 @@ Page({
wx.showLoading({ wx.showLoading({
title: '文件上传中...', title: '文件上传中...',
}) })
app.uploadFile(this.data.uuid, app.FileType.resumptionAcs, filePath).then(res => {
app.uploadFile(this.data.uuid, app.FileType.workManagement, filePath).then(res => {
wx.hideLoading(); wx.hideLoading();
this.getFiles(); this.getFiles();
}) })
@ -75,10 +88,11 @@ Page({
/** /**
* 获取图片 * 获取图片
*/ */
getFiles: function () { getFiles: function () {
app.axios("GET", "common", "/upload/getFile", { app.axios("GET", "common", "/upload/getFile", {
otcid: this.data.postData.dynamicsId || this.data.uuid, otcid: this.data.postData.workId || this.data.uuid,
otctype: app.FileType.resumptionAcs otctype: app.FileType.workManagement
}).then(res => { }).then(res => {
if (res.code == 1) { if (res.code == 1) {
this.data.files = res.data; this.data.files = res.data;
@ -109,13 +123,85 @@ Page({
} }
}) })
}, },
/**
* 显示/关闭弹窗筛选
*/
popModal: function (params) {
console.log(params);
const type = params.currentTarget.dataset.type;
this.data[type] = !this.data[type];
this.setData(this.data)
},
handleselectunit(e) {
// e.detail 选中的id数组
this.data.page = 1;
this.data.list = [];
let postData = this.data.postData; // 获取当前的 postData 对象
console.log(postData,'postData==>');
postData.listperformid = e.detail.item.listperformid;
postData.performclassname = e.detail.item.performclassname;
this.setData({
postData: postData,
showTypePop:false
}); // 设置更新后的 postData 对象
// this.getType();
},
/**
* 地址
*/
typeChange: function (params) {
this.data.page = 1;
this.data.list = [];
this.setData(this.data);
const index = params.currentTarget.dataset.index;
this.data.postData.type = index + 1;
this.data.postData.orgcode = this.data.TypeData[index].orgcode;
this.data.showTypePop = false;
this.setData(this.data);
},
/**
* 获取地区
*/
getAreaTree: function () {
app.axios("GET", "app", "/Sys/getListperformTree", ).then(res => {
if (res.code == 1) {
console.log(res,'res===>');
this.data.TypeData = res.data[0].children;
this.data.unitTreelist = res.data;
this.setData(this.data)
}
})
},
/** /**
* 发布 * 发布
*/ */
push: function () { push: function () {
// "endTime": "",-
// "listperformid": "",
// "startTime": "",-
// "title": "",
// "typeId": "",
// "userId": "",-
// "workId": ""-
this.data.postData.userId = app.globalData.userInfo.userId; this.data.postData.userId = app.globalData.userInfo.userId;
this.data.postData.emerEventId = this.data.uuid; this.data.postData.workId = this.data.uuid;
if (!this.data.postData.listperformid) {
wx.showToast({
title: '请选择所属组织',
icon: 'none'
})
return
}
if (!this.data.postData.worktypeId) {
wx.showToast({
title: '请选择类型',
icon: 'none'
})
return
}
if (!this.data.postData.title) { if (!this.data.postData.title) {
wx.showToast({ wx.showToast({
title: '请输入内容', title: '请输入内容',
@ -130,26 +216,29 @@ Page({
}) })
return return
} }
let data = { let data = {
...this.data.postData, ...this.data.postData,
userId:this.data.userInfo.userId,
typeId:this.data.postData.worktypeId,
} }
console.log(data,'data===>'); console.log(data,'data===>');
// app.axios("POST", "app", "/work/workAdd", data).then(res => { app.axios("POST", "app", "/work/workAdd", data).then(res => {
// if (res.code == 1) { if (res.code == 1) {
// wx.showToast({ wx.showToast({
// title: '发布成功', title: '发布成功',
// icon: 'none' icon: 'none'
// }) })
// setTimeout(() => { setTimeout(() => {
// wx.navigateBack() wx.navigateBack()
// }, 1500); }, 1500);
// } else { } else {
// wx.showToast({ wx.showToast({
// title: res.message, title: res.message,
// icon: 'none' icon: 'none'
// }) })
// } }
// }) })
}, },
/** /**
@ -168,24 +257,51 @@ Page({
}, },
//查询详情 //查询详情
getDetail: function (id) { getDetail: function (id) {
app.axios("GET", "app", `/work/wkDynamicsDetail/${id}`).then(res => { app.axios("GET", "app", `/work/workDetail/${id}`).then(res => {
console.log(res,'res===>'); console.log(res,'res===>');
this.data.postData = res.data this.data.postData = res.data;
this.setData(this.data); this.setData(this.data);
this.getFiles() this.getFiles()
}) })
}, },
/**
* 事件类型
*/
typeChange: function (params) {
const index = params.currentTarget.dataset.index;
console.log(params,'params===>');
this.data.postData.worktypeId = params.currentTarget.dataset.item.typeId;
this.data.postData.worktype = index + 1;
this.data.shoWworkType = false;
this.setData(this.data);
},
/**
* 查询所有应急上报事件类型
*/
getWkTypes: function () {
app.axios("GET", "app", "/work/wkTypes",{
classify:1
}).then(res => {
if (res.code == 1) {
console.log(res);
this.data.TypeList = res.data;
this.setData(this.data);
}
})
},
/** /**
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
onLoad(options) { onLoad(options) {
this.data.isUserDetail = options.user; this.data.userInfo = app.globalData.userInfo;
this.data.uuid = Utils.uuid(); this.data.uuid = Utils.uuid();
this.setData(this.data); this.setData(this.data);
if (options.dynamicsId) { console.log(options,'options===>');
this.getDetail(options.dynamicsId); if (options.workId) {
this.getDetail(options.workId);
} }
this.getAreaTree();
this.getWkTypes();
}, },
/** /**

View File

@ -6,19 +6,18 @@
<text class="single"></text> <text class="single"></text>
<text class="title">所属组织</text> <text class="title">所属组织</text>
</view> </view>
<view class="h-div v-center in-bg" catchtap="popModal" data-type="showTypePop"> <!-- <view class="h-div v-center in-bg" catchtap="popModal" data-type="showTypePop">
<text class="lab"></text> <text class="lab">所属组织</text>
<text>{{ postData.areaPathName }}请选择所属组织</text> <text>{{ postData.performclassname }}</text>
</view> </view> -->
<!-- 工作 --> <input catchtap="popModal" data-type="showTypePop" disabled class="put v-div h-center" placeholder="请选择" value="{{postData.performclassname}}"></input>
<!-- 类型 -->
<view class="h-div v-center header"> <view class="h-div v-center header">
<text class="single"></text> <text class="single"></text>
<text class="title">工作类型</text> <text class="title">事件类型</text>
</view>
<view class="h-div v-center in-bg" catchtap="popModal" data-type="showTypePop">
<text class="lab"></text>
<text>{{ postData.areaPathName }}请选择工作类型</text>
</view> </view>
<input catchtap="popModal" data-type="shoWworkType" disabled class="put v-div h-center" placeholder="请选择" value="{{TypeList[postData.worktype-1].typeName?TypeList[postData.worktype-1].typeName:postData.typeName}}"></input>
<!-- </view> -->
<!-- 内容 --> <!-- 内容 -->
<view class="h-div v-center header"> <view class="h-div v-center header">
<text class="single"></text> <text class="single"></text>
@ -57,7 +56,7 @@
</view> </view>
<view class="space"></view> <view class="space"></view>
</scroll-view> </scroll-view>
<view class="option" wx:if="{{!postData.dynamicsId}}"> <view class="option" wx:if="{{!postData.workId}}">
<view catchtap="push" class="btn">发布</view> <view catchtap="push" class="btn">发布</view>
</view> </view>
@ -84,3 +83,23 @@
</view> </view>
</view> </view>
<!-- 选择通知类型 -->
<view class="cu-modal {{shoWworkType?'show':''}}">
<view class="cu-dialog pop" catchtap>
<view class="cu-bar justify-end pop-header">
<view class="content">选择工作类型</view>
<view class="action" catchtap="popModal" data-type="shoWworkType">
<text class="cuIcon-close text-red"></text>
</view>
</view>
<radio-group class="block" style="max-height: 50vh;overflow-y: scroll;">
<view class="cu-list menu text-left">
<view class="cu-item" wx:for="{{TypeList}}" wx:key>
<label catchtap="typeChange" data-item="{{item}}" data-index="{{index}}" class="flex justify-between align-center flex-sub">
<view class="flex-sub">{{item.typeName}}</view>
</label>
</view>
</view>
</radio-group>
</view>
</view>