project.vue 37 KB

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