dbDetail.vue 9.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269
  1. <template>
  2. <view>
  3. <u--form labelPosition="left" labelAlign="center" :model="content" ref="uForm" :rules="rules"
  4. :labelStyle="{fontSize:'32rpx'}" labelWidth="130"> <u-form-item label="督办事项:" borderBottom prop="title">
  5. <u--input placeholder='请输入督办事项' v-model="content.title" border="none"></u--input>
  6. </u-form-item>
  7. <!-- <u-form-item label="处室及负责人:" borderBottom prop="departmentHead">
  8. <u--input v-model="content.departmentHead" border="none" readonly></u--input>
  9. </u-form-item> -->
  10. <!-- <u-form-item label="信息类别:" borderBottom prop="infoType">
  11. <u--textarea type="textarea" v-model="content.infoType" placeholder="请输入信息类别"
  12. border="none"></u--textarea>
  13. </u-form-item> -->
  14. <u-form-item label="督办来源:" borderBottom prop="infoSource">
  15. <uni-data-select @change="infoSourceChange" v-model="content.infoSource" :clear="false"
  16. placeholder="请选择督办来源" :localdata="InfoList"></uni-data-select>
  17. </u-form-item>
  18. <u-form-item label="督办内容:" borderBottom prop="infoSourceContent">
  19. <u--textarea type="textarea" v-model="content.infoSourceContent" :placeholder="infoSourceContent"
  20. border="none"></u--textarea>
  21. </u-form-item>
  22. <u-form-item label="完成时限:" @click="typeChange('shixian')" borderBottom prop="doneTime">
  23. <view>
  24. {{content.doneTime}}
  25. </view>
  26. <!-- <u--input v-model="content.doneTime" border="none" readonly></u--input> -->
  27. </u-form-item>
  28. <u-form-item label="责任处室:" borderBottom prop="prersonLiable">
  29. <u--textarea disabled style="width: 190rpx;" type="textarea" v-model="content.prersonLiable"
  30. placeholder="请选择责任处室" border="none"></u--textarea>
  31. <u-button v-if="title=='督办编辑'" size="small" type="primary" text="选择" @click="handelSelect"
  32. style="margin-top: 40rpx;width: 50rpx;margin-right: 10rpx;"></u-button>
  33. </u-form-item>
  34. <view v-if="title!='督办编辑'" class="">
  35. <view style="text-align: center;font-size: 34rpx;margin-top: 50rpx;font-weight: 700;" class="">
  36. 各处室进度详情:
  37. </view>
  38. <view v-if="content.ywSupervisionItemList.length!=0" class="">
  39. <view v-for="item in content.ywSupervisionItemList" :key="item.id"
  40. style="padding: 20rpx 40rpx;border-bottom: 1px solid #ceccca;background-color: #fff;">
  41. <uni-card style="width:600rpx">
  42. <view style='margin:20rpx 40rpx' class="">
  43. <text> 部门: {{item.deptName}}</text>
  44. <br />
  45. <text> 姓名: {{item.userName}}</text>
  46. <br />
  47. <text>
  48. 进展情况:<view v-if="
  49. userId == item.userId &&
  50. item.submitState != '1' " class="">
  51. <u--textarea type="textarea" v-model="item.progress"
  52. placeholder="请输入进展情况"></u--textarea><br />
  53. </view>
  54. <span v-else class="">
  55. {{item.progress}}
  56. <br />
  57. </span>
  58. </text>
  59. <text>
  60. 完成佐证材料:<view v-if="
  61. userId == item.userId &&
  62. item.submitState != '1' " class="example-body">
  63. <!-- <uni-file-picker file-mediatype="fileMediatype === 'image'" mode="grid"
  64. @select="select($event,item)" @progress="progress" @delete="deleteFile"
  65. @success="success" @fail="fail">
  66. </uni-file-picker> -->
  67. <u-button type="primary" @click="uploadPic(item)">上传</u-button>
  68. <!-- 展示 -->
  69. <view style="margin-bottom: 30rpx;display: flex;margin-top: 4rpx;"
  70. v-for="v in item.ywFileList" :key="v.fileId">
  71. <u-icon style="margin-top: 4rpx;color: #2979FF;"
  72. name="attach"></u-icon><u--text :lines="1" size="14" color="#2979FF"
  73. decoration="underline" :text="v.name"
  74. @click="downLoad(v.url)">{{v.name}}</u--text><u-icon @click="delFile(v)"
  75. style="margin-top: 0rpx;" name="close"></u-icon>
  76. </view>
  77. <u-action-sheet @select="selectClick" :actions="list"
  78. :closeOnClickOverlay="true" :closeOnClickAction="true" title="请选择"
  79. :show="showUpload"></u-action-sheet>
  80. </view>
  81. <view v-else
  82. style="border-radius: 8rpx;background-color: #f3f3f3;margin-top: 40rpx;padding: 20rpx 40rpx;">
  83. <!-- <view style="display: flex;align-items: center;margin-bottom: 20rpx;f">
  84. <u-icon name="file-text-fill" color="#000"></u-icon>
  85. 附件
  86. </view> -->
  87. <view style="margin-bottom: 30rpx;" v-for="v in item.ywFileList"
  88. :key="v.fileId">
  89. <u--text :lines="1" size="15" color="#2979FF" decoration="underline"
  90. :text="v.name" @click="downLoad(v.url)">{{v.name}}</u--text>
  91. </view>
  92. </view>
  93. </text>
  94. <br />
  95. <text>
  96. 领导意见:<u--textarea v-if="
  97. userId == item.leaderUserId &&
  98. item.submitState == '1'
  99. " type="textarea" v-model="item.leaderMsg" placeholder="请输入领导意见"></u--textarea>
  100. <span v-else> {{item.leaderMsg}}</span>
  101. </text>
  102. </view>
  103. <span style="display: flex;" v-if="item.leaderApprove == '0'">
  104. <u-button style="width: 100rpx;" v-if="
  105. userId == item.leaderUserId &&
  106. item.submitState == '1'
  107. " size="small" @click="sendBackInfo(item)" type="error">退回
  108. </u-button>
  109. <u-button style="width: 100rpx;margin-left:20rpx" v-if="
  110. userId == item.leaderUserId &&
  111. item.submitState == '1'
  112. " size="small" @click="pass(item)" type="primary">通过
  113. </u-button>
  114. </span>
  115. </uni-card>
  116. </view>
  117. </view>
  118. <view style="margin-top: 60rpx;text-align: center;" v-else class="">
  119. 暂无
  120. </view>
  121. </view>
  122. <view style="padding: 0 20rpx;">
  123. <u-button v-if="title=='督办编辑'" type="primary" text="保存" @click="keep"
  124. style="margin-top: 40rpx;"></u-button>
  125. <!-- <u-button type="primary" v-else text="提交" @click="submit" style="margin-top: 40rpx;"></u-button> -->
  126. </view>
  127. </u--form>
  128. <u-calendar placeholder="请选择日期" :show="show1" mode="single" allowSameDay @confirm="confirmOne"
  129. @close="show1 = false"></u-calendar>
  130. </view>
  131. </template>
  132. <script>
  133. export default {
  134. data() {
  135. return {
  136. show1: false,
  137. typeDate: '',
  138. content: {
  139. ywSupervisionStartUserList: [],
  140. prersonLiable: ''
  141. },
  142. rules: {},
  143. InfoList: [],
  144. infoSourceContent: '',
  145. db_template: [],
  146. title: ''
  147. }
  148. },
  149. onLoad(options) {
  150. this.getDictsInfo()
  151. uni.setNavigationBarTitle({
  152. title: options.title
  153. })
  154. this.title = options.title
  155. uni.$u.http.get('/offcial/supervision/' + options.id).then((res) => {
  156. console.log('res', res)
  157. this.content = res.data
  158. getApp().globalData.ywListZR = this.content.ywSupervisionStartUserList
  159. getApp().globalData.zerenList = this.content.prersonLiable
  160. })
  161. },
  162. onShow() {
  163. uni.$once('query', (query) => {
  164. if (query.a == 'two') {
  165. if (this.content.prersonLiable != null) {
  166. // let arrPeo = this.content.prersonLiable.split(",");
  167. // let arr = getApp().globalData.zerenList.split(',')
  168. // arr = arr.concat(this.content.prersonLiable)
  169. this.content.prersonLiable = getApp().globalData.zerenList
  170. // this.content.prersonLiable = arr.join(" , ");
  171. this.content.ywSupervisionStartUserList = getApp().globalData.ywListZR
  172. } else {
  173. this.content.prersonLiable = getApp().globalData.zerenList
  174. }
  175. }
  176. })
  177. },
  178. methods: {
  179. keep() {
  180. uni.showLoading({
  181. title: "保存中...",
  182. mask: true
  183. })
  184. uni.$u.http.put("/offcial/supervision", this.content).then(res => {
  185. uni.showToast({
  186. title: "保存成功",
  187. icon: "none",
  188. mask: true,
  189. duration: 3000
  190. })
  191. uni.hideLoading()
  192. uni.$emit('query', {
  193. a: 'back'
  194. })
  195. setTimeout(() => {
  196. uni.navigateBack()
  197. }, 2000)
  198. }).catch((err) => {
  199. uni.showToast({
  200. title: err.msg,
  201. icon: "none",
  202. mask: true,
  203. duration: 3000
  204. })
  205. uni.hideLoading()
  206. })
  207. },
  208. handelSelect() {
  209. uni.navigateTo({
  210. url: `/pages/zerenchushi/zerenchushi`
  211. })
  212. },
  213. confirmOne(e) {
  214. if (this.typeDate == 'shixian') {
  215. console.log('11')
  216. this.content.doneTime = e[0]
  217. }
  218. this.show1 = false
  219. },
  220. typeChange(e) {
  221. this.show1 = true
  222. this.typeDate = e
  223. },
  224. infoSourceChange(val) {
  225. console.log("db_template", this.db_template);
  226. console.log('val', val);
  227. this.infoSourceContent = this.db_template[val - 1].text;
  228. },
  229. getDictsInfo() {
  230. uni.$u.http.get('/system/dict/data/type/info_source').then(res => {
  231. this.InfoList = res.data.map((item, index) => {
  232. let obj = {
  233. value: item.dictValue,
  234. id: item.dictValue,
  235. text: item.dictLabel
  236. }
  237. return obj
  238. })
  239. })
  240. uni.$u.http.get('/system/dict/data/type/db_template').then(res => {
  241. this.db_template = res.data.map((item, index) => {
  242. let obj = {
  243. value: item.dictValue,
  244. id: item.dictValue,
  245. text: item.dictLabel
  246. }
  247. return obj
  248. })
  249. })
  250. }
  251. }
  252. }
  253. </script>
  254. <style>
  255. </style>