readdetail.vue 7.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279
  1. <template>
  2. <view class="check" >
  3. <view class="navbox">
  4. <view class="plr12 mt18">
  5. <view class="search flex0 mb10">
  6. <image :src="searchimg"></image>
  7. <input placeholder="输入委员姓名进行查询" v-model="title" @confirm="getSearch"/>
  8. </view>
  9. </view>
  10. <!-- <view class="tablists flexc mb20">
  11. <view v-for="(ite,idx) in tabList" @click="getTabFn(ite.val)" :class="{act:tabidx==ite.val}" :key="idx">{{ite.tit}}</view>
  12. </view> -->
  13. </view>
  14. <view class="ctip flex0">请左右滑动查看详细信息</view>
  15. <!-- 表格 -->
  16. <view class="tables">
  17. <view class="table">
  18. <zb-table
  19. :show-header="true"
  20. :columns="columns"
  21. :headbgColor="headbgColor"
  22. :stripe="false"
  23. :fit="true"
  24. :parameter="parameter"
  25. @rowClick="rowClick"
  26. @toggleRowSelection="toggleRowSelection"
  27. @toggleAllSelection="toggleAllSelection"
  28. :border="border"
  29. :borderr="borderr"
  30. @detail="getDetail"
  31. @agree="agreeFn"
  32. @reject="rejectFn"
  33. :data="tableData"></zb-table>
  34. </view>
  35. </view>
  36. <!-- 弹窗 -->
  37. <pop-up :type='ptype' :qjsh="qjsh" @getClose="getClose" @getupSubmit="getupSubmit"></pop-up>
  38. </view>
  39. </template>
  40. <script>
  41. import zbTable from "@/work/components/zb-table/zb-tables.vue"
  42. import {getMeetDetaiFn,getMeetPeoListFn,getzxActivityPeoFn,getzxActivitypsFn,getzxConferencepsFn} from "@/api/mine/meeting.js"
  43. import popUp from "@/work/components/popup/popup.vue"
  44. import {getDictionaryFn} from "@/api/mine/register.js"
  45. export default{
  46. components:{popUp,zbTable},
  47. data(){
  48. return{
  49. searchimg: require("@/work/static/images/search.png"),
  50. ccicoimg:require("@/work/static/images/ccico.png"),
  51. lbicoimg:require("@/work/static/images/lbico.png"),
  52. backimg:require("@/work/static/images/back.png"),
  53. upimg:require("@/work/static/images/up.png"),
  54. backgroundColor:"#1D64E2",
  55. tabidx:0,
  56. tabList:[{tit:'全部',val:0},{tit:'已读',val:1},{tit:'未读',val:2},{tit:'请假',val:3}],
  57. talbList:[{},],
  58. taztList:[{label:'是',value:'0'},{label:'否',value:'1'}],
  59. talbidx:'',
  60. datainfo:{
  61. talb:'',
  62. },
  63. columns: [
  64. { name: 'userName', label: '姓名',width:130,align:'center', },
  65. { name: 'postName', label: '工作地址及职务',align:'center'},
  66. { name: 'replyTime', label: '答复时间',align:'center'},
  67. // { name: 'unit', label: '是否参会',align:'center'},
  68. { name: 'isJoin', type:'operation',label: '是否参会',key:"qjlist",renders:[
  69. {
  70. name:'isJoin',
  71. type:'detail',
  72. func:"detail"
  73. },
  74. ]},
  75. { name: 'leaveReason', label: '请假事由',align:'center',},
  76. { name: 'approval',type:'operation', label: '批示状态',align:'center',type:"format",key:"pslist"},
  77. { name: 'operation', type:'operation',label: '批示',renders:[
  78. {
  79. name:'同意',
  80. class:'agree',
  81. type:"primary",
  82. func:'agree' // func 代表子元素点击的事件 父元素接收的事件 父元素 @edit
  83. },
  84. {
  85. name:'驳回',
  86. type:'warn', // type 为custom的时候自定义按钮
  87. class:"del",
  88. func:'reject',
  89. },
  90. ]},
  91. ],
  92. ptype:'',//弹窗类型
  93. border:true,
  94. borderr:false,
  95. headbgColor:'#F1F1F1',
  96. tableData:[],
  97. id:'',
  98. title:'',
  99. parameter:{
  100. qjlist:[],
  101. pslist:[{label:'待批示',value:'1'},{label:'已同意',value:'2'},{label:'未同意',value:'3'}],
  102. },
  103. tabidx:"",
  104. qjsh:'',
  105. userId:'',
  106. }
  107. },
  108. onUnload(){
  109. uni.$off('refreshlist')
  110. },
  111. onLoad(e) {
  112. this.id=e.id;
  113. this.tabidx=e.a
  114. this.getDataFn()
  115. this.init()
  116. // this.getDataFn()
  117. // uni.$on('refreshlist', (e) => {
  118. // this.getDataFn()
  119. // })
  120. },
  121. mounted() {
  122. },
  123. methods:{
  124. agreeFn(ite){
  125. var that=this;
  126. var type=this.tabidx;
  127. var userId=ite.userId
  128. // that.ptype=''
  129. uni.showModal({
  130. title: '确认同意',
  131. content: "是否确认同意",
  132. cancelText: '取消',
  133. confirmText: '确认',
  134. success: function(res) {
  135. if (res.confirm) {
  136. var params={
  137. approval:2
  138. }
  139. if(type=='zxhd'){
  140. params.activityId=that.id
  141. params.userId=userId
  142. getzxActivitypsFn(params).then(res=>{
  143. if(res.code==200){
  144. that.$toast('已同意')
  145. }
  146. })
  147. }else{
  148. params.conferenceId=that.id
  149. params.userId=userId
  150. getzxConferencepsFn(params).then(res=>{
  151. if(res.code==200){
  152. that.$toast('已同意')
  153. }
  154. })
  155. }
  156. } else if (res.cancel) {
  157. }
  158. }
  159. });
  160. },
  161. rejectFn(ite){
  162. this.qjsh='3';
  163. this.ptype='qjps';
  164. this.userId=ite.userId;
  165. },
  166. // 提案状态
  167. init(){
  168. // 请假理由
  169. getDictionaryFn('leave').then(res=>{
  170. if(res.code==200&&res.data.length){
  171. this.parameter.qjlist = res.data.map(v => {
  172. return {
  173. label: v.dictLabel,
  174. value: v.dictValue
  175. }
  176. })
  177. }
  178. })
  179. },
  180. getupSubmit(data){
  181. var params=JSON.parse(JSON.stringify(data))
  182. var that=this;
  183. var type=this.tabidx;
  184. if(type=='zxhd'){
  185. params.activityId=that.id
  186. params.userId=that.userId
  187. getzxActivitypsFn(params).then(res=>{
  188. if(res.code==200){
  189. that.$toast('已驳回')
  190. that.ptype='';
  191. }
  192. })
  193. }else{
  194. params.conferenceId=that.id
  195. params.userId=that.userId
  196. getzxConferencepsFn(params).then(res=>{
  197. if(res.code==200){
  198. that.$toast('已驳回')
  199. that.ptype='';
  200. }
  201. })
  202. }
  203. },
  204. getClose(){
  205. this.ptype=""
  206. },
  207. getTabFn(idx){
  208. this.tabidx=idx;
  209. },
  210. getBack(){
  211. uni.navigateBack({
  212. delta:1
  213. })
  214. },
  215. rowClick(){
  216. },
  217. getDetail(data){
  218. console.log(52)
  219. // this.$tab.navigateTo('/work/pages/case/details?id='+data)
  220. },
  221. getSearch(){
  222. this.getDataFn()
  223. },
  224. getDataFn(){
  225. var params={
  226. userName:this.title
  227. }
  228. var type=this.tabidx;
  229. if(type=='zxhd'){
  230. params.activityId=this.id
  231. getzxActivityPeoFn(params).then(res=>{
  232. if(res.code==200){
  233. this.tableData=res.rows
  234. }
  235. })
  236. }else{
  237. params.conferenceId=this.id
  238. getMeetPeoListFn(params).then(res=>{
  239. if(res.code==200){
  240. this.tableData=res.rows
  241. }
  242. })
  243. }
  244. },
  245. }
  246. }
  247. </script>
  248. <style scoped lang="scss">
  249. page{background-color: #FFFFFF;}
  250. .check{height: 100vh;display: flex;flex-direction: column;
  251. .tables{flex:0 1 auto;overflow: auto;padding: 0 24rpx;
  252. .table{
  253. height: 100%;
  254. }
  255. }
  256. .ctip{font-weight: 500;padding: 22rpx 24rpx 26rpx;font-size: 26rpx;color: #FF0000;}
  257. .cbtn{margin: 0 24rpx;height: 80rpx;background: #1D64E2;border-radius: 80rpx;font-weight: bold;font-size: 30rpx;color: #FFFFFF;}
  258. }
  259. .navbox{background-color: $com-cd3;flex: 0 0 auto;
  260. .tablists{
  261. overflow: auto;flex-wrap: nowrap;
  262. view{font-weight: bold;font-size: 26rpx;color: #FFFFFF;position: relative;flex: 1;padding: 22rpx 24rpx;margin-right: 6rpx;box-sizing: border-box;
  263. text-align: center;
  264. &:last-child{margin-right: 0;}
  265. &.act{font-size: 30rpx;
  266. &::after{content: '';width: 62rpx;height: 10rpx;background: #FFFFFF;border-radius: 4rpx;left: 50%;margin-left: -31rpx;bottom: 0rpx;position: absolute;}
  267. }
  268. }
  269. }
  270. }
  271. </style>