project.vue 37 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358
  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 selectable="true"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 selectable="true"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 selectable="true"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 selectable="true"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 selectable="true"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 selectable="true"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 selectable="true"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('this.$Api=',this.$Api)
  736. // console.log('UserID=',this.$UserId)
  737. // console.log('ProjectID=',this.projectData[0].Id)
  738. var temp = {
  739. "UserID":this.projectData[0].CreateUserID,
  740. "ProjectID" : this.projectData[0].Id,
  741. }
  742. console.log("要删除过去的项目为",temp)
  743. uni.request({
  744. url: this.$Api + "/backstage/deleteproject",
  745. data: temp,
  746. method: "POST",
  747. dataType: "json",
  748. success: res => {
  749. console.log("delete project ok", res);
  750. this.$emit('onBackToProjectList');
  751. this.getlist()
  752. this.$forceUpdate();//强制刷新页面
  753. }
  754. })
  755. },
  756. bindPickerChange_proType: function(e) {
  757. this.index_proType = e.target.value;
  758. this.editDialogData.type = this.proType[this.index_proType];
  759. // console.log(this.model)
  760. },
  761. bindPickerChange_proTypeadd: function(e) {
  762. this.index_addproType = e.target.value;
  763. this.addedMemberModel.type = this.addproType[this.index_addproType];
  764. // console.log(this.model)
  765. },
  766. bindPickerChange_fileType: function(e) {
  767. this.index_FileType = e.target.value;
  768. this.fileDialogData.type = this.addFileType[this.index_FileType];
  769. // console.log(this.model)
  770. },
  771. deleteMember(item){
  772. console.log('删掉成员 ',item)
  773. let url = this.$Api + "/project/deletemember"
  774. let data = {
  775. "userID" : this.projectData[0].CreateUserID,
  776. "DeleteUserID":item.User.Id,
  777. "ProjectID":this.projectData[0].Id,
  778. }
  779. console.log('删掉成员 发送数据 '," 地址 ",url," 数据 ",data)
  780. uni.request({
  781. url: url,
  782. data: data,
  783. method: "POST",
  784. dataType: "json",
  785. success: res => {
  786. console.log('删掉成员 返回',res)
  787. if (res.data.Code == 100) {
  788. // this.$refs.table.getList();
  789. this.getMemberList();
  790. this.$forceUpdate();//强制刷新页面
  791. }
  792. // this.projectData.splice(index,index);
  793. }
  794. })
  795. },
  796. delFile(){
  797. // this.currentSelect
  798. console.log('删除文件', this.currentSelect)
  799. // SetFilePass
  800. let url = this.$Api + "/project/deleteprojectcontent"
  801. // "UserID":"xxxx", //上传人或者项目创建人
  802. // "ProjectItemID" : "123"
  803. let data = {
  804. "UserID" : this.projectData[0].CreateUserID,
  805. "ProjectItemID":this.currentSelect.item.Id
  806. }
  807. console.log('删除文件 发送数据 '," 地址 ",url," 数据 ",data,"项目数据",this.projectData)
  808. uni.request({
  809. url: url,
  810. data: data,
  811. method: "POST",
  812. dataType: "json",
  813. success: res => {
  814. console.log('删除文件 返回',res)
  815. if (res.data.Code == 100) {
  816. this.getFileList();
  817. }
  818. }
  819. })
  820. },
  821. DownloadFile() {
  822. window.location.href = this.currentSelect.item.URL;
  823. },
  824. shut_down_pop_view(){
  825. // this.bShowEdit = false;
  826. },
  827. confirm_modify(){
  828. this.bShowEdit = false;
  829. this.projectData[0].ProjectName = this.projectName;
  830. this.projectData[0].Type = this.proType[this.projectType];
  831. this.projectData[0].Describe = this.projectDescribe;
  832. uni.request({
  833. url: this.$Api + "/project/changeprojectinfo",
  834. data: {
  835. "UserID":this.projectData[0].CreateUserID,
  836. "ProjectID" : this.projectData[0].Id,
  837. "ProjectName":this.projectData[0].ProjectName,
  838. "Describe":this.projectData[0].Describe, // 项目描述
  839. "Type":this.projectData[0].Type
  840. },
  841. method: "POST",
  842. dataType: "json",
  843. success: res => {
  844. console.log('是否成功',res)
  845. if (res.data.Code == 100) {
  846. this.getlist()
  847. }
  848. }
  849. })
  850. },
  851. cancel_modify(){
  852. this.bShowEdit = false;
  853. this.projectName=this.projectData[0].ProjectName;
  854. this.projectType=this.projectData[0].Type;
  855. this.projectDescribe=this.projectData[0].Describe;
  856. },
  857. onInputProjectName(e){
  858. this.projectName=e.detail.value;
  859. },
  860. onInputProjectType(e){
  861. this.projectType=e.detail.value;
  862. },
  863. onInputProjectDescribe(e){
  864. this.projectDescribe=e.detail.value;
  865. },
  866. //添加文件
  867. onSelectFileName(e){
  868. this.fileName=e.detail.value;
  869. },
  870. onSelectFileType(e){
  871. this.fileType=e.detail.value;
  872. },
  873. confirm_file_upload(){
  874. uni.uploadFile({
  875. url: this.$Api+'/project/uploadprojectfile', //仅为示例,非真实的接口地址
  876. filePath: this.filePath[0],
  877. name: 'file',
  878. formData: {
  879. "UserID": this.projectData[0].CreateUserID,
  880. "Name": this.fileName,
  881. "Type": this.fileType,
  882. "ProjectID": this.projectData[0].Id,
  883. },
  884. success: (uploadFileRes) => {
  885. console.log('upload ok=', uploadFileRes.data);
  886. this.bShowUpLoadFile = false;
  887. this.getFileList();
  888. // setTimeout(function(){
  889. // alert("创建成功");
  890. // },500)
  891. }
  892. });
  893. },
  894. cancel_file_upload(){
  895. this.bShowUpLoadFile = false;
  896. this.fileName = '';
  897. this.fileType = 0;
  898. this.filePath = null;
  899. },
  900. // 添加学生
  901. onInputStuName(e){
  902. this.stuName=e.detail.value;
  903. },
  904. onSelectStuType(e){
  905. // addproType[stuType]
  906. this.stuType=e.detail.value;
  907. },
  908. confirm_add_stu(){
  909. console.log("添加学生", this.stuName,this.projectData[0]);
  910. if (this.stuName == "") {
  911. alert("学员id不能为空")
  912. return
  913. }
  914. let url = this.$Api + "/project/addmember"
  915. let data = {
  916. "UserID" : this.projectData[0].CreateUserID,
  917. "ProjectID":this.projectData[0].Id,
  918. "AddUserID":this.stuName,
  919. "Type":this.addproType[this.stuType],
  920. }
  921. // console.log('添加成员 发送数据 '," 地址 ",url," 数据 ",data,"项目数据",this.projectData)
  922. uni.request({
  923. url: url,
  924. data: data,
  925. method: "POST",
  926. dataType: "json",
  927. success: res => {
  928. console.log('添加成员 返回',res)
  929. if (res.data.Code == 100) {
  930. // this.$refs.table.getList();
  931. this.getMemberList();
  932. this.$forceUpdate();
  933. this.bShowAddStu = false;
  934. // setTimeout(function(){
  935. // alert("添加成功");
  936. // },500)
  937. return;
  938. }
  939. this.bShowAddStu = false;
  940. // setTimeout(function(){
  941. // alert("添加有误,请检查该学生是否存在");
  942. // },500)
  943. }
  944. })
  945. },
  946. cancel_add_stu(){
  947. this.bShowAddStu = false;
  948. this.stuName = '';
  949. this.stuType = 0;
  950. }
  951. },
  952. }
  953. </script>
  954. <style lang="scss">
  955. .m_right {
  956. width: 100%;
  957. margin-top: 5rpx;
  958. // padding: 0 150rpx;
  959. background-color: #fff;
  960. box-shadow: 3px 0px 6px 0px rgba(0, 0, 0, 0.1);
  961. .m_right_container {
  962. padding: 150rpx;
  963. }
  964. .s_logo {
  965. width: 100%;
  966. height: 800rpx;
  967. }
  968. .m_right_hander {
  969. text-align: right;
  970. height: 250rpx;
  971. position: relative;
  972. .m_btn_red {
  973. position: absolute;
  974. height: 80rpx;
  975. line-height: 80rpx;
  976. padding: 0 40rpx;
  977. right: 0;
  978. top: 50%;
  979. transform: translateY(-50%);
  980. background: #EA252C;
  981. color: #fff;
  982. }
  983. }
  984. }
  985. .m_btn_download {
  986. height: 80rpx;
  987. line-height: 80rpx;
  988. padding: 0 70rpx;
  989. background: #EA252C;
  990. color: #fff;
  991. font-family: MicrosoftYaHei;
  992. }
  993. tbody tr {
  994. border-top: 2rpx solid #DDDDDD !important;
  995. }
  996. tbody tr th:first-child {
  997. position: relative;
  998. }
  999. tbody tr th {
  1000. font-weight: 400 !important;
  1001. height: 140rpx;
  1002. line-height: 140rpx;
  1003. }
  1004. tbody tr:hover {
  1005. // color: #fff;
  1006. background: #FDEBEC;
  1007. // opacity: 0.08;
  1008. }
  1009. .form-input {
  1010. width: 100%;
  1011. border: 1px solid #ece8e8;
  1012. line-height: 50rpx;
  1013. font-size: 30rpx;
  1014. border-radius: 6rpx;
  1015. padding: 10rpx 40rpx;
  1016. }
  1017. .m-table-hander {
  1018. background-color: #FFF8F7;
  1019. height: 140rpx;
  1020. line-height: 140rpx;
  1021. font-family: MicrosoftYaHei-Bold, MicrosoftYaHei;
  1022. font-weight: bold;
  1023. }
  1024. .m_edit {
  1025. position: absolute;
  1026. top: 50%;
  1027. left: 50%;
  1028. transform: translate(-50%, -50%);
  1029. background: rgb(67, 127, 250);
  1030. color: rgb(255, 255, 255);
  1031. min-width: 130rpx;
  1032. }
  1033. .m_delete {
  1034. position: absolute;
  1035. top: 50%;
  1036. left: 50%;
  1037. min-width: 130rpx;
  1038. transform: translate(-50%, -50%);
  1039. background: rgb(234, 37, 44);
  1040. color: rgb(255, 255, 255);
  1041. }
  1042. .m_edit_1 {
  1043. position: absolute;
  1044. top: 50%;
  1045. left: 50%;
  1046. transform: translate(-50%, -50%);
  1047. background: rgb(67, 127, 250);
  1048. color: rgb(255, 255, 255);
  1049. min-width: 110rpx;
  1050. }
  1051. .m_delete_1 {
  1052. position: absolute;
  1053. top: 50%;
  1054. left: 50%;
  1055. min-width: 110rpx;
  1056. transform: translate(-50%, -50%);
  1057. background: rgb(234, 37, 44);
  1058. color: rgb(255, 255, 255);
  1059. }
  1060. .m_right_footer {
  1061. margin-top: 80rpx;
  1062. }
  1063. .m_logoimg {
  1064. width: 80rpx;
  1065. height: 80rpx;
  1066. position: absolute;
  1067. top: 50%;
  1068. left: 50%;
  1069. transform: translate(-50%, -50%);
  1070. }
  1071. .m_paging {
  1072. text-align: right;
  1073. .m_paging_item {
  1074. padding: 10rpx 18rpx;
  1075. border: 1rpx solid #DDDDDD;
  1076. border-radius: 8rpx;
  1077. margin-right: 10rpx;
  1078. }
  1079. .p_act {
  1080. background: #EA252C;
  1081. color: #fff;
  1082. border: inherit;
  1083. }
  1084. }
  1085. .m_paging_item:hover {
  1086. background: #EA252C;
  1087. color: #fff;
  1088. border: inherit;
  1089. }
  1090. .m_act1 {
  1091. color: #FF0019;
  1092. }
  1093. .m_row {
  1094. display: flex;
  1095. height: 60rpx;
  1096. line-height: 60rpx;
  1097. font-size: 30rpx;
  1098. color: #ea252c;
  1099. padding: 0 0 80rpx 0;
  1100. }
  1101. .m_audit {
  1102. position: absolute;
  1103. top: 50%;
  1104. left: 50%;
  1105. min-width: 65px;
  1106. -webkit-transform: translate(-50%, -50%);
  1107. transform: translate(-50%, -50%);
  1108. color: white;
  1109. background-color: #FF791B;
  1110. }
  1111. .m_audit_1 {
  1112. position: absolute;
  1113. top: 50%;
  1114. left: 50%;
  1115. min-width: 55px;
  1116. -webkit-transform: translate(-50%, -50%);
  1117. transform: translate(-50%, -50%);
  1118. color: white;
  1119. background-color: #FF791B;
  1120. }
  1121. .m_row_link {
  1122. width: 10rpx;
  1123. height: 60rpx;
  1124. background-color: #ea252c;
  1125. margin-right: 40rpx;
  1126. }
  1127. .m_row_title {
  1128. color: #ea252c;
  1129. font-weight: bold;
  1130. font-size: 40rpx;
  1131. }
  1132. /*向下*/
  1133. .triangle_border_down {
  1134. width: 0;
  1135. height: 0;
  1136. border-width: 25rpx 25rpx 0;
  1137. border-style: solid;
  1138. border-color: #ea252c transparent transparent;
  1139. /*灰 透明 透明 */
  1140. margin: 20rpx auto;
  1141. position: relative;
  1142. }
  1143. .m_row_class {
  1144. margin-bottom: 60rpx;
  1145. }
  1146. .addMember_box{
  1147. margin-bottom: 50rpx;
  1148. height: 80rpx;
  1149. }
  1150. .addMember_input_box{
  1151. width: 500rpx;
  1152. height: 80rpx;
  1153. }
  1154. .addMember_input {
  1155. width: 100%;
  1156. height: 100%;
  1157. border: 1px solid #ece8e8;
  1158. line-height: 50rpx;
  1159. font-size: 30rpx;
  1160. border-radius: 6rpx;
  1161. padding: 10rpx 40rpx;
  1162. }
  1163. .addMember_btn {
  1164. width: 130rpx;
  1165. height: 80rpx;
  1166. transform: translate(-50%, -50%);
  1167. background: rgb(234, 37, 44);
  1168. color: rgb(255, 255, 255);
  1169. }
  1170. .blank{
  1171. border:1px solid black;
  1172. }
  1173. .table{
  1174. border:1px solid black;
  1175. }
  1176. .input-item {
  1177. border:1px solid black;
  1178. }
  1179. .pop_view{
  1180. position: fixed;
  1181. display: flex;
  1182. justify-content: center;
  1183. align-items:center;/*垂直居中*/
  1184. width: 100%;
  1185. height: 100%;
  1186. top: 0rpx;
  1187. left: 0rpx;
  1188. // z-index: 100;
  1189. background-color:rgba(0,0,0,0.5)
  1190. }
  1191. .edit_form{
  1192. width: 25%;
  1193. height: 50%;
  1194. background-color:rgba(255,255,255,1);
  1195. display: flex;
  1196. justify-content: center;
  1197. // justify-content: space-between;
  1198. align-items:center;
  1199. .edit_BG{
  1200. width: 90%;
  1201. height: 90%;
  1202. display: flex;
  1203. justify-content: space-between;
  1204. align-items:center;
  1205. flex-direction:column;
  1206. // border:1rpx solid #000000;
  1207. .edit_row{
  1208. width: 90%;
  1209. height: 50%;
  1210. // border:1rpx solid #000000;
  1211. display: flex;
  1212. // justify-content: space-between;
  1213. align-items:center;
  1214. flex-direction:row;
  1215. }
  1216. }
  1217. }
  1218. .edit_title
  1219. {
  1220. width: 80%;
  1221. height: 100%;
  1222. font-size: 70rpx;
  1223. color: #000000;
  1224. // border:1rpx solid #000000;
  1225. display: flex;
  1226. justify-content: center;
  1227. align-items:center;
  1228. margin-bottom:10%;
  1229. }
  1230. .edit_text{
  1231. width: 50%;
  1232. height: 50%;
  1233. font-size: 30rpx;
  1234. color: #000000;
  1235. // border:1rpx solid #000000;
  1236. }
  1237. .input_frame{
  1238. width: 100%;
  1239. height: 80%;
  1240. border:1rpx solid #000000;
  1241. border-radius: 25rpx;
  1242. display: flex;
  1243. justify-content: center;
  1244. align-items:center;
  1245. }
  1246. .edit_input{
  1247. font-size: 30rpx;
  1248. color: #000000;
  1249. width: 80%;
  1250. height: 100%;
  1251. // border:1rpx solid #000000;
  1252. }
  1253. .modify_btn
  1254. {
  1255. width: 90%;
  1256. height: 50%;
  1257. // border:1rpx solid #000000;
  1258. display: flex;
  1259. align-items:center;
  1260. flex-direction:row;
  1261. margin-top:10%;
  1262. }
  1263. .modify_confirm
  1264. {
  1265. background: rgb(67, 127, 250);
  1266. color: rgb(255, 255, 255);
  1267. min-width: 30%;
  1268. }
  1269. .modify_cancel
  1270. {
  1271. min-width: 30%;
  1272. background: rgb(234, 37, 44);
  1273. color: rgb(255, 255, 255);
  1274. }
  1275. .m_msg {
  1276. width: 1500rpx;
  1277. height: 900rpx;
  1278. padding: 0rpx 0 40rpx 0;
  1279. position: fixed;
  1280. top: 50%;
  1281. left: 50%;
  1282. border-radius: 10rpx;
  1283. transform: translate(-50%, -50%);
  1284. z-index: 100;
  1285. background-color: #fff;
  1286. opacity: 1;
  1287. .layout{
  1288. position: absolute;
  1289. left: 50%;
  1290. bottom: 2%;
  1291. }
  1292. .m_edit {
  1293. position: relative;
  1294. left: 20%;
  1295. transform: translate(-50%, -50%);
  1296. background: rgb(67, 127, 250);
  1297. color: rgb(255, 255, 255);
  1298. min-width: 130rpx;
  1299. }
  1300. .m_delete {
  1301. position: relative;
  1302. left: 50%;
  1303. min-width: 130rpx;
  1304. transform: translate(-50%, -50%);
  1305. background: rgb(234, 37, 44);
  1306. color: rgb(255, 255, 255);
  1307. }
  1308. }
  1309. </style>