readdetail.vue 7.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277
  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: 'operation', type:'operation',label: '批示',renders:[
  77. {
  78. name:'同意',
  79. class:'agree',
  80. type:"primary",
  81. func:'agree' // func 代表子元素点击的事件 父元素接收的事件 父元素 @edit
  82. },
  83. {
  84. name:'驳回',
  85. type:'warn', // type 为custom的时候自定义按钮
  86. class:"del",
  87. func:'reject',
  88. },
  89. ]},
  90. ],
  91. ptype:'',//弹窗类型
  92. border:true,
  93. borderr:false,
  94. headbgColor:'#F1F1F1',
  95. tableData:[],
  96. id:'',
  97. title:'',
  98. parameter:{
  99. qjlist:[]
  100. },
  101. tabidx:"",
  102. qjsh:'',
  103. userId:'',
  104. }
  105. },
  106. onUnload(){
  107. uni.$off('refreshlist')
  108. },
  109. onLoad(e) {
  110. this.id=e.id;
  111. this.tabidx=e.a
  112. this.getDataFn()
  113. this.init()
  114. // this.getDataFn()
  115. // uni.$on('refreshlist', (e) => {
  116. // this.getDataFn()
  117. // })
  118. },
  119. mounted() {
  120. },
  121. methods:{
  122. agreeFn(ite){
  123. var that=this;
  124. var type=this.tabidx;
  125. var userId=ite.userId
  126. // that.ptype=''
  127. uni.showModal({
  128. title: '确认同意',
  129. content: "是否确认同意",
  130. cancelText: '取消',
  131. confirmText: '确认',
  132. success: function(res) {
  133. if (res.confirm) {
  134. var params={
  135. approval:2
  136. }
  137. if(type=='zxhd'){
  138. params.activityId=that.id
  139. params.userId=userId
  140. getzxActivitypsFn(params).then(res=>{
  141. if(res.code==200){
  142. that.$toast('已同意')
  143. }
  144. })
  145. }else{
  146. params.conferenceId=that.id
  147. params.userId=userId
  148. getzxConferencepsFn(params).then(res=>{
  149. if(res.code==200){
  150. that.$toast('已同意')
  151. }
  152. })
  153. }
  154. } else if (res.cancel) {
  155. }
  156. }
  157. });
  158. },
  159. rejectFn(ite){
  160. this.qjsh='3';
  161. this.ptype='qjps';
  162. this.userId=ite.userId;
  163. },
  164. // 提案状态
  165. init(){
  166. // 请假理由
  167. getDictionaryFn('leave').then(res=>{
  168. if(res.code==200&&res.data.length){
  169. this.parameter.qjlist = res.data.map(v => {
  170. return {
  171. label: v.dictLabel,
  172. value: v.dictValue
  173. }
  174. })
  175. }
  176. })
  177. },
  178. getupSubmit(data){
  179. var params=JSON.parse(JSON.stringify(data))
  180. var that=this;
  181. var type=this.tabidx;
  182. if(type=='zxhd'){
  183. params.activityId=that.id
  184. params.userId=that.userId
  185. getzxActivitypsFn(params).then(res=>{
  186. if(res.code==200){
  187. that.$toast('已驳回')
  188. that.ptype='';
  189. }
  190. })
  191. }else{
  192. params.conferenceId=that.id
  193. params.userId=that.userId
  194. getzxConferencepsFn(params).then(res=>{
  195. if(res.code==200){
  196. that.$toast('已驳回')
  197. that.ptype='';
  198. }
  199. })
  200. }
  201. },
  202. getClose(){
  203. this.ptype=""
  204. },
  205. getTabFn(idx){
  206. this.tabidx=idx;
  207. },
  208. getBack(){
  209. uni.navigateBack({
  210. delta:1
  211. })
  212. },
  213. rowClick(){
  214. },
  215. getDetail(data){
  216. console.log(52)
  217. // this.$tab.navigateTo('/work/pages/case/details?id='+data)
  218. },
  219. getSearch(){
  220. this.getDataFn()
  221. },
  222. getDataFn(){
  223. var params={
  224. userName:this.title
  225. }
  226. var type=this.tabidx;
  227. if(type=='zxhd'){
  228. params.activityId=this.id
  229. getzxActivityPeoFn(params).then(res=>{
  230. if(res.code==200){
  231. this.tableData=res.rows
  232. }
  233. })
  234. }else{
  235. params.conferenceId=this.id
  236. getMeetPeoListFn(params).then(res=>{
  237. if(res.code==200){
  238. this.tableData=res.rows
  239. }
  240. })
  241. }
  242. },
  243. }
  244. }
  245. </script>
  246. <style scoped lang="scss">
  247. page{background-color: #FFFFFF;}
  248. .check{height: 100vh;display: flex;flex-direction: column;
  249. .tables{flex:0 1 auto;overflow: auto;padding: 0 24rpx;
  250. .table{
  251. height: 100%;
  252. }
  253. }
  254. .ctip{font-weight: 500;padding: 22rpx 24rpx 26rpx;font-size: 26rpx;color: #FF0000;}
  255. .cbtn{margin: 0 24rpx;height: 80rpx;background: #1D64E2;border-radius: 80rpx;font-weight: bold;font-size: 30rpx;color: #FFFFFF;}
  256. }
  257. .navbox{background-color: $com-cd3;flex: 0 0 auto;
  258. .tablists{
  259. overflow: auto;flex-wrap: nowrap;
  260. view{font-weight: bold;font-size: 26rpx;color: #FFFFFF;position: relative;flex: 1;padding: 22rpx 24rpx;margin-right: 6rpx;box-sizing: border-box;
  261. text-align: center;
  262. &:last-child{margin-right: 0;}
  263. &.act{font-size: 30rpx;
  264. &::after{content: '';width: 62rpx;height: 10rpx;background: #FFFFFF;border-radius: 4rpx;left: 50%;margin-left: -31rpx;bottom: 0rpx;position: absolute;}
  265. }
  266. }
  267. }
  268. }
  269. </style>