project.vue 37 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357
  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 class='table'> -->
  29. <tbody>
  30. <tr v-for="(item,index) in projectData" :key="index">
  31. <th>{{item.ProjectName}}</th>
  32. <th>{{item.Type}}</th>
  33. <th style="position: relative;"><button type="default" size="mini" @click="viewIntro(item)" class="m_edit">简介</button></th>
  34. <!-- <th>{{item.Describe}}</th> -->
  35. <th>{{item.CreateUserName}}</th>
  36. <th style="position: relative;"><button type="default" size="mini" @click="editProject(index)" class="m_edit">修改</button></th>
  37. <th style="position: relative;"><button type="default" size="mini" @click="deleteProject(index)" class="m_delete">删除</button></th>
  38. </tr>
  39. </tbody>
  40. </table>
  41. </view>
  42. <view class="m_row_class">
  43. <view class="" style="display: flex;justify-content: space-between;">
  44. <view class="m_row">
  45. <view class="m_row_link">
  46. </view>
  47. <view class="m_row_title" v-text="'文件管理'">
  48. </view>
  49. <view style="position: relative;margin-left: 40rpx;">
  50. <div class="triangle_border_down">
  51. <span></span>
  52. </div>
  53. </view>
  54. </view>
  55. <view class="">
  56. <button type="default" class="m_btn_download" size="mini" @click="onClick_addFile">添加文件</button>
  57. </view>
  58. </view>
  59. <table style="width: 100%;border: 1px solid #DDDDDD;border-collapse: collapse">
  60. <thead class="m-table-hander">
  61. <tr>
  62. <th>文件</th>
  63. <th>文件名</th>
  64. <th>文件类型</th>
  65. <th>上传人</th>
  66. <th>上传日期</th>
  67. <th>下载</th>
  68. <th>删除</th>
  69. <th>审核</th>
  70. <th>审核状态</th>
  71. </tr>
  72. </thead>
  73. <tbody>
  74. <tr v-for="(item,index) in fileData" :key="index">
  75. <th>{{index+1}}</th>
  76. <th>{{item.Name}}</th>
  77. <th>{{item.Type}}</th>
  78. <th>{{item.UploadUserName}}</th>
  79. <th>{{item.UPloadTime.substring(0,9)}}</th>
  80. <th style="position: relative;"><button type="default" size="mini" @click="download(index,item)" class="m_edit_1">下载</button></th>
  81. <th style="position: relative;"><button type="default" size="mini" @click="deleteFile(index,item)" class="m_delete_1">删除</button></th>
  82. <th style="position: relative;"><button type="default" size="mini" @click="audit(index,item)" class="m_audit_1">审核</button></th>
  83. <th>{{getShenheText(item.Pass)}}</th>
  84. </tr>
  85. </tbody>
  86. </table>
  87. </view>
  88. <view class="m_row_class">
  89. <view class="" style="display: flex;justify-content: space-between;">
  90. <view class="m_row">
  91. <view class="m_row_link">
  92. </view>
  93. <view class="m_row_title" v-text="'成员管理'">
  94. </view>
  95. <view style="position: relative;margin-left: 40rpx;">
  96. <div class="triangle_border_down">
  97. <span></span>
  98. </div>
  99. </view>
  100. </view>
  101. <view class="">
  102. <button type="default" class="m_btn_download" size="mini" @click="addMember">添加学生</button>
  103. </view>
  104. </view>
  105. <table style="width: 100%;border: 1px solid #DDDDDD;border-collapse: collapse">
  106. <thead class="m-table-hander">
  107. <tr>
  108. <th>用户名</th>
  109. <th>姓名</th>
  110. <th>专业</th>
  111. <th>班级</th>
  112. <th>职务</th>
  113. <th>电话</th>
  114. <th>删除</th>
  115. </tr>
  116. </thead>
  117. <tbody>
  118. <tr v-for="(item,index) in projectMembers" :key="index">
  119. <th>{{item.User.IlabAccount}}</th>
  120. <th>{{item.User.Name}}</th>
  121. <th>{{item.User.Profession}}</th>
  122. <th>{{item.User.Class}}</th>
  123. <th>
  124. <div>
  125. {{item.User.Type}}
  126. </div>
  127. </th>
  128. <th>{{item.User.PhoneNum}}</th>
  129. <th style="position: relative;"><button type="default" size="mini" class="m_delete" @click="deleteMember(item)" v-show="item.User.Id != projectData[0].CreateUserID">删除</button></th>
  130. </tr>
  131. </tbody>
  132. </table>
  133. </view>
  134. </view>
  135. <msg ref="msg" :title="title" @determine="determine" :btnArr="arr" v-show="show"></msg>
  136. <audit ref="audit" v-show="auditshow" @determine="determine"></audit>
  137. <!--修改对话框-->
  138. <view class="m_msg" v-show="editDialogshow">
  139. <table style="width: 100%;border: 1px solid #DDDDDD;border-collapse: collapse">
  140. <thead class="m-table-hander">
  141. <tr>
  142. <th>名称</th>
  143. <th>类型</th>
  144. <th>介绍</th>
  145. </tr>
  146. </thead>
  147. <tbody>
  148. <tr>
  149. <th>
  150. <input class="uni-input" placeholder-style="color:#F76260" placeholder="名称" v-model="editDialogData.name"/>
  151. </th>
  152. <th>
  153. <picker class="form-input" @change="bindPickerChange_proType" :value="index_proType" :range="proType">
  154. <view class=" df fdr aic jcsb">
  155. <view>{{proType[index_proType]}}</view>
  156. <view>
  157. <img src="../../../assets/user/pic_user_03.png" />
  158. </view>
  159. </view>
  160. </picker>
  161. </th>
  162. <th>
  163. <input class="uni-input" placeholder-style="color:#F76260" placeholder="介绍" v-model="editDialogData.Introduction"/>
  164. </th>
  165. </tr>
  166. </tbody>
  167. </table>
  168. <view class="layout">
  169. <button type="default" size="mini" @click="editDialogDetermine(index)" class="m_edit">修改</button>
  170. <button type="default" size="mini" @click="editDialogCancel(index)" class="m_delete">取消</button>
  171. </view>
  172. </view>
  173. <!--添加用户对话框-->
  174. <view class="m_msg" v-show="isShowAddMember">
  175. <table style="width: 100%;border: 1px solid #DDDDDD;border-collapse: collapse">
  176. <thead class="m-table-hander">
  177. <tr>
  178. <th>名称</th>
  179. <th>类型</th>
  180. </tr>
  181. </thead>
  182. <tbody>
  183. <tr>
  184. <th>
  185. <view class="addMember_input_box">
  186. <input class="addMember_input" type="string" v-model="addedMemberModel.IlabAccount" placeholder="学员id" />
  187. </view>
  188. </th>
  189. <th>
  190. <picker class="form-input" @change="bindPickerChange_proTypeadd" :value="index_addproType" :range="addproType">
  191. <view class=" df fdr aic jcsb">
  192. <view>{{addproType[index_addproType]}}</view>
  193. <view>
  194. <img src="../../../assets/user/pic_user_03.png" />
  195. </view>
  196. </view>
  197. </picker>
  198. </th>
  199. </tr>
  200. </tbody>
  201. </table>
  202. <view class="layout">
  203. <button type="default" size="mini" @click="addMemberData(index)" class="m_edit">添加</button>
  204. <button type="default" size="mini" @click="addMemberDataCancel(index)" class="m_delete">取消</button>
  205. </view>
  206. </view>
  207. <!--修改文件对话框-->
  208. <view class="pop_view" @touchmove.stop.prevent = "stopPenetrate" @click="shut_down_pop_view()" v-if='bShowEdit'>
  209. <view class="edit_form" @touchmove.stop.prevent = "stopPenetrate">
  210. <view class="edit_BG">
  211. <view class="edit_title">修改</view>
  212. <view class="edit_row">
  213. <text class="edit_text">名称</text>
  214. <view class="input_frame">
  215. <input class="edit_input" type="string" v-model="projectName" placeholder="" @input="onInputProjectName"/>
  216. </view>
  217. </view>
  218. <view class="edit_row">
  219. <text class="edit_text">类型</text>
  220. <view class="input_frame">
  221. <!-- <input class="edit_input" type="string" v-model="projectType" placeholder="" @input="onInputProjectType"/> -->
  222. <picker class="form-input" @change="onInputProjectType" :value="projectType" :range="proType">
  223. <view class=" df fdr aic jcsb">
  224. <view>{{proType[projectType]}}</view>
  225. <view>
  226. <img src="../../../assets/user/pic_user_03.png" />
  227. </view>
  228. </view>
  229. </picker>
  230. </view>
  231. </view>
  232. <view class="edit_row">
  233. <text class="edit_text">描述</text>
  234. <view class="input_frame">
  235. <input class="edit_input" type="string" v-model="projectDescribe" placeholder="" @input="onInputProjectDescribe"/>
  236. </view>
  237. </view>
  238. <view class='modify_btn'>
  239. <button type="default" size="mini" @click="confirm_modify()" class="modify_confirm">确认</button>
  240. <button type="default" size="mini" @click="cancel_modify()" class="modify_cancel">取消</button>
  241. </view>
  242. </view>
  243. </view>
  244. </view>
  245. <!--上传文件对话框-->
  246. <view class="pop_view" @touchmove.stop.prevent = "stopPenetrate" @click="shut_down_pop_view()" v-if='bShowUpLoadFile'>
  247. <view class="edit_form" @touchmove.stop.prevent = "stopPenetrate">
  248. <view class="edit_BG">
  249. <view class="edit_title">上传文件</view>
  250. <view class="edit_row">
  251. <text class="edit_text">名称</text>
  252. <view class="input_frame">
  253. <input class="edit_input" type="string" placeholder="文件名" @input="onSelectFileName"/>
  254. </view>
  255. </view>
  256. <view class="edit_row">
  257. <text class="edit_text">类型</text>
  258. <view class="input_frame">
  259. <picker class="form-input" @change="onSelectFileType" :value="fileType" :range="addFileType">
  260. <view class=" df fdr aic jcsb">
  261. <view>{{addFileType[fileType]}}</view>
  262. <view>
  263. <img src="../../../assets/user/pic_user_03.png" />
  264. </view>
  265. </view>
  266. </picker>
  267. </view>
  268. </view>
  269. <view class='modify_btn'>
  270. <button type="default" size="mini" @click="confirm_file_upload()" class="modify_confirm">确认</button>
  271. <button type="default" size="mini" @click="cancel_file_upload()" class="modify_cancel">取消</button>
  272. </view>
  273. </view>
  274. </view>
  275. </view>
  276. <!--添加学生-->
  277. <view class="pop_view" @touchmove.stop.prevent = "stopPenetrate" @click="shut_down_pop_view()" v-if='bShowAddStu'>
  278. <view class="edit_form" @touchmove.stop.prevent = "stopPenetrate">
  279. <view class="edit_BG">
  280. <view class="edit_title">添加学生</view>
  281. <view class="edit_row">
  282. <text class="edit_text">姓名</text>
  283. <view class="input_frame">
  284. <input class="edit_input" type="string" placeholder="姓名" @input="onInputStuName"/>
  285. </view>
  286. </view>
  287. <view class="edit_row">
  288. <text class="edit_text">类型</text>
  289. <view class="input_frame">
  290. <picker class="form-input" @change="onSelectStuType" :value="stuType" :range="addproType">
  291. <view class=" df fdr aic jcsb">
  292. <view>{{addproType[stuType]}}</view>
  293. <view>
  294. <img src="../../../assets/user/pic_user_03.png" />
  295. </view>
  296. </view>
  297. </picker>
  298. </view>
  299. </view>
  300. <view class='modify_btn'>
  301. <button type="default" size="mini" @click="confirm_add_stu()" class="modify_confirm">确认</button>
  302. <button type="default" size="mini" @click="cancel_add_stu()" class="modify_cancel">取消</button>
  303. </view>
  304. </view>
  305. </view>
  306. </view>
  307. <!--上传文件对话框-->
  308. <view class="m_msg" v-show="isShowAddFile">
  309. <table style="width: 100%;border: 1px solid #DDDDDD;border-collapse: collapse">
  310. <thead class="m-table-hander">
  311. <tr>
  312. <th>名字</th>
  313. <th>类型</th>
  314. </tr>
  315. </thead>
  316. <tbody>
  317. <tr>
  318. <th>
  319. <view class="addMember_input_box">
  320. <input class="addMember_input" type="string" v-model="fileDialogData.name" placeholder="文件名字" />
  321. </view>
  322. </th>
  323. <th>
  324. <picker class="form-input" @change="bindPickerChange_fileType" :value="index_FileType" :range="addFileType">
  325. <view class=" df fdr aic jcsb">
  326. <view>{{addFileType[index_FileType]}}</view>
  327. <view>
  328. <img src="../../../assets/user/pic_user_03.png" />
  329. </view>
  330. </view>
  331. </picker>
  332. </th>
  333. </tr>
  334. </tbody>
  335. </table>
  336. <view class="layout">
  337. <button type="default" size="mini" @click="addFileData(index)" class="m_edit">添加</button>
  338. <button type="default" size="mini" @click="addFileDataCancel(index)" class="m_delete">取消</button>
  339. </view>
  340. </view>
  341. </view>
  342. </template>
  343. <script>
  344. import msg from "./msg.vue"
  345. import audit from "./audit.vue"
  346. export default {
  347. name: "home_project",
  348. data() {
  349. return {
  350. index: 1,
  351. title: "",
  352. show: false,
  353. auditshow: false,
  354. callback: "",
  355. arr: [],
  356. data: [],
  357. projectData: [],
  358. ProjectItem: [],
  359. fileData: [],
  360. projectMembers: [],
  361. isShowAddMember: false,
  362. isShowAddFile: false,
  363. addedMemberModel: {
  364. "IlabAccount": '',
  365. "type": ''
  366. },
  367. currentSelect:{section:-1,buttonType:'',index:-1},
  368. Type:'asd',
  369. editDialogshow : false,
  370. editDialogData : {name : "", type :"", Introduction : ""},
  371. proType: ['科幻', '现实', '剧情', '历史', '爱情', '惊悚', '公路', '动画'],
  372. addproType: ['编剧', '摄影师' ,'录音师', '灯光师', '创建人'],
  373. addFileType: ['剧本' ,'拍摄脚本' ,'分镜头脚本' ,'气氛图', '项目简介', '项目报告' ,'场景图'],
  374. index_addproType : 0,
  375. index_proType : 0,
  376. index_FileType : 0,
  377. fileDialogData : {name : "", type :""},
  378. //修改项目信息
  379. bShowEdit:false,
  380. projectName:'',
  381. projectType:0,
  382. projectDescribe:'',
  383. //上传文件
  384. bShowUpLoadFile:false,
  385. fileName:'',
  386. fileType:0,
  387. filePath:null,
  388. //添加学生
  389. bShowAddStu:false,
  390. stuName:'',
  391. stuType:0,
  392. }
  393. },
  394. components: {
  395. msg,
  396. audit,
  397. },
  398. methods: {
  399. stopPenetrate(){
  400. return;
  401. },
  402. paging(obj) {
  403. this.index = obj;
  404. },
  405. viewIntro(item){
  406. uni.showModal({
  407. title: '简介',
  408. showCancel: false,
  409. content: item.Describe,
  410. success: function (res) {
  411. if (res.confirm) {
  412. console.log('确定');
  413. } else if (res.cancel) {
  414. console.log('取消');
  415. }
  416. }
  417. });
  418. },
  419. editProject(index) {
  420. //修改按钮赋值
  421. this.projectName=this.projectData[0].ProjectName;
  422. for(let i=0;i<this.proType.length;i++)
  423. {
  424. let item = this.proType[i];
  425. if(item == this.projectData[0].Type)
  426. {
  427. this.projectType = i;
  428. }
  429. }
  430. // this.projectType=this.projectData[0].Type;
  431. this.projectDescribe=this.projectData[0].Describe;
  432. this.bShowEdit = true;
  433. },
  434. //审核状态中文
  435. getShenheText(pass){
  436. let t = "成功"
  437. if (pass == false) {
  438. t = "失败"
  439. }
  440. return t
  441. },
  442. deleteProject(index) {
  443. this.title = "是否删除信息?";
  444. this.arr = ["删除", "取消"]
  445. this.show = true;
  446. this.currentSelect = {section:0,buttonType:'delete',index:index};
  447. },
  448. download(index,item) {
  449. this.title = "下载成功?";
  450. this.arr = ["确认"];
  451. this.show = true;
  452. this.currentSelect = {section:0,buttonType:'downloadIMG',index:index,item:item};
  453. },
  454. deleteFile(index,item) {
  455. this.title = "是否删除文件?";
  456. this.arr = ["删除", "取消"]
  457. this.show = true;
  458. this.currentSelect = {section:0,buttonType:'deleteFile',index:index,item:item};
  459. },
  460. audit(index,item) {
  461. this.title = "是否确认审核?";
  462. this.arr = ["通过", "未通过"]
  463. this.show = true;
  464. this.callback = "audit"
  465. // this.auditshow = true;
  466. this.currentSelect = {section:0,buttonType:'audit',index:index,item:item};
  467. },
  468. editSave() {
  469. if (this.editDialogData.name == "") {
  470. alert("请输入项目名称~");
  471. return false;
  472. }
  473. if (this.editDialogData.type == "") {
  474. alert("请输入项目类型~");
  475. return false;
  476. }
  477. if (this.editDialogData.Introduction == "") {
  478. alert("请输入项目介绍~");
  479. return false;
  480. }
  481. console.log("创建项目自己ID",mydata_userInfo.UserID);
  482. uni.request({
  483. url: this.$Api + "/project/changeprojectinfo",
  484. data: {
  485. "UserID":this.projectData[0].CreateUserID,
  486. "ProjectID" : this.projectData[0].Id,
  487. "ProjectName":this.editDialogData.name,
  488. "Describe":this.editDialogData.Introduction, // 项目描述
  489. "Type":this.editDialogData.type
  490. },
  491. method: "POST",
  492. dataType: "json",
  493. success: res => {
  494. console.log('是否成功',res)
  495. if (res.data.Code == 100) {
  496. this.getlist()
  497. this.editDialogshow = false
  498. return true;
  499. }
  500. }
  501. })
  502. },
  503. editDialogDetermine(){
  504. this.editSave()
  505. },
  506. editDialogCancel(){
  507. this.editDialogshow = false
  508. this.editDialogData = {name : "", type :"", Introduction : ""}
  509. },
  510. determine(obj) {
  511. this.show = false;
  512. this.auditshow = false;
  513. console.log("点了 对话框", obj);
  514. switch (this.currentSelect.section) {
  515. case 0: //項目管理
  516. switch (this.currentSelect.buttonType) {
  517. case 'delete':
  518. console.log("点了 删除", this.currentSelect);
  519. if (obj == 0) {
  520. console.log("点了 确定删除", this.currentSelect);
  521. this.deleteItemProject()
  522. }else if(obj == 1){
  523. console.log("点了 取消删除", this.currentSelect);
  524. }
  525. break;
  526. case 'edit':
  527. console.log("点了 修改", this.currentSelect);
  528. if (obj == 0) {
  529. console.log("点了 确定修改", this.currentSelect,this.projectData[0]);
  530. this.editDialogData = {name : this.projectData[0].ProjectName, type :this.projectData[0].Type, Introduction : this.projectData[0].Describe}
  531. this.editDialogshow = true
  532. console.log("修改数据", this.editDialogData);
  533. }else if(obj == 1){
  534. this.editDialogData = {name : "", type :"", Introduction : ""}
  535. console.log("点了 取消修改", this.currentSelect);
  536. }
  537. break;
  538. case 'downloadIMG':
  539. console.log("点了 下载", this.currentSelect);
  540. if (obj == 0) {
  541. console.log("点了 确定下载", this.currentSelect,this.projectData[0]);
  542. this.DownloadFile()
  543. }else if(obj == 1){
  544. // this.editDialogData = {name : "", type :"", Introduction : ""}
  545. console.log("点了 取消下载", this.currentSelect);
  546. }
  547. break;
  548. case 'deleteFile':
  549. console.log("点了 删除", this.currentSelect);
  550. if (obj == 0) {
  551. console.log("点了 确定删除", this.currentSelect,this.projectData[0]);
  552. this.delFile()
  553. }else if(obj == 1){
  554. // this.editDialogData = {name : "", type :"", Introduction : ""}
  555. console.log("点了 取消删除", this.currentSelect);
  556. }
  557. break;
  558. case 'audit':
  559. console.log("点了 审核", this.currentSelect);
  560. if (obj == 0) {
  561. console.log("点了 确定审核", this.currentSelect,this.projectData[0]);
  562. let data = {
  563. ProjectItemID: this.currentSelect.item,
  564. Pass: true
  565. }
  566. this.auditPost(data);
  567. }else if(obj == 1){
  568. // this.editDialogData = {name : "", type :"", Introduction : ""}
  569. console.log("点了 取消审核", this.currentSelect);
  570. let data = {
  571. ProjectItemID: this.currentSelect.item,
  572. Pass: false
  573. }
  574. this.auditPost(data);
  575. }
  576. break;
  577. default:
  578. break;
  579. }
  580. break;
  581. default:
  582. break;
  583. }
  584. this.currentSelect = {section:-1,buttonType:'',index:-1}
  585. // console.log(obj)
  586. },
  587. auditPost(obj) {
  588. console.log("审核信息", obj.ProjectItemID.ProjectID);
  589. let url = this.$Api + "/project/setfilepass"
  590. let data = {
  591. "ProjectItemID" : obj.ProjectItemID.Id,
  592. "Pass":obj.Pass,
  593. }
  594. console.log('审核 发送数据 '," 地址 ",url," 数据 ",data,"项目数据",this.projectData)
  595. uni.request({
  596. url: url,
  597. data: data,
  598. method: "POST",
  599. dataType: "json",
  600. success: res => {
  601. console.log('审核 返回',res)
  602. if (res.data.Code == 100) {
  603. this.getFileList();
  604. }
  605. }
  606. })
  607. },
  608. getlist() {
  609. uni.request({
  610. url: this.$Api + "/project/getprojectcontent",
  611. data: {
  612. "UserID": this.$UserId,
  613. "ProjectID": this.projectData[0].Id
  614. },
  615. method: "POST",
  616. dataType: "json",
  617. success: res => {
  618. if (res.data.Code == 100) {
  619. this.projectData[0] = null
  620. this.projectData[0] = res.data.Project;
  621. this.$forceUpdate()
  622. }
  623. console.log("获取了什么样子的信息", this.projectData[0]);
  624. }
  625. })
  626. },
  627. getFileList() {
  628. uni.request({
  629. url: this.$Api + "/project/getprojectcontent",
  630. data: {
  631. "UserID": this.$UserId,
  632. "ProjectID": this.projectData[0].Id
  633. },
  634. method: "POST",
  635. dataType: "json",
  636. success: res => {
  637. this.fileData = res.data.ProjectItem;
  638. console.log('this.fileData=',this.fileData)
  639. }
  640. })
  641. },
  642. viewProject(obj) {
  643. console.log('进来的什么信息',obj)
  644. this.projectData = [obj];
  645. this.getFileList();
  646. this.getMemberList();
  647. },
  648. getMemberList() {
  649. var temp = {
  650. "ProjectID": this.projectData[0].Id
  651. }
  652. uni.request({
  653. url: this.$Api + "/project/getmember",
  654. data: temp,
  655. method: "POST",
  656. dataType: "json",
  657. success: res => {
  658. // console.log("请求学生", res);
  659. if (res.data.Code == 100) {
  660. this.projectMembers = res.data.Users;
  661. // console.log();
  662. }
  663. }
  664. })
  665. },
  666. addMember() {
  667. // this.isShowAddMember = true;
  668. this.bShowAddStu = true;
  669. },
  670. addFileData(){
  671. uni.chooseImage({
  672. success: (chooseImageRes) => {
  673. const tempFilePaths = chooseImageRes.tempFilePaths;
  674. uni.uploadFile({
  675. url: this.$Api+'/project/uploadprojectfile', //仅为示例,非真实的接口地址
  676. filePath: tempFilePaths[0],
  677. name: 'file',
  678. formData: {
  679. "UserID": this.projectData[0].CreateUserID,
  680. "Name": this.fileDialogData.name,
  681. "Type": this.fileDialogData.type,
  682. "ProjectID": this.projectData[0].Id,
  683. },
  684. success: (uploadFileRes) => {
  685. console.log('upload ok=', uploadFileRes.data);
  686. this.isShowAddFile = false
  687. this.fileDialogData = {name : "", type :""}
  688. this.getFileList();
  689. // alert("创建成功");
  690. }
  691. });
  692. }
  693. });
  694. },
  695. addFileDataCancel(){
  696. this.isShowAddFile = false
  697. },
  698. addMemberDataCancel(){
  699. this.isShowAddMember = false;
  700. },
  701. onClick_addMember_ok() {
  702. console.log("添加学生", this.addedMemberModel);
  703. var temp = {
  704. "UserID": this.projectData[0].CreateUserID, //项目创建人ID
  705. "ProjectID": this.projectData[0].Id, //项目ID
  706. "AddUserID": mydata_userInfo.UserID, //添加人员ID 支持ilabID UserID
  707. "Type": "美术师" //编剧 摄影师 录音师 灯光师 创建人
  708. }
  709. uni.request({
  710. url: this.$Api + "/project/getmember",
  711. data: temp,
  712. method: "POST",
  713. dataType: "json",
  714. success: res => {
  715. // console.log("请求学生", res);
  716. if (res.data.Code == 100) {
  717. this.projectMembers = res.data.Users;
  718. console.log();
  719. }
  720. }
  721. })
  722. },
  723. onClick_addFile(){
  724. console.log("项目 点了添加文件")
  725. // this.isShowAddFile = true
  726. uni.chooseFile({
  727. success: (chooseImageRes) => {
  728. this.filePath = chooseImageRes.tempFilePaths;
  729. this.bShowUpLoadFile = true;
  730. }
  731. });
  732. },
  733. //删除条目
  734. deleteItemProject(){
  735. console.log('UserID=',this.$UserId)
  736. console.log('ProjectID=',this.projectData[0].Id)
  737. var temp = {
  738. "UserID":this.projectData[0].CreateUserID,
  739. "ProjectID" : this.projectData[0].Id,
  740. }
  741. console.log("要删除过去的数据为",temp)
  742. uni.request({
  743. url: this.$Api + "/backstage/deleteproject",
  744. data: temp,
  745. method: "POST",
  746. dataType: "json",
  747. success: res => {
  748. console.log("delete project ok", res);
  749. this.$emit('onBackToProjectList');
  750. this.getlist()
  751. this.$forceUpdate();//强制刷新页面
  752. }
  753. })
  754. },
  755. bindPickerChange_proType: function(e) {
  756. this.index_proType = e.target.value;
  757. this.editDialogData.type = this.proType[this.index_proType];
  758. // console.log(this.model)
  759. },
  760. bindPickerChange_proTypeadd: function(e) {
  761. this.index_addproType = e.target.value;
  762. this.addedMemberModel.type = this.addproType[this.index_addproType];
  763. // console.log(this.model)
  764. },
  765. bindPickerChange_fileType: function(e) {
  766. this.index_FileType = e.target.value;
  767. this.fileDialogData.type = this.addFileType[this.index_FileType];
  768. // console.log(this.model)
  769. },
  770. deleteMember(item){
  771. console.log('删掉成员 ',item)
  772. let url = this.$Api + "/project/deletemember"
  773. let data = {
  774. "userID" : this.projectData[0].CreateUserID,
  775. "DeleteUserID":item.User.Id,
  776. "ProjectID":this.projectData[0].Id,
  777. }
  778. console.log('删掉成员 发送数据 '," 地址 ",url," 数据 ",data)
  779. uni.request({
  780. url: url,
  781. data: data,
  782. method: "POST",
  783. dataType: "json",
  784. success: res => {
  785. console.log('删掉成员 返回',res)
  786. if (res.data.Code == 100) {
  787. // this.$refs.table.getList();
  788. this.getMemberList();
  789. this.$forceUpdate();//强制刷新页面
  790. }
  791. // this.projectData.splice(index,index);
  792. }
  793. })
  794. },
  795. delFile(){
  796. // this.currentSelect
  797. console.log('删除文件', this.currentSelect)
  798. // SetFilePass
  799. let url = this.$Api + "/project/deleteprojectcontent"
  800. // "UserID":"xxxx", //上传人或者项目创建人
  801. // "ProjectItemID" : "123"
  802. let data = {
  803. "UserID" : this.projectData[0].CreateUserID,
  804. "ProjectItemID":this.currentSelect.item.Id
  805. }
  806. console.log('删除文件 发送数据 '," 地址 ",url," 数据 ",data,"项目数据",this.projectData)
  807. uni.request({
  808. url: url,
  809. data: data,
  810. method: "POST",
  811. dataType: "json",
  812. success: res => {
  813. console.log('删除文件 返回',res)
  814. if (res.data.Code == 100) {
  815. this.getFileList();
  816. }
  817. }
  818. })
  819. },
  820. DownloadFile() {
  821. window.location.href = this.currentSelect.item.URL;
  822. },
  823. shut_down_pop_view(){
  824. // this.bShowEdit = false;
  825. },
  826. confirm_modify(){
  827. this.bShowEdit = false;
  828. this.projectData[0].ProjectName = this.projectName;
  829. this.projectData[0].Type = this.proType[this.projectType];
  830. this.projectData[0].Describe = this.projectDescribe;
  831. uni.request({
  832. url: this.$Api + "/project/changeprojectinfo",
  833. data: {
  834. "UserID":this.projectData[0].CreateUserID,
  835. "ProjectID" : this.projectData[0].Id,
  836. "ProjectName":this.projectData[0].ProjectName,
  837. "Describe":this.projectData[0].Describe, // 项目描述
  838. "Type":this.projectData[0].Type
  839. },
  840. method: "POST",
  841. dataType: "json",
  842. success: res => {
  843. console.log('是否成功',res)
  844. if (res.data.Code == 100) {
  845. this.getlist()
  846. }
  847. }
  848. })
  849. },
  850. cancel_modify(){
  851. this.bShowEdit = false;
  852. this.projectName=this.projectData[0].ProjectName;
  853. this.projectType=this.projectData[0].Type;
  854. this.projectDescribe=this.projectData[0].Describe;
  855. },
  856. onInputProjectName(e){
  857. this.projectName=e.detail.value;
  858. },
  859. onInputProjectType(e){
  860. this.projectType=e.detail.value;
  861. },
  862. onInputProjectDescribe(e){
  863. this.projectDescribe=e.detail.value;
  864. },
  865. //添加文件
  866. onSelectFileName(e){
  867. this.fileName=e.detail.value;
  868. },
  869. onSelectFileType(e){
  870. this.fileType=e.detail.value;
  871. },
  872. confirm_file_upload(){
  873. uni.uploadFile({
  874. url: this.$Api+'/project/uploadprojectfile', //仅为示例,非真实的接口地址
  875. filePath: this.filePath[0],
  876. name: 'file',
  877. formData: {
  878. "UserID": this.projectData[0].CreateUserID,
  879. "Name": this.fileName,
  880. "Type": this.fileType,
  881. "ProjectID": this.projectData[0].Id,
  882. },
  883. success: (uploadFileRes) => {
  884. console.log('upload ok=', uploadFileRes.data);
  885. this.bShowUpLoadFile = false;
  886. this.getFileList();
  887. // setTimeout(function(){
  888. // alert("创建成功");
  889. // },500)
  890. }
  891. });
  892. },
  893. cancel_file_upload(){
  894. this.bShowUpLoadFile = false;
  895. this.fileName = '';
  896. this.fileType = 0;
  897. this.filePath = null;
  898. },
  899. // 添加学生
  900. onInputStuName(e){
  901. this.stuName=e.detail.value;
  902. },
  903. onSelectStuType(e){
  904. // addproType[stuType]
  905. this.stuType=e.detail.value;
  906. },
  907. confirm_add_stu(){
  908. console.log("添加学生", this.stuName,this.projectData[0]);
  909. if (this.stuName == "") {
  910. alert("学员id不能为空")
  911. return
  912. }
  913. let url = this.$Api + "/project/addmember"
  914. let data = {
  915. "UserID" : this.projectData[0].CreateUserID,
  916. "ProjectID":this.projectData[0].Id,
  917. "AddUserID":this.stuName,
  918. "Type":this.addproType[this.stuType],
  919. }
  920. // console.log('添加成员 发送数据 '," 地址 ",url," 数据 ",data,"项目数据",this.projectData)
  921. uni.request({
  922. url: url,
  923. data: data,
  924. method: "POST",
  925. dataType: "json",
  926. success: res => {
  927. console.log('添加成员 返回',res)
  928. if (res.data.Code == 100) {
  929. // this.$refs.table.getList();
  930. this.getMemberList();
  931. this.$forceUpdate();
  932. this.bShowAddStu = false;
  933. // setTimeout(function(){
  934. // alert("添加成功");
  935. // },500)
  936. return;
  937. }
  938. this.bShowAddStu = false;
  939. // setTimeout(function(){
  940. // alert("添加有误,请检查该学生是否存在");
  941. // },500)
  942. }
  943. })
  944. },
  945. cancel_add_stu(){
  946. this.bShowAddStu = false;
  947. this.stuName = '';
  948. this.stuType = 0;
  949. }
  950. },
  951. }
  952. </script>
  953. <style lang="scss">
  954. .m_right {
  955. width: 100%;
  956. margin-top: 5rpx;
  957. // padding: 0 150rpx;
  958. background-color: #fff;
  959. box-shadow: 3px 0px 6px 0px rgba(0, 0, 0, 0.1);
  960. .m_right_container {
  961. padding: 150rpx;
  962. }
  963. .s_logo {
  964. width: 100%;
  965. height: 800rpx;
  966. }
  967. .m_right_hander {
  968. text-align: right;
  969. height: 250rpx;
  970. position: relative;
  971. .m_btn_red {
  972. position: absolute;
  973. height: 80rpx;
  974. line-height: 80rpx;
  975. padding: 0 40rpx;
  976. right: 0;
  977. top: 50%;
  978. transform: translateY(-50%);
  979. background: #EA252C;
  980. color: #fff;
  981. }
  982. }
  983. }
  984. .m_btn_download {
  985. height: 80rpx;
  986. line-height: 80rpx;
  987. padding: 0 70rpx;
  988. background: #EA252C;
  989. color: #fff;
  990. font-family: MicrosoftYaHei;
  991. }
  992. tbody tr {
  993. border-top: 2rpx solid #DDDDDD !important;
  994. }
  995. tbody tr th:first-child {
  996. position: relative;
  997. }
  998. tbody tr th {
  999. font-weight: 400 !important;
  1000. height: 140rpx;
  1001. line-height: 140rpx;
  1002. }
  1003. tbody tr:hover {
  1004. // color: #fff;
  1005. background: #FDEBEC;
  1006. // opacity: 0.08;
  1007. }
  1008. .form-input {
  1009. width: 100%;
  1010. border: 1px solid #ece8e8;
  1011. line-height: 50rpx;
  1012. font-size: 30rpx;
  1013. border-radius: 6rpx;
  1014. padding: 10rpx 40rpx;
  1015. }
  1016. .m-table-hander {
  1017. background-color: #FFF8F7;
  1018. height: 140rpx;
  1019. line-height: 140rpx;
  1020. font-family: MicrosoftYaHei-Bold, MicrosoftYaHei;
  1021. font-weight: bold;
  1022. }
  1023. .m_edit {
  1024. position: absolute;
  1025. top: 50%;
  1026. left: 50%;
  1027. transform: translate(-50%, -50%);
  1028. background: rgb(67, 127, 250);
  1029. color: rgb(255, 255, 255);
  1030. min-width: 130rpx;
  1031. }
  1032. .m_delete {
  1033. position: absolute;
  1034. top: 50%;
  1035. left: 50%;
  1036. min-width: 130rpx;
  1037. transform: translate(-50%, -50%);
  1038. background: rgb(234, 37, 44);
  1039. color: rgb(255, 255, 255);
  1040. }
  1041. .m_edit_1 {
  1042. position: absolute;
  1043. top: 50%;
  1044. left: 50%;
  1045. transform: translate(-50%, -50%);
  1046. background: rgb(67, 127, 250);
  1047. color: rgb(255, 255, 255);
  1048. min-width: 110rpx;
  1049. }
  1050. .m_delete_1 {
  1051. position: absolute;
  1052. top: 50%;
  1053. left: 50%;
  1054. min-width: 110rpx;
  1055. transform: translate(-50%, -50%);
  1056. background: rgb(234, 37, 44);
  1057. color: rgb(255, 255, 255);
  1058. }
  1059. .m_right_footer {
  1060. margin-top: 80rpx;
  1061. }
  1062. .m_logoimg {
  1063. width: 80rpx;
  1064. height: 80rpx;
  1065. position: absolute;
  1066. top: 50%;
  1067. left: 50%;
  1068. transform: translate(-50%, -50%);
  1069. }
  1070. .m_paging {
  1071. text-align: right;
  1072. .m_paging_item {
  1073. padding: 10rpx 18rpx;
  1074. border: 1rpx solid #DDDDDD;
  1075. border-radius: 8rpx;
  1076. margin-right: 10rpx;
  1077. }
  1078. .p_act {
  1079. background: #EA252C;
  1080. color: #fff;
  1081. border: inherit;
  1082. }
  1083. }
  1084. .m_paging_item:hover {
  1085. background: #EA252C;
  1086. color: #fff;
  1087. border: inherit;
  1088. }
  1089. .m_act1 {
  1090. color: #FF0019;
  1091. }
  1092. .m_row {
  1093. display: flex;
  1094. height: 60rpx;
  1095. line-height: 60rpx;
  1096. font-size: 30rpx;
  1097. color: #ea252c;
  1098. padding: 0 0 80rpx 0;
  1099. }
  1100. .m_audit {
  1101. position: absolute;
  1102. top: 50%;
  1103. left: 50%;
  1104. min-width: 65px;
  1105. -webkit-transform: translate(-50%, -50%);
  1106. transform: translate(-50%, -50%);
  1107. color: white;
  1108. background-color: #FF791B;
  1109. }
  1110. .m_audit_1 {
  1111. position: absolute;
  1112. top: 50%;
  1113. left: 50%;
  1114. min-width: 55px;
  1115. -webkit-transform: translate(-50%, -50%);
  1116. transform: translate(-50%, -50%);
  1117. color: white;
  1118. background-color: #FF791B;
  1119. }
  1120. .m_row_link {
  1121. width: 10rpx;
  1122. height: 60rpx;
  1123. background-color: #ea252c;
  1124. margin-right: 40rpx;
  1125. }
  1126. .m_row_title {
  1127. color: #ea252c;
  1128. font-weight: bold;
  1129. font-size: 40rpx;
  1130. }
  1131. /*向下*/
  1132. .triangle_border_down {
  1133. width: 0;
  1134. height: 0;
  1135. border-width: 25rpx 25rpx 0;
  1136. border-style: solid;
  1137. border-color: #ea252c transparent transparent;
  1138. /*灰 透明 透明 */
  1139. margin: 20rpx auto;
  1140. position: relative;
  1141. }
  1142. .m_row_class {
  1143. margin-bottom: 60rpx;
  1144. }
  1145. .addMember_box{
  1146. margin-bottom: 50rpx;
  1147. height: 80rpx;
  1148. }
  1149. .addMember_input_box{
  1150. width: 500rpx;
  1151. height: 80rpx;
  1152. }
  1153. .addMember_input {
  1154. width: 100%;
  1155. height: 100%;
  1156. border: 1px solid #ece8e8;
  1157. line-height: 50rpx;
  1158. font-size: 30rpx;
  1159. border-radius: 6rpx;
  1160. padding: 10rpx 40rpx;
  1161. }
  1162. .addMember_btn {
  1163. width: 130rpx;
  1164. height: 80rpx;
  1165. transform: translate(-50%, -50%);
  1166. background: rgb(234, 37, 44);
  1167. color: rgb(255, 255, 255);
  1168. }
  1169. .blank{
  1170. border:1px solid black;
  1171. }
  1172. .table{
  1173. border:1px solid black;
  1174. }
  1175. .input-item {
  1176. border:1px solid black;
  1177. }
  1178. .pop_view{
  1179. position: fixed;
  1180. display: flex;
  1181. justify-content: center;
  1182. align-items:center;/*垂直居中*/
  1183. width: 100%;
  1184. height: 100%;
  1185. top: 0rpx;
  1186. left: 0rpx;
  1187. // z-index: 100;
  1188. background-color:rgba(0,0,0,0.5)
  1189. }
  1190. .edit_form{
  1191. width: 25%;
  1192. height: 50%;
  1193. background-color:rgba(255,255,255,1);
  1194. display: flex;
  1195. justify-content: center;
  1196. // justify-content: space-between;
  1197. align-items:center;
  1198. .edit_BG{
  1199. width: 90%;
  1200. height: 90%;
  1201. display: flex;
  1202. justify-content: space-between;
  1203. align-items:center;
  1204. flex-direction:column;
  1205. // border:1rpx solid #000000;
  1206. .edit_row{
  1207. width: 90%;
  1208. height: 50%;
  1209. // border:1rpx solid #000000;
  1210. display: flex;
  1211. // justify-content: space-between;
  1212. align-items:center;
  1213. flex-direction:row;
  1214. }
  1215. }
  1216. }
  1217. .edit_title
  1218. {
  1219. width: 80%;
  1220. height: 100%;
  1221. font-size: 70rpx;
  1222. color: #000000;
  1223. // border:1rpx solid #000000;
  1224. display: flex;
  1225. justify-content: center;
  1226. align-items:center;
  1227. margin-bottom:10%;
  1228. }
  1229. .edit_text{
  1230. width: 50%;
  1231. height: 50%;
  1232. font-size: 30rpx;
  1233. color: #000000;
  1234. // border:1rpx solid #000000;
  1235. }
  1236. .input_frame{
  1237. width: 100%;
  1238. height: 80%;
  1239. border:1rpx solid #000000;
  1240. border-radius: 25rpx;
  1241. display: flex;
  1242. justify-content: center;
  1243. align-items:center;
  1244. }
  1245. .edit_input{
  1246. font-size: 30rpx;
  1247. color: #000000;
  1248. width: 80%;
  1249. height: 100%;
  1250. // border:1rpx solid #000000;
  1251. }
  1252. .modify_btn
  1253. {
  1254. width: 90%;
  1255. height: 50%;
  1256. // border:1rpx solid #000000;
  1257. display: flex;
  1258. align-items:center;
  1259. flex-direction:row;
  1260. margin-top:10%;
  1261. }
  1262. .modify_confirm
  1263. {
  1264. background: rgb(67, 127, 250);
  1265. color: rgb(255, 255, 255);
  1266. min-width: 30%;
  1267. }
  1268. .modify_cancel
  1269. {
  1270. min-width: 30%;
  1271. background: rgb(234, 37, 44);
  1272. color: rgb(255, 255, 255);
  1273. }
  1274. .m_msg {
  1275. width: 1500rpx;
  1276. height: 900rpx;
  1277. padding: 0rpx 0 40rpx 0;
  1278. position: fixed;
  1279. top: 50%;
  1280. left: 50%;
  1281. border-radius: 10rpx;
  1282. transform: translate(-50%, -50%);
  1283. z-index: 100;
  1284. background-color: #fff;
  1285. opacity: 1;
  1286. .layout{
  1287. position: absolute;
  1288. left: 50%;
  1289. bottom: 2%;
  1290. }
  1291. .m_edit {
  1292. position: relative;
  1293. left: 20%;
  1294. transform: translate(-50%, -50%);
  1295. background: rgb(67, 127, 250);
  1296. color: rgb(255, 255, 255);
  1297. min-width: 130rpx;
  1298. }
  1299. .m_delete {
  1300. position: relative;
  1301. left: 50%;
  1302. min-width: 130rpx;
  1303. transform: translate(-50%, -50%);
  1304. background: rgb(234, 37, 44);
  1305. color: rgb(255, 255, 255);
  1306. }
  1307. }
  1308. </style>