information - 副本.vue 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265
  1. <template>
  2. <view class="topBtn">
  3. <u-subsection bg-color="rgb(215,224,233)" button-color="rgb(0,99,208)" active-color="white" :list="list"
  4. v-model="current" @change="subChange"></u-subsection>
  5. <view class="btn">
  6. <u-button size="medium" type="primary">已阅</u-button>
  7. <u-button size="medium" type="success">转交</u-button>
  8. <u-button size="medium" type="error">退件</u-button>
  9. <u-button size="medium" @click="onClose">关闭</u-button>
  10. </view>
  11. </view>
  12. <scroll-view scroll-y="true" class="content" v-show="current === 0">
  13. <image v-for="it in 48" src="../../static/666.png" mode="heightFix"></image>
  14. </scroll-view>
  15. <view class="handleFile" v-show="current === 1">
  16. <!-- 左侧视图 -->
  17. <view style="height: 100%;">
  18. <view style="border-bottom: 1rpx solid #cccccc;line-height: 100rpx;display: flex;">
  19. <mySelectTree class="mySelectTree" v-model="pdfValue" label="收文" :localdata="range" @change="change">
  20. </mySelectTree>
  21. <u-button style="float: right;line-height: 60rpx;height: 60rpx;margin-top: 10rpx;" size="medium"
  22. type="primary">重新加载</u-button>
  23. <uni-icons style="float: right;line-height: 40rpx;background-color: #bdc7d4;margin: 20rpx 20rpx;" type="left"
  24. size="20" color="#999" />
  25. </view>
  26. <scroll-view scroll-y="true">
  27. <image style="width: 100%;height: 12000rpx;" src="../../static/pdf.png"></image>
  28. </scroll-view>
  29. </view>
  30. <!-- 右侧视图 -->
  31. <scroll-view scroll-y="true">
  32. <u-form :model="form" ref="form1">
  33. <view style="text-align: start;font-size: 34rpx;font-weight: 700;">领导意见:</view>
  34. <u-form-item prop="suggest" :borderBottom="false"><u-input type="textarea" v-model="form.suggest" border
  35. height="400" /></u-form-item>
  36. </u-form>
  37. <view style="display: flex;">
  38. <view style="flex: 1;">
  39. </view>
  40. <u-button @click="confirm" style="margin-right: 40rpx;height: 70rpx;">保存</u-button>
  41. <u-button @click="confirm" style="height: 70rpx;">常用语</u-button>
  42. </view>
  43. <view style="text-align: start;font-size: 34rpx;font-weight: 700;line-height: 80rpx;">
  44. 操作
  45. </view>
  46. <view class="selected">
  47. <view style="width: 500rpx;">
  48. <uni-segmented-control :current="czcurrent" :values="czlist" @clickItem="czsubChange" />
  49. </view>
  50. <view style="padding: 20rpx;background-color: #f2f2f2;" v-show="!show">
  51. <view style="display: flex;line-height: 80rpx;padding: 10rpx;">
  52. <span style="color: #2d68ea;">转处室,直属领导:</span>
  53. <u-button v-for="(item,index) in zcszsdwList" :type="zcszsdwIndex == index ?'primary' :''" class="lybut"
  54. size="mini" @click="zcszsdwClick(index)">{{item.value}}</u-button>
  55. <view style="flex: 1;">
  56. <u-button style="float: right;margin-top: 10rpx;" size="mini">更多</u-button>
  57. </view>
  58. </view>
  59. <view style="background-color: #fff;height: 100rpx;">
  60. </view>
  61. </view>
  62. <view class="" v-show="show">
  63. 已阅后,本件转入已办件!
  64. </view>
  65. <view class="">
  66. <u-button type="primary" style="height: 70rpx;width: 400rpx;">提交</u-button>
  67. </view>
  68. </view>
  69. </scroll-view>
  70. </view>
  71. </template>
  72. <script setup>
  73. import {
  74. ref,
  75. reactive,
  76. nextTick
  77. } from "vue"
  78. import {
  79. onLoad,
  80. onReady
  81. } from "@dcloudio/uni-app"
  82. const show = ref(true)
  83. const form1 = ref(null)
  84. const rules = ref({
  85. suggest: [{
  86. required: true,
  87. message: '请输入意见',
  88. trigger: ['change', 'blur']
  89. }]
  90. })
  91. const list = ref([{
  92. name: '文件浏览'
  93. },
  94. {
  95. name: '办理'
  96. },
  97. {
  98. name: '流程图'
  99. }
  100. ])
  101. const zcszsdwIndex = ref(-1)
  102. const zcszsdwList = ref([{
  103. value: "处室正职",
  104. ry: ["张三", "李四", "王五"]
  105. },
  106. {
  107. value: "直属单位正职",
  108. ry: ["张三", "王五"]
  109. }
  110. ])
  111. const czlist = ref(['转发', '已阅'])
  112. const current = ref(0)
  113. const czcurrent = ref(0)
  114. const pdfValue = ref(null)
  115. const range = ref([{
  116. value: 0,
  117. text: "文档目录",
  118. file: [{
  119. value: 10,
  120. text: "PDF1",
  121. pageNum: 5
  122. }, {
  123. value: 12,
  124. text: "PDF222",
  125. pageNum: 8
  126. }]
  127. },
  128. {
  129. value: 1,
  130. text: "附件",
  131. file: []
  132. },
  133. ])
  134. const urlParams = ref({})
  135. const form = reactive({
  136. suggest: ''
  137. })
  138. function change(e) {
  139. console.log("e:", e);
  140. }
  141. function onClose() {
  142. uni.reLaunch({
  143. url: urlParams.value.url
  144. })
  145. }
  146. function confirm() {
  147. form1.value.validate((valid) => {
  148. if (valid) {
  149. uni.showToast({
  150. icon: "none",
  151. title: "表单验证通过"
  152. })
  153. }
  154. })
  155. }
  156. function zcszsdwClick(index) {
  157. zcszsdwIndex.value = index
  158. }
  159. function subChange() {}
  160. function czsubChange() {
  161. show.value = !show.value
  162. }
  163. onLoad((e) => {
  164. urlParams.value = e
  165. console.log(e);
  166. show.value = false
  167. })
  168. onReady(() => {
  169. form1.value.setRules(rules.value)
  170. })
  171. </script>
  172. <style lang="scss" scoped>
  173. body {
  174. padding: 100rpx 50rpx;
  175. box-sizing: border-box;
  176. }
  177. .topBtn {
  178. width: calc(100vw - 100rpx);
  179. height: 100rpx;
  180. display: flex;
  181. justify-content: space-between;
  182. align-items: center;
  183. //margin-bottom: 20rpx;
  184. border-bottom: 1rpx solid #cccccc;
  185. .u-subsection {
  186. width: 600rpx;
  187. }
  188. .btn {
  189. display: flex;
  190. align-items: center;
  191. justify-content: center;
  192. uni-button {
  193. margin-left: 20rpx;
  194. }
  195. }
  196. }
  197. .content {
  198. background-color: #ebebeb;
  199. border-radius: 20rpx;
  200. width: calc(100vw - 100rpx);
  201. ;
  202. height: calc(100vh - 300rpx);
  203. text-align: center;
  204. }
  205. .handleFile {
  206. width: calc(100vw - 100rpx);
  207. ;
  208. height: calc(100vh - 300rpx);
  209. display: flex;
  210. justify-content: space-around;
  211. align-items: center;
  212. uni-scroll-view {
  213. width: 45vw;
  214. height: 100%;
  215. background-color: #fff;
  216. text-align: center;
  217. padding: 20rpx;
  218. box-sizing: border-box;
  219. }
  220. }
  221. .selected {
  222. height: 400rpx;
  223. }
  224. .mySelectTree {
  225. width: 400rpx;
  226. }
  227. .lybut {
  228. height: 50rpx;
  229. width: 200rpx;
  230. margin-top: 10rpx;
  231. margin-left: 20rpx;
  232. }
  233. </style>