1
0

information_old.vue 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162
  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" v-model="current" @change="subChange"></u-subsection>
  4. <view class="btn">
  5. <u-button size="medium" type="primary">已阅</u-button>
  6. <u-button size="medium" type="success">转交</u-button>
  7. <u-button size="medium" type="error">退件</u-button>
  8. <u-button size="medium" @click="onClose">关闭</u-button>
  9. </view>
  10. </view>
  11. <scroll-view scroll-y="true" class="content" v-show="current === 0">
  12. <image v-for="it in 48" src="../../static/666.png" mode="heightFix"></image>
  13. </scroll-view>
  14. <view class="handleFile" v-show="current === 1">
  15. <!-- 左侧视图 -->
  16. <scroll-view scroll-y="true" >
  17. <uni-transition :mode-class="['fade', 'slide-left']" :show="!show">
  18. <image v-for="it in 48" src="../../static/666.png" mode="heightFix"></image>
  19. </uni-transition>
  20. <uni-transition :mode-class="['fade', 'slide-right']" :show="show">
  21. 选择人...
  22. </uni-transition>
  23. </scroll-view>
  24. <!-- 右侧视图 -->
  25. <scroll-view scroll-y="true" >
  26. <u-form :model="form" ref="form1">
  27. <view style="text-align: start;">委分管领导审示意见:</view>
  28. <u-form-item prop="suggest"><u-input type="textarea" v-model="form.suggest" border height="400"/></u-form-item>
  29. </u-form>
  30. <button type="primary" @click="confirm" style="margin-bottom: 40rpx;">意见确认</button>
  31. <view class="selected">
  32. <button @click="choosePeople">转交人选择</button>
  33. </view>
  34. </scroll-view>
  35. </view>
  36. </template>
  37. <script setup>
  38. import {ref, reactive, nextTick} from"vue"
  39. import {onLoad, onReady} from "@dcloudio/uni-app"
  40. const show = ref(false)
  41. const form1 = ref(null)
  42. const rules = ref({
  43. suggest: [{ required: true, message: '请输入意见', trigger: ['change', 'blur'] }]
  44. })
  45. const list = ref([
  46. {
  47. name: '文件浏览'
  48. },
  49. {
  50. name: '办理'
  51. },
  52. {
  53. name: '流程图'
  54. }
  55. ])
  56. const current = ref(0)
  57. const urlParams = ref({})
  58. const form = reactive({
  59. suggest: ''
  60. })
  61. function onClose(){
  62. uni.reLaunch({
  63. url: urlParams.value.url
  64. })
  65. }
  66. function confirm(){
  67. form1.value.validate((valid) => {
  68. if (valid) {
  69. uni.showToast({
  70. icon: "none",
  71. title: "表单验证通过"
  72. })
  73. }
  74. })
  75. }
  76. function choosePeople(type) {
  77. show.value = !show.value
  78. }
  79. function subChange(){
  80. // show.value = false
  81. }
  82. onLoad((e)=>{
  83. urlParams.value = e
  84. console.log(e);
  85. })
  86. onReady(()=>{
  87. form1.value.setRules(rules.value)
  88. })
  89. </script>
  90. <style lang="scss" scoped>
  91. body{
  92. padding: 100rpx 50rpx;
  93. box-sizing: border-box;
  94. }
  95. .topBtn{
  96. width: calc(100vw - 100rpx);
  97. height: 100rpx;
  98. display: flex;
  99. justify-content: space-between;
  100. align-items: center;
  101. margin-bottom: 50rpx;
  102. .u-subsection{
  103. width: 600rpx;
  104. }
  105. .btn{
  106. display: flex;
  107. align-items: center;
  108. justify-content: center;
  109. uni-button{
  110. margin-left: 20rpx;
  111. }
  112. }
  113. }
  114. .content{
  115. background-color: #ebebeb;
  116. border-radius: 20rpx;
  117. width: calc(100vw - 100rpx);;
  118. height: calc(100vh - 300rpx);
  119. text-align: center;
  120. }
  121. .handleFile{
  122. background-color: #ebebeb;
  123. border-radius: 20rpx;
  124. width: calc(100vw - 100rpx);;
  125. height: calc(100vh - 300rpx);
  126. display: flex;
  127. justify-content: space-around;
  128. align-items: center;
  129. uni-scroll-view{
  130. border-radius: 20rpx;
  131. width: 45vw;
  132. height: 80vh;
  133. background-color: #fff;
  134. text-align: center;
  135. padding: 50rpx;
  136. box-sizing: border-box;
  137. }
  138. }
  139. .selected{
  140. height: 400rpx;
  141. background-color: #f5f9fc;
  142. border-radius: 15rpx;
  143. padding: 40rpx;
  144. uni-button{
  145. background-color: rgb(215, 224, 233);
  146. }
  147. }
  148. </style>