project.vue 9.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474
  1. <template>
  2. <view class="m_right">
  3. <image src="../../../assets/home/homeBG.png" class="s_logo" mode=""></image>
  4. <view class="m_right_container">
  5. <view class="m_row_class">
  6. <view class="m_row">
  7. <view class="m_row_link">
  8. </view>
  9. <view class="m_row_title" v-text="'项目管理'">
  10. </view>
  11. <view style="position: relative;margin-left: 40rpx;">
  12. <div class="triangle_border_down">
  13. <span></span>
  14. </div>
  15. </view>
  16. </view>
  17. <table style="width: 100%;border: 1px solid #DDDDDD;border-collapse: collapse">
  18. <thead class="m-table-hander">
  19. <tr>
  20. <th>名称</th>
  21. <th>类型</th>
  22. <th>介绍</th>
  23. <th>创始人</th>
  24. <th>修改</th>
  25. <th>删除</th>
  26. </tr>
  27. </thead>
  28. <tbody>
  29. <tr v-for="(item,index) in projectData" :key="index">
  30. <th>{{item.ProjectName}}</th>
  31. <th></th>
  32. <th></th>
  33. <th>{{item.CreateUserName}}</th>
  34. <th style="position: relative;"><button type="default" size="mini" @click="edit(index)" class="m_edit">修改</button></th>
  35. <th style="position: relative;"><button type="default" size="mini" @click="delete1(index)" class="m_delete">删除</button></th>
  36. </tr>
  37. </tbody>
  38. </table>
  39. </view>
  40. <view class="m_row_class">
  41. <view class="" style="display: flex;justify-content: space-between;">
  42. <view class="m_row">
  43. <view class="m_row_link">
  44. </view>
  45. <view class="m_row_title" v-text="'文件管理'">
  46. </view>
  47. <view style="position: relative;margin-left: 40rpx;">
  48. <div class="triangle_border_down">
  49. <span></span>
  50. </div>
  51. </view>
  52. </view>
  53. <view class="">
  54. <button type="default" class="m_btn_download" size="mini">添加文件</button>
  55. </view>
  56. </view>
  57. <table style="width: 100%;border: 1px solid #DDDDDD;border-collapse: collapse">
  58. <thead class="m-table-hander">
  59. <tr>
  60. <th>文件</th>
  61. <th>文件名</th>
  62. <th>文件类型</th>
  63. <th>上传人</th>
  64. <th>上传日期</th>
  65. <th>下载</th>
  66. <th>删除</th>
  67. <th>审核</th>
  68. </tr>
  69. </thead>
  70. <tbody>
  71. <tr v-for="(item,index) in fileData" :key="index">
  72. <th>{{item.UploadUserType}}</th>
  73. <th>{{item.Name}}</th>
  74. <th>{{item.UploadUserName}}</th>
  75. <th>{{item.Type}}</th>
  76. <th>{{item.UploadTime}}</th>
  77. <th style="position: relative;"><button type="default" size="mini" @click="download(index)" class="m_edit">下载</button></th>
  78. <th style="position: relative;"><button type="default" size="mini" @click="delete1(index)" class="m_delete">删除</button></th>
  79. <th style="position: relative;"><button type="default" size="mini" @click="audit(item)" class="m_audit">审核</button></th>
  80. </tr>
  81. </tbody>
  82. </table>
  83. </view>
  84. <view class="m_row_class">
  85. <view class="" style="display: flex;justify-content: space-between;">
  86. <view class="m_row">
  87. <view class="m_row_link">
  88. </view>
  89. <view class="m_row_title" v-text="'成员管理'">
  90. </view>
  91. <view style="position: relative;margin-left: 40rpx;">
  92. <div class="triangle_border_down">
  93. <span></span>
  94. </div>
  95. </view>
  96. </view>
  97. <view class="">
  98. <button type="default" class="m_btn_download" size="mini">添加学生</button>
  99. </view>
  100. </view>
  101. <table style="width: 100%;border: 1px solid #DDDDDD;border-collapse: collapse">
  102. <thead class="m-table-hander">
  103. <tr>
  104. <th>用户名</th>
  105. <th>姓名</th>
  106. <th>专业</th>
  107. <th>班级</th>
  108. <th>职务</th>
  109. <th>电话</th>
  110. <th>删除</th>
  111. </tr>
  112. </thead>
  113. <tbody>
  114. <tr v-for="(item,index) in 1" :key="index">
  115. <th></th>
  116. <th></th>
  117. <th></th>
  118. <th></th>
  119. <th>
  120. <div>
  121. <input type="number" value="" />
  122. </div>
  123. </th>
  124. <th></th>
  125. <th style="position: relative;"><button type="default" size="mini" class="m_delete" @click="delete1(item)">删除</button></th>
  126. </tr>
  127. </tbody>
  128. </table>
  129. </view>
  130. </view>
  131. <msg ref="msg" :title="title" @determine="determine" :btnArr="arr" v-show="show"></msg>
  132. <audit ref="audit" v-show="auditshow" @determine="determine"></audit>
  133. <!-- <locationtemp ref="location_temp"></locationtemp> -->
  134. </view>
  135. </template>
  136. <script>
  137. import msg from "./msg.vue"
  138. import audit from "./audit.vue"
  139. // import locationtemp from "./location_temp.vue"
  140. // import api from "../../../api/project.js"
  141. export default {
  142. name: "home_project",
  143. data() {
  144. return {
  145. index: 1,
  146. title: "",
  147. show: false,
  148. auditshow: false,
  149. callback: "",
  150. arr: [],
  151. data: [],
  152. projectData: [],
  153. ProjectItem: [],
  154. fileData: []
  155. }
  156. },
  157. components: {
  158. msg,
  159. audit,
  160. // locationtemp
  161. },
  162. created() {
  163. this.getlist();
  164. // this.getFileList();
  165. },
  166. methods: {
  167. paging(obj) {
  168. this.index = obj;
  169. },
  170. delete1(index) {
  171. this.title = "是否删除信息?";
  172. this.arr = ["删除", "取消"]
  173. this.show = true;
  174. },
  175. download(index) {
  176. this.title = "下载成功?";
  177. this.arr = ["确认"];
  178. this.show = true;
  179. },
  180. edit(index) {
  181. this.title = "是否删除信息?";
  182. this.arr = ["删除", "取消"]
  183. this.show = true;
  184. },
  185. audit(index) {
  186. this.title = "是否确认审核?";
  187. this.arr = ["通过", "未通过"]
  188. this.show = true;
  189. this.callback = "audit"
  190. // this.auditshow = true;
  191. },
  192. determine(obj) {
  193. this.show = false;
  194. this.auditshow = false;
  195. switch (this.callback) {
  196. case "audit": //审核
  197. const data = {
  198. ProjectItemID: "xxxx",
  199. Pass: obj == 0
  200. }
  201. this.auditPost(data);
  202. break;
  203. default:
  204. break;
  205. }
  206. // if (this.audit == "audit") {
  207. // }
  208. console.log(obj)
  209. },
  210. auditPost(obj) {
  211. uni.request({
  212. url: this.$Api + "/project/setfilepass",
  213. data: obj,
  214. method: "POST",
  215. dataType: "json",
  216. success: res => {
  217. var {
  218. data
  219. } = res;
  220. alert(data.msg);
  221. }
  222. })
  223. },
  224. getlist() {
  225. uni.request({
  226. url: this.$Api + "/project/getprojectcontent",
  227. data: {
  228. "UserID": this.$UserId
  229. },
  230. method: "POST",
  231. dataType: "json",
  232. success: res => {
  233. var {
  234. data
  235. } = res;
  236. this.projectData = data.Projects;
  237. }
  238. })
  239. },
  240. getFileList() {
  241. console.log("用户id");
  242. console.log(this.$UserId);
  243. var temp = {
  244. "UserID": this.$UserId,
  245. "ProjectID": 10001
  246. }
  247. uni.request({
  248. url: this.$Api + "/project/GetProjectContent",
  249. data: temp,
  250. method: "POST",
  251. dataType: "json",
  252. success: res => {
  253. var {
  254. data
  255. } = res;
  256. if (data.code == 100) {
  257. this.fileData = data.ProjectItem;
  258. }
  259. }
  260. })
  261. },
  262. viewProject(obj) {
  263. this.projectData = [obj];
  264. }
  265. }
  266. }
  267. </script>
  268. <style lang="scss">
  269. .m_right {
  270. width: 100%;
  271. margin-top: 5rpx;
  272. // padding: 0 150rpx;
  273. background-color: #fff;
  274. box-shadow: 3px 0px 6px 0px rgba(0, 0, 0, 0.1);
  275. .m_right_container {
  276. padding: 150rpx;
  277. }
  278. .s_logo {
  279. width: 100%;
  280. height: 800rpx;
  281. }
  282. .m_right_hander {
  283. text-align: right;
  284. height: 250rpx;
  285. position: relative;
  286. .m_btn_red {
  287. position: absolute;
  288. height: 80rpx;
  289. line-height: 80rpx;
  290. padding: 0 40rpx;
  291. right: 0;
  292. top: 50%;
  293. transform: translateY(-50%);
  294. background: #EA252C;
  295. color: #fff;
  296. }
  297. }
  298. }
  299. .m_btn_download {
  300. height: 80rpx;
  301. line-height: 80rpx;
  302. padding: 0 70rpx;
  303. background: #EA252C;
  304. color: #fff;
  305. font-family: MicrosoftYaHei;
  306. }
  307. tbody tr {
  308. border-top: 2rpx solid #DDDDDD !important;
  309. }
  310. tbody tr th:first-child {
  311. position: relative;
  312. }
  313. tbody tr th {
  314. font-weight: 400 !important;
  315. height: 140rpx;
  316. line-height: 140rpx;
  317. }
  318. tbody tr:hover {
  319. // color: #fff;
  320. background: #FDEBEC;
  321. // opacity: 0.08;
  322. }
  323. .m-table-hander {
  324. background-color: #FFF8F7;
  325. height: 140rpx;
  326. line-height: 140rpx;
  327. font-family: MicrosoftYaHei-Bold, MicrosoftYaHei;
  328. font-weight: bold;
  329. }
  330. .m_edit {
  331. position: absolute;
  332. top: 50%;
  333. left: 50%;
  334. transform: translate(-50%, -50%);
  335. background: rgb(67, 127, 250);
  336. color: rgb(255, 255, 255);
  337. min-width: 130rpx;
  338. }
  339. .m_delete {
  340. position: absolute;
  341. top: 50%;
  342. left: 50%;
  343. min-width: 130rpx;
  344. transform: translate(-50%, -50%);
  345. background: rgb(234, 37, 44);
  346. color: rgb(255, 255, 255);
  347. }
  348. .m_right_footer {
  349. margin-top: 80rpx;
  350. }
  351. .m_logoimg {
  352. width: 80rpx;
  353. height: 80rpx;
  354. position: absolute;
  355. top: 50%;
  356. left: 50%;
  357. transform: translate(-50%, -50%);
  358. }
  359. .m_paging {
  360. text-align: right;
  361. .m_paging_item {
  362. padding: 10rpx 18rpx;
  363. border: 1rpx solid #DDDDDD;
  364. border-radius: 8rpx;
  365. margin-right: 10rpx;
  366. }
  367. .p_act {
  368. background: #EA252C;
  369. color: #fff;
  370. border: inherit;
  371. }
  372. }
  373. .m_paging_item:hover {
  374. background: #EA252C;
  375. color: #fff;
  376. border: inherit;
  377. }
  378. .m_act1 {
  379. color: #FF0019;
  380. }
  381. .m_row {
  382. display: flex;
  383. height: 60rpx;
  384. line-height: 60rpx;
  385. font-size: 30rpx;
  386. color: #ea252c;
  387. padding: 0 0 80rpx 0;
  388. }
  389. .m_audit {
  390. position: absolute;
  391. top: 50%;
  392. left: 50%;
  393. min-width: 65px;
  394. -webkit-transform: translate(-50%, -50%);
  395. transform: translate(-50%, -50%);
  396. color: white;
  397. background-color: #FF791B;
  398. }
  399. .m_row_link {
  400. width: 10rpx;
  401. height: 60rpx;
  402. background-color: #ea252c;
  403. margin-right: 40rpx;
  404. }
  405. .m_row_title {
  406. color: #ea252c;
  407. font-weight: bold;
  408. font-size: 40rpx;
  409. }
  410. /*向下*/
  411. .triangle_border_down {
  412. width: 0;
  413. height: 0;
  414. border-width: 25rpx 25rpx 0;
  415. border-style: solid;
  416. border-color: #ea252c transparent transparent;
  417. /*灰 透明 透明 */
  418. margin: 20rpx auto;
  419. position: relative;
  420. }
  421. .m_row_class {
  422. margin-bottom: 60rpx;
  423. }
  424. </style>