projectChange.vue 8.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341
  1. <template>
  2. <view class="content">
  3. <view class="param">
  4. <view class="all-text">创建项目需求</view>
  5. <view class="proName">项目标题</view>
  6. <input class="proINname" placeholder="请输入项目标题"/>
  7. <view class="proMiao">项目描述</view>
  8. <uni-data-select class="proINname"
  9. v-model="value" placeholder="请选择项目描述"
  10. :localdata="range"
  11. @change="change"
  12. ></uni-data-select>
  13. <view class="proMiao">附件</view>
  14. <view class="upload-img proINname">
  15. <uni-file-picker limit="3"
  16. @select='selectUpload'
  17. :auto-upload='false'
  18. file-extname='pdf,docx,xlsx,'
  19. file-mediatype="all"
  20. @success='uploadSuccess'
  21. @fail='uploadFail'
  22. :list-styles='listStyles'
  23. v-model='fileList'
  24. ></uni-file-picker>
  25. </view>
  26. <span style="margin: 20rpx 0 0 20rpx;">支持pdf/word/xlsx格式,单个文件大小不超过5MB</span>
  27. <view class="proMiao">主办单位</view>
  28. <uni-data-select class="proINname"
  29. v-model="value" placeholder="请选择主办单位"
  30. :localdata="range"
  31. @change="change"
  32. ></uni-data-select>
  33. <view class="proMiao">协办单位</view>
  34. <uni-data-select class="proINname"
  35. v-model="value" placeholder="请选择协办单位"
  36. :localdata="range"
  37. @change="change"
  38. ></uni-data-select>
  39. <view class="proMiao">项目级别</view>
  40. <uni-data-select class="proINname"
  41. v-model="value" placeholder="请选择项目级别"
  42. :localdata="range"
  43. @change="change"
  44. ></uni-data-select>
  45. <view class="proMiao">关联流程</view>
  46. <uni-data-select class="proINname"
  47. v-model="value" placeholder="请选择关联流程"
  48. :localdata="range"
  49. @change="change"
  50. ></uni-data-select>
  51. <view class="proMiao">项目来源</view>
  52. <uni-data-select class="proINname"
  53. v-model="value" placeholder="请选择项目来源"
  54. :localdata="range"
  55. @change="change"
  56. ></uni-data-select>
  57. <view class="proMiao jindu">完成进度</view>
  58. <view class="weidu">维度权重40%</view>
  59. <view class="addRen" @click="addRen">新增任务</view>
  60. <!-- 任务列表 -->
  61. <view style="width: 100%;margin: 50rpx 0 0 20rpx;">
  62. <view class="renwu" v-for="(item,index) in renwu" :key="index">
  63. <view>{{item.name}}</view>
  64. <view>{{item.time}}</view>
  65. <view style="display: flex;">
  66. <view class="renwu-bu bianji">编辑</view>
  67. <view class="renwu-bu delete">删除</view>
  68. </view>
  69. </view>
  70. </view>
  71. <view style="width: 100%;margin: 50rpx 0 0 20rpx;">
  72. <view class="renwu" v-for="(item,index) in renwu" :key="index">
  73. <view>{{item.name}}</view>
  74. <view>{{item.time}}</view>
  75. <view>30%</view>
  76. <view>100</view>
  77. <view style="color: rgba(0, 97, 255, 1);">更新进度</view>
  78. </view>
  79. </view>
  80. <view class="proMiao jindu">进度详情</view>
  81. <!-- 进度 -->
  82. <view style="margin: 33rpx 0 0 19rpx;">
  83. <view v-for="(item,index) in 5" :key="index" class="jindu-kuang">
  84. <view style="display: flex;">
  85. <view class="jindu-circle"></view>
  86. <view>
  87. <view style="width: 600rpx;display: flex;justify-content: space-between;margin-top: 20rpx;">
  88. <view style="display: flex;">
  89. <view style="margin-left: 28rpx;">周提</view>
  90. <view class="jindu-type lixiang">已立项</view>
  91. </view>
  92. <!-- <view class="jindu-type cuiban">已催办</view>
  93. <view class="jindu-type tijiao">已提交</view> -->
  94. <view>2024-06-10 12:00:00</view>
  95. </view>
  96. <view style="margin:7rpx 0 0 28rpx;">任务指派:xxx,xxx,xxx</view>
  97. <view style="margin:7rpx 0 0 28rpx;">任务指派:xxx,xxx,xxx</view>
  98. <view style="margin:7rpx 0 0 28rpx;">任务指派:xxx,xxx,xxx</view>
  99. <view style="margin:7rpx 0 0 28rpx;">任务指派:xxx,xxx,xxx</view>
  100. </view>
  101. </view>
  102. <view class="jindu-line" v-if="index<4"></view>
  103. </view>
  104. </view>
  105. <view class="project">
  106. <view class="butt queren">保存</view>
  107. </view>
  108. <view style="width: 100%;height: 60rpx;"></view>
  109. </view>
  110. </view>
  111. </template>
  112. <script>
  113. export default {
  114. data() {
  115. return {
  116. value: 1,
  117. range: [
  118. { value: 0, text: "篮球" },
  119. { value: 1, text: "足球" },
  120. { value: 2, text: "游泳" },
  121. ],
  122. fileList: [],
  123. listStyles: {
  124. "borderStyle": {
  125. "width": "0", // 边框宽度
  126. },
  127. "border": false, // 是否显示边框
  128. "dividline": false
  129. },
  130. renwu:[
  131. {name:'xxx任务',time:'2024-04-11'},
  132. {name:'xxx任务',time:'2024-04-11'},
  133. {name:'xxx任务',time:'2024-04-11'},
  134. ],
  135. }
  136. },
  137. onLoad() {
  138. },
  139. methods: {
  140. change(e) {
  141. console.log("e:", e);
  142. },
  143. //新增任务
  144. addRen(){
  145. uni.navigateTo({
  146. url:'/pages/project/addRenwu'
  147. })
  148. },
  149. // 上传附件
  150. uploadSuccess(e) {
  151. console.log('上传成功', e)
  152. },
  153. uploadFail(e) {
  154. console.log('上传失败:', e)
  155. },
  156. selectUpload(e) {
  157. console.log('上传:', e)
  158. uni.uploadFile({
  159. url: 'url', //仅为示例,非真实的接口地址
  160. filePath: e.tempFilePaths[0],
  161. name: 'file',
  162. // formData: {
  163. // 'file': ''
  164. // },
  165. success: (uploadFileRes) => {
  166. console.log(uploadFileRes.data);
  167. },
  168. fail: (err) => {
  169. console.log(err);
  170. }
  171. })
  172. },
  173. }
  174. }
  175. </script>
  176. <style>
  177. .content {
  178. display: flex;
  179. flex-direction: column;
  180. align-items: center;
  181. justify-content: center;
  182. }
  183. .param{
  184. margin: 20rpx 0 0 0;
  185. width: 100%;
  186. background-color: rgba(255, 255, 255, 1);
  187. font-size: 28rpx;
  188. font-weight: 400;
  189. line-height: 41rpx;
  190. color: rgba(0, 0, 0, 1);
  191. }
  192. .all-text{
  193. margin: 22rpx 0 0 20rpx;
  194. font-size: 32rpx;
  195. font-weight: 500;
  196. color: rgba(0, 0, 0, 1);
  197. }
  198. .proName{
  199. margin: 23rpx 0 0 20rpx;
  200. }
  201. .proINname{
  202. margin: 25rpx 0 0 21rpx;
  203. width: 709rpx;
  204. height: 90rpx;
  205. border-radius: 13rpx;
  206. background: rgba(245, 248, 252, 1);
  207. border: 1rpx solid rgba(229, 229, 229, 1);
  208. font-size: 28rpx;
  209. line-height: 90rpx;
  210. color: rgba(179, 179, 179, 1);
  211. }
  212. .proMiao{
  213. margin: 31rpx 0 0 20rpx;
  214. }
  215. /* 上传附件 */
  216. .upload-img{
  217. width: 200rpx;
  218. height: 80rpx;
  219. opacity: 1;
  220. border-radius: 13rpx;
  221. background: rgba(0, 97, 255, 0.1);
  222. border: 1rpx solid rgba(0, 97, 255, 1);
  223. }
  224. .jindu{
  225. font-size: 32rpx;
  226. font-weight: 500;
  227. line-height: 46rpx;
  228. }
  229. /* 进度 */
  230. .jindu-kuang{
  231. font-size: 24rpx;
  232. line-height: 35rpx;
  233. color: rgba(128, 128, 128, 1);
  234. }
  235. .jindu-circle{
  236. margin-top: 10rpx;
  237. width: 100rpx;
  238. height: 100rpx;
  239. border-radius: 50%;
  240. opacity: 1;
  241. background-color:rgba(204, 204, 204, 1);
  242. }
  243. .jindu-type{
  244. width: 103rpx;
  245. height: 40rpx;
  246. border-radius: 71rpx;
  247. font-size: 24rpx;
  248. line-height: 40rpx;
  249. color: rgba(255, 255, 255, 1);
  250. text-align: center;
  251. margin: 0 0 0 20rpx;
  252. }
  253. .lixiang{
  254. background: linear-gradient(90deg, rgba(54, 111, 255, 1) 0%, rgba(93, 160, 252, 1) 100%);
  255. }
  256. .cuiban{
  257. background: linear-gradient(90deg, rgba(57, 167, 139, 1) 0%, rgba(126, 224, 203, 1) 100%);
  258. }
  259. .tijiao{
  260. background: linear-gradient(90deg, rgba(255, 112, 69, 1) 0%, rgba(247, 161, 114, 1) 100%);
  261. }
  262. .jindu-line{
  263. width: 4rpx;
  264. height: 100rpx;
  265. background-color: rgba(166, 166, 166, 1);
  266. }
  267. .weidu{
  268. margin: 7rpx 0 0 20rpx;
  269. font-size: 24rpx;
  270. line-height: 35rpx;
  271. color: rgba(128, 128, 128, 1);
  272. }
  273. .addRen{
  274. margin: -80rpx 0 0 581rpx;
  275. width: 149rpx;
  276. height: 59rpx;
  277. border-radius: 92rpx;
  278. background: rgba(0, 97, 255, 1);
  279. font-size: 28rpx;
  280. line-height: 59rpx;
  281. color: rgba(255, 255, 255, 1);
  282. text-align: center;
  283. }
  284. /* 任务列表 */
  285. .renwu{
  286. display: flex;
  287. margin-top: 6rpx;
  288. width: 709rpx;
  289. height: 90rpx;
  290. border-radius: 13rpx;
  291. background: rgba(245, 248, 252, 1);
  292. border: 1rpx solid rgba(229, 229, 229, 1);
  293. font-size: 28rpx;
  294. justify-content: space-evenly;
  295. align-items: center;
  296. }
  297. .renwu-bu{
  298. width: 105rpx;
  299. height: 50rpx;
  300. border-radius: 110rpx;
  301. line-height:50rpx;
  302. text-align: center;
  303. }
  304. .bianji{
  305. border: 1rpx solid rgba(0, 97, 255, 1);
  306. color: rgba(0, 97, 255, 1);
  307. }
  308. .delete{
  309. margin-left: 20rpx;
  310. border: 1rpx solid rgba(212, 48, 48, 1);
  311. color: rgba(212, 48, 48, 1);
  312. }
  313. .project{
  314. display: flex;
  315. margin: 61rpx 0 0 0;
  316. justify-content: space-evenly;
  317. }
  318. .butt{
  319. width: 330rpx;
  320. height: 90rpx;
  321. border-radius: 117rpx;
  322. font-size: 32rpx;
  323. line-height: 90rpx;
  324. text-align: center;
  325. }
  326. .quxiao{
  327. border: 1rpx solid rgba(0, 97, 255, 1);
  328. color: rgba(0, 97, 255, 1);
  329. }
  330. .queren{
  331. background: rgba(0, 97, 255, 1);
  332. color: rgba(255, 255, 255, 1);
  333. }
  334. </style>