create.vue 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335
  1. <template>
  2. <view class="m_right">
  3. <image src="../../../assets/home/homeBG.png" class="s_logo" mode=""></image>
  4. <view class="s_content_container">
  5. <view class="s_content">
  6. <view class="uni-form-item df fdr aic">
  7. <view class="title">项目名称</view>
  8. <input class="form-input" v-model="model.projectName" name="input" placeholder="请输入项目名称" />
  9. </view>
  10. <view class="uni-form-item df fdr aic">
  11. <view class="title">项目类型</view>
  12. <!-- <input type="number" class="form-input" value="" placeholder="这是一个项目类型"/> -->
  13. <!-- <input name="input" v-model="model.type" class="form-input" type="number" placeholder="这是一个项目类型" /> -->
  14. <picker class="form-input" @change="bindPickerChange_proType" :value="index_proType" :range="proType">
  15. <view class=" df fdr aic jcsb">
  16. <view>{{proType[index_proType]}}</view>
  17. <view>
  18. <img src="../../../assets/user/pic_user_03.png" />
  19. </view>
  20. </view>
  21. </picker>
  22. </view>
  23. <view class="uni-form-item ">
  24. <view class="title">项目介绍</view>
  25. <textarea name="" class="form-input" v-model="model.describe" style="height: 100rpx;" id="" cols="10" rows="5"
  26. placeholder="请输入项目介绍"></textarea>
  27. </view>
  28. </view>
  29. </view>
  30. <view class="s_footer" style="text-align: center">
  31. <button size="mini" class="m_btn_download" style="" @click="save">创建完成</button>
  32. </view>
  33. </view>
  34. </template>
  35. <script>
  36. export default {
  37. name: "create",
  38. data() {
  39. return {
  40. model: {
  41. createUserID: undefined,
  42. projectName: "",
  43. describe: "",
  44. type: "科幻",
  45. },
  46. index_proType: 0,
  47. proType: ['科幻', '现实', '剧情', '历史', '爱情', '惊悚', '公路', '动画'],
  48. }
  49. },
  50. components: {},
  51. created() {
  52. this.clear();
  53. },
  54. methods: {
  55. save() {
  56. this.model.createUserID = this.$UserId;
  57. console.log(this.model);
  58. if (this.model.projectName == "") {
  59. alert("请输入项目名称~");
  60. return false;
  61. }
  62. if (this.model.describe == "") {
  63. alert("请输入项目介绍~");
  64. return false;
  65. }
  66. if (this.model.type == "") {
  67. alert("请输入项目类型~");
  68. return false;
  69. }
  70. let data = {
  71. "CreateUserID":mydata_userInfo.UserID,
  72. "ProjectName":this.model.projectName,
  73. "Describe":this.model.describe,
  74. "Type":this.model.type
  75. }
  76. console.log("请求创建项目",data);
  77. MyRequest.CreateProjectNew(data,function(res){
  78. console.log("创建项目成功",res);
  79. },null);
  80. },
  81. clear() {
  82. this.model = {
  83. createUserID: undefined,
  84. projectName: "",
  85. describe: "",
  86. type: "科幻",
  87. }
  88. },
  89. bindPickerChange_proType: function(e) {
  90. this.index_proType = e.target.value;
  91. this.model.type = this.proType[this.index_proType];
  92. console.log(this.model)
  93. },
  94. }
  95. }
  96. </script>
  97. <style scoped>
  98. @import '../../../assets/icon/iconfont.css';
  99. .form-input {
  100. width: 100%;
  101. border: 1px solid #ece8e8;
  102. line-height: 50rpx;
  103. font-size: 30rpx;
  104. border-radius: 6rpx;
  105. padding: 10rpx 40rpx;
  106. }
  107. .s_content {
  108. margin-top: 100rpx;
  109. }
  110. .title {
  111. width: 200rpx;
  112. line-height: 60rpx;
  113. }
  114. .uni-form-item {
  115. display: flex;
  116. justify-content: space-between;
  117. height: 100rpx;
  118. }
  119. .m_container {
  120. display: flex;
  121. justify-content: space-between;
  122. width: 100%;
  123. height: 100%;
  124. .m_left {
  125. width: 500rpx;
  126. background-color: #fff;
  127. border-right: 10rpx solid #ECECEC;
  128. border-top: 5rpx solid #ECECEC;
  129. box-shadow: 3px 0px 6px 0px rgba(0, 0, 0, 0.1);
  130. .m_hander {
  131. text-align: center;
  132. background-color: #fff;
  133. height: 600rpx;
  134. position: relative;
  135. // margin: 5rpx 10rpx 10rpx 0;
  136. border-bottom: 8rpx solid #ECECEC;
  137. .m_teacher {
  138. position: absolute;
  139. top: 50%;
  140. left: 50%;
  141. transform: translate(-50%, -50%);
  142. }
  143. .m_teacher_name {
  144. font-size: 1.1rem;
  145. font-weight: 600;
  146. padding: 30rpx 0;
  147. font-family: MicrosoftYaHei;
  148. }
  149. .m_head_portrait {
  150. width: 250rpx;
  151. height: 250rpx;
  152. color: #555555;
  153. }
  154. }
  155. }
  156. .m_right {
  157. width: 100%;
  158. margin-top: 5rpx;
  159. // padding: 0 150rpx;
  160. background-color: #fff;
  161. box-shadow: 3px 0px 6px 0px rgba(0, 0, 0, 0.1);
  162. .m_right_hander {
  163. text-align: right;
  164. height: 250rpx;
  165. position: relative;
  166. .m_btn_red {
  167. position: absolute;
  168. height: 80rpx;
  169. line-height: 80rpx;
  170. padding: 0 40rpx;
  171. right: 0;
  172. top: 50%;
  173. transform: translateY(-50%);
  174. background: #EA252C;
  175. color: #fff;
  176. }
  177. }
  178. }
  179. .m_menu-icon {
  180. width: 24rpx;
  181. height: 24rpx;
  182. }
  183. .m_menu {
  184. background-color: #fff;
  185. .m_menu-item {
  186. position: relative;
  187. display: flex;
  188. padding: 20rpx 0;
  189. line-height: 90rpx;
  190. font-weight: 500;
  191. border-bottom: 1px solid #DDDDDD;
  192. .m_menu_item_icon {
  193. width: 100rpx;
  194. text-align: right;
  195. margin-right: 15rpx;
  196. }
  197. .m_menu_item_name {
  198. margin-left: 10rpx;
  199. font-weight: 600;
  200. }
  201. .m_act {
  202. background: #FF0019;
  203. width: 8rpx;
  204. border-radius: 0px 200rpx 200rpx 0px;
  205. position: absolute;
  206. height: 90rpx;
  207. top: 20rpx;
  208. left: 0;
  209. }
  210. }
  211. }
  212. .m_act_font .m_menu_item_name {
  213. color: #FF0019;
  214. }
  215. }
  216. .m_edit {
  217. position: absolute;
  218. top: 50%;
  219. left: 50%;
  220. transform: translate(-50%, -50%);
  221. background: rgb(67, 127, 250);
  222. color: rgb(255, 255, 255);
  223. min-width: 130rpx;
  224. }
  225. .m_delete {
  226. position: absolute;
  227. top: 50%;
  228. left: 50%;
  229. min-width: 130rpx;
  230. transform: translate(-50%, -50%);
  231. background: rgb(234, 37, 44);
  232. color: rgb(255, 255, 255);
  233. }
  234. .m_right_footer {
  235. margin-top: 80rpx;
  236. }
  237. .m_paging {
  238. text-align: right;
  239. .m_paging_item {
  240. padding: 10rpx 18rpx;
  241. border: 1rpx solid #DDDDDD;
  242. border-radius: 8rpx;
  243. margin-right: 10rpx;
  244. }
  245. .p_act {
  246. background: #EA252C;
  247. color: #fff;
  248. border: inherit;
  249. }
  250. }
  251. .m_paging_item:hover {
  252. background: #EA252C;
  253. color: #fff;
  254. border: inherit;
  255. }
  256. .m_act1 {
  257. color: #FF0019;
  258. }
  259. .s_logo {
  260. width: 100%;
  261. height: 800rpx;
  262. }
  263. .s_content_container {
  264. padding: 0 600rpx;
  265. .s_title {
  266. font-weight: bold;
  267. text-align: center;
  268. line-height: 200rpx;
  269. font-size: 45rpx;
  270. }
  271. .s_content {
  272. font-weight: 500;
  273. font-size: 40rpx;
  274. line-height: 70rpx;
  275. }
  276. }
  277. .m_btn_download {
  278. height: 80rpx;
  279. line-height: 80rpx;
  280. padding: 0 70rpx;
  281. background: #EA252C;
  282. color: #fff;
  283. font-family: MicrosoftYaHei;
  284. margin-bottom: 80rpx;
  285. }
  286. .s_footer {
  287. margin-top: 80rpx;
  288. }
  289. </style>