project.vue 30 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064
  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. <!-- <t-table @change="change">
  32. <t-tr> </t-tr>
  33. <t-tr>{{item.ProjectName}}</t-tr>
  34. <t-tr>{{item.Type}}</t-tr>
  35. <t-tr>{{item.Describe}}</t-tr>
  36. <t-tr>{{item.CreateUserName}}</t-tr>
  37. <t-tr style="position: relative;"><button type="default" size="mini" @click="edit(index)" class="m_edit">修改</button></t-tr>
  38. <t-tr style="position: relative;"><button type="default" size="mini" @click="delete1(index)" class="m_delete">删除</button></t-tr>
  39. </t-table> -->
  40. <th>{{item.ProjectName}}</th>
  41. <th>{{item.Type}}</th>
  42. <th>{{item.Describe}}</th>
  43. <th>{{item.CreateUserName}}</th>
  44. <th style="position: relative;"><button type="default" size="mini" @click="editProject(index)" class="m_edit">修改</button></th>
  45. <th style="position: relative;"><button type="default" size="mini" @click="deleteProject(index)" class="m_delete">删除</button></th>
  46. <!-- <th class='blank'><input type="text" :value='item.ProjectName' class='input-item'/></th>
  47. <th class='blank'><input type="text" :value='item.Type' class='input-item'/></th>
  48. <th class='blank'><input type="text" :value='item.Type' class='input-item'/></th>
  49. <th class='blank'><input type="text" :value='item.CreateUserName' class='input-item'/></th>
  50. <th style="position:relative;" class='blank'><button type="default" size="mini" @click="editProject(index)" class="m_edit">修改</button></th>
  51. <th style="position:relative;" class='blank'><button type="default" size="mini" @click="deleteProject(index)" class="m_delete">删除</button></th>
  52. -->
  53. </tr>
  54. </tbody>
  55. </table>
  56. </view>
  57. <view class="m_row_class">
  58. <view class="" style="display: flex;justify-content: space-between;">
  59. <view class="m_row">
  60. <view class="m_row_link">
  61. </view>
  62. <view class="m_row_title" v-text="'文件管理'">
  63. </view>
  64. <view style="position: relative;margin-left: 40rpx;">
  65. <div class="triangle_border_down">
  66. <span></span>
  67. </div>
  68. </view>
  69. </view>
  70. <view class="">
  71. <button type="default" class="m_btn_download" size="mini" @click="onClick_addFile">添加文件</button>
  72. </view>
  73. </view>
  74. <table style="width: 100%;border: 1px solid #DDDDDD;border-collapse: collapse">
  75. <thead class="m-table-hander">
  76. <tr>
  77. <th>文件</th>
  78. <th>文件名</th>
  79. <th>文件类型</th>
  80. <th>上传人</th>
  81. <th>上传日期</th>
  82. <th>下载</th>
  83. <th>删除</th>
  84. <th>审核</th>
  85. </tr>
  86. </thead>
  87. <tbody>
  88. <tr v-for="(item,index) in fileData" :key="index">
  89. <th>{{index+1}}</th>
  90. <th>{{item.Name}}</th>
  91. <th>{{item.Type}}</th>
  92. <th>{{item.UploadUserName}}</th>
  93. <th>{{item.UPloadTime.substring(0,9)}}</th>
  94. <th style="position: relative;"><button type="default" size="mini" @click="download(index)" class="m_edit">下载</button></th>
  95. <th style="position: relative;"><button type="default" size="mini" @click="delete1(index)" class="m_delete">删除</button></th>
  96. <th style="position: relative;"><button type="default" size="mini" @click="audit(item)" class="m_audit">审核</button></th>
  97. </tr>
  98. </tbody>
  99. </table>
  100. </view>
  101. <view class="m_row_class">
  102. <view class="" style="display: flex;justify-content: space-between;">
  103. <view class="m_row">
  104. <view class="m_row_link">
  105. </view>
  106. <view class="m_row_title" v-text="'成员管理'">
  107. </view>
  108. <view style="position: relative;margin-left: 40rpx;">
  109. <div class="triangle_border_down">
  110. <span></span>
  111. </div>
  112. </view>
  113. </view>
  114. <view class="">
  115. <button type="default" class="m_btn_download" size="mini" @click="addMember">添加学生</button>
  116. </view>
  117. </view>
  118. <!--<view class="df fdr aic addMember_box showboder" v-show="isShowAddMember">-->
  119. <!--<view class="addMember_input_box">-->
  120. <!--<input class="addMember_input" type="string" v-model="addedMemberModel.IlabAccount" />-->
  121. <!--</view>-->
  122. <!--<view class="addMember_btn df aic jcc" @click="addMemberData">添加</view>-->
  123. <!--</view>-->
  124. <table style="width: 100%;border: 1px solid #DDDDDD;border-collapse: collapse">
  125. <thead class="m-table-hander">
  126. <tr>
  127. <th>用户名</th>
  128. <th>姓名</th>
  129. <th>专业</th>
  130. <th>班级</th>
  131. <th>职务</th>
  132. <th>电话</th>
  133. <th>删除</th>
  134. </tr>
  135. </thead>
  136. <tbody>
  137. <tr v-for="(item,index) in projectMembers" :key="index">
  138. <th>{{item.User.IlabAccount}}</th>
  139. <th>{{item.User.Name}}</th>
  140. <th>{{item.User.Profession}}</th>
  141. <th>{{item.User.Class}}</th>
  142. <th>
  143. <div>
  144. <!-- <input type="number" value="" /> -->
  145. {{item.User.Type}}
  146. </div>
  147. </th>
  148. <th>{{item.User.PhoneNum}}</th>
  149. <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>
  150. </tr>
  151. </tbody>
  152. </table>
  153. </view>
  154. </view>
  155. <msg ref="msg" :title="title" @determine="determine" :btnArr="arr" v-show="show"></msg>
  156. <audit ref="audit" v-show="auditshow" @determine="determine"></audit>
  157. <!--修改对话框-->
  158. <view class="m_msg" v-show="editDialogshow">
  159. <table style="width: 100%;border: 1px solid #DDDDDD;border-collapse: collapse">
  160. <thead class="m-table-hander">
  161. <tr>
  162. <th>名称</th>
  163. <th>类型</th>
  164. <th>介绍</th>
  165. </tr>
  166. </thead>
  167. <!-- <tbody class='table'> -->
  168. <tbody>
  169. <tr>
  170. <!-- <t-table @change="change">
  171. <t-tr> </t-tr>
  172. <t-tr>{{item.ProjectName}}</t-tr>
  173. <t-tr>{{item.Type}}</t-tr>
  174. <t-tr>{{item.Describe}}</t-tr>
  175. <t-tr>{{item.CreateUserName}}</t-tr>
  176. <t-tr style="position: relative;"><button type="default" size="mini" @click="edit(index)" class="m_edit">修改</button></t-tr>
  177. <t-tr style="position: relative;"><button type="default" size="mini" @click="delete1(index)" class="m_delete">删除</button></t-tr>
  178. </t-table> -->
  179. <th>
  180. <input class="uni-input" placeholder-style="color:#F76260" placeholder="名称" v-model="editDialogData.name"/>
  181. </th>
  182. <!--<th>-->
  183. <!--<input class="uni-input" placeholder-style="color:#F76260" placeholder="类型" v-model="editDialogData.type"/>-->
  184. <!--</th>-->
  185. <th>
  186. <picker class="form-input" @change="bindPickerChange_proType" :value="index_proType" :range="proType">
  187. <view class=" df fdr aic jcsb">
  188. <view>{{proType[index_proType]}}</view>
  189. <view>
  190. <img src="../../../assets/user/pic_user_03.png" />
  191. </view>
  192. </view>
  193. </picker>
  194. </th>
  195. <th>
  196. <input class="uni-input" placeholder-style="color:#F76260" placeholder="介绍" v-model="editDialogData.Introduction"/>
  197. </th>
  198. <!-- <th class='blank'><input type="text" :value='item.ProjectName' class='input-item'/></th>
  199. <th class='blank'><input type="text" :value='item.Type' class='input-item'/></th>
  200. <th class='blank'><input type="text" :value='item.Type' class='input-item'/></th>
  201. <th class='blank'><input type="text" :value='item.CreateUserName' class='input-item'/></th>
  202. <th style="position:relative;" class='blank'><button type="default" size="mini" @click="editProject(index)" class="m_edit">修改</button></th>
  203. <th style="position:relative;" class='blank'><button type="default" size="mini" @click="deleteProject(index)" class="m_delete">删除</button></th>
  204. -->
  205. </tr>
  206. </tbody>
  207. </table>
  208. <view class="layout">
  209. <button type="default" size="mini" @click="editDialogDetermine(index)" class="m_edit">修改</button>
  210. <button type="default" size="mini" @click="editDialogCancel(index)" class="m_delete">取消</button>
  211. </view>
  212. </view>
  213. <!--添加用户对话框-->
  214. <view class="m_msg" v-show="isShowAddMember">
  215. <table style="width: 100%;border: 1px solid #DDDDDD;border-collapse: collapse">
  216. <thead class="m-table-hander">
  217. <tr>
  218. <th>名称</th>
  219. <th>类型</th>
  220. <!--<th>介绍</th>-->
  221. </tr>
  222. </thead>
  223. <!-- <tbody class='table'> -->
  224. <tbody>
  225. <tr>
  226. <!-- <t-table @change="change">
  227. <t-tr> </t-tr>
  228. <t-tr>{{item.ProjectName}}</t-tr>
  229. <t-tr>{{item.Type}}</t-tr>
  230. <t-tr>{{item.Describe}}</t-tr>
  231. <t-tr>{{item.CreateUserName}}</t-tr>
  232. <t-tr style="position: relative;"><button type="default" size="mini" @click="edit(index)" class="m_edit">修改</button></t-tr>
  233. <t-tr style="position: relative;"><button type="default" size="mini" @click="delete1(index)" class="m_delete">删除</button></t-tr>
  234. </t-table> -->
  235. <th>
  236. <!--<input class="uni-input" placeholder-style="color:#F76260" placeholder="名称" v-model="editDialogData.name"/>-->
  237. <view class="addMember_input_box">
  238. <input class="addMember_input" type="string" v-model="addedMemberModel.IlabAccount" placeholder="学员id" />
  239. </view>
  240. </th>
  241. <!--<th>-->
  242. <!--<input class="uni-input" placeholder-style="color:#F76260" placeholder="类型" v-model="editDialogData.type"/>-->
  243. <!--</th>-->
  244. <th>
  245. <picker class="form-input" @change="bindPickerChange_proTypeadd" :value="index_addproType" :range="addproType">
  246. <view class=" df fdr aic jcsb">
  247. <view>{{addproType[index_addproType]}}</view>
  248. <view>
  249. <img src="../../../assets/user/pic_user_03.png" />
  250. </view>
  251. </view>
  252. </picker>
  253. </th>
  254. <!--<th>-->
  255. <!--<input class="uni-input" placeholder-style="color:#F76260" placeholder="介绍" v-model="editDialogData.Introduction"/>-->
  256. <!--</th>-->
  257. <!-- <th class='blank'><input type="text" :value='item.ProjectName' class='input-item'/></th>
  258. <th class='blank'><input type="text" :value='item.Type' class='input-item'/></th>
  259. <th class='blank'><input type="text" :value='item.Type' class='input-item'/></th>
  260. <th class='blank'><input type="text" :value='item.CreateUserName' class='input-item'/></th>
  261. <th style="position:relative;" class='blank'><button type="default" size="mini" @click="editProject(index)" class="m_edit">修改</button></th>
  262. <th style="position:relative;" class='blank'><button type="default" size="mini" @click="deleteProject(index)" class="m_delete">删除</button></th>
  263. -->
  264. </tr>
  265. </tbody>
  266. </table>
  267. <view class="layout">
  268. <!--<view class="addMember_btn df aic jcc" @click="addMemberData">添加</view>-->
  269. <button type="default" size="mini" @click="addMemberData(index)" class="m_edit">添加</button>
  270. <button type="default" size="mini" @click="addMemberDataCancel(index)" class="m_delete">取消</button>
  271. </view>
  272. </view>
  273. <!-- <locationtemp ref="location_temp"></locationtemp> -->
  274. </view>
  275. </template>
  276. <script>
  277. import msg from "./msg.vue"
  278. import audit from "./audit.vue"
  279. // import locationtemp from "./location_temp.vue"
  280. // import api from "../../../api/project.js"
  281. export default {
  282. name: "home_project",
  283. data() {
  284. return {
  285. index: 1,
  286. title: "",
  287. show: false,
  288. auditshow: false,
  289. callback: "",
  290. arr: [],
  291. data: [],
  292. projectData: [],
  293. ProjectItem: [],
  294. fileData: [],
  295. projectMembers: [],
  296. isShowAddMember: false,
  297. addedMemberModel: {
  298. "IlabAccount": '',
  299. "type": ''
  300. },
  301. currentSelect:{section:-1,buttonType:'',index:-1},
  302. Type:'asd',
  303. editDialogshow : false,
  304. editDialogData : {name : "", type :"", Introduction : ""},
  305. proType: ['科幻', '现实', '剧情', '历史', '爱情', '惊悚', '公路', '动画'],
  306. addproType: ['编剧', '摄影师' ,'录音师', '灯光师', '创建人'],
  307. index_addproType : 0,
  308. index_proType : 0,
  309. }
  310. },
  311. components: {
  312. msg,
  313. audit,
  314. // locationtemp
  315. },
  316. methods: {
  317. paging(obj) {
  318. this.index = obj;
  319. },
  320. editProject(index) {
  321. this.title = "是否修改信息?";
  322. this.arr = ["修改", "取消"]
  323. this.show = true;
  324. this.currentSelect = {section:0,buttonType:'edit',index:index};
  325. console.log("修改什么", this.currentSelect);
  326. },
  327. deleteProject(index) {
  328. this.title = "是否删除信息?";
  329. this.arr = ["删除", "取消"]
  330. this.show = true;
  331. this.currentSelect = {section:0,buttonType:'delete',index:index};
  332. },
  333. // delete1(index) {
  334. // this.title = "是否删除信息?";
  335. // this.arr = ["删除", "取消"]
  336. // this.show = true;
  337. // },
  338. download(index) {
  339. this.title = "下载成功?";
  340. this.arr = ["确认"];
  341. this.show = true;
  342. },
  343. // edit(index) {
  344. // this.title = "是否删除信息?";
  345. // this.arr = ["删除", "取消"]
  346. // this.show = true;
  347. // },
  348. audit(index) {
  349. this.title = "是否确认审核?";
  350. this.arr = ["通过", "未通过"]
  351. this.show = true;
  352. this.callback = "audit"
  353. // this.auditshow = true;
  354. },
  355. editSave() {
  356. if (this.editDialogData.name == "") {
  357. alert("请输入项目名称~");
  358. return false;
  359. }
  360. if (this.editDialogData.type == "") {
  361. alert("请输入项目类型~");
  362. return false;
  363. }
  364. if (this.editDialogData.Introduction == "") {
  365. alert("请输入项目介绍~");
  366. return false;
  367. }
  368. // let data = {
  369. // "CreateUserID":mydata_userInfo.UserID,
  370. // "ProjectName":this.model.projectName,
  371. // "Describe":this.model.describe,
  372. // "Type":this.model.type
  373. // }
  374. // console.log("请求创建项目",data);
  375. // MyRequest.CreateProjectNew(data,function(res){
  376. // console.log("创建项目成功",res);
  377. // },null);
  378. console.log("创建项目自己ID",mydata_userInfo.UserID);
  379. uni.request({
  380. url: this.$Api + "/project/changeprojectinfo",
  381. data: {
  382. "UserID":this.projectData[0].CreateUserID,
  383. "ProjectID" : this.projectData[0].Id,
  384. "ProjectName":this.editDialogData.name,
  385. "Describe":this.editDialogData.Introduction, // 项目描述
  386. "Type":this.editDialogData.type
  387. },
  388. method: "POST",
  389. dataType: "json",
  390. success: res => {
  391. console.log('是否成功',res)
  392. if (res.data.Code == 100) {
  393. // this.projectMembers = res.data.Users;
  394. // console.log();
  395. // this.$refs.table.getList();
  396. this.getlist()
  397. this.editDialogshow = false
  398. // this.editProject(0)
  399. // this.show = false;
  400. return true;
  401. }
  402. // this.tabledata = res.data.Projects
  403. // console.log('res=',this.tabledata)
  404. }
  405. })
  406. // uni.chooseImage({
  407. // success: (chooseImageRes) => {
  408. // const tempFilePaths = chooseImageRes.tempFilePaths;
  409. // uni.uploadFile({
  410. // url: this.$Api+'/project/uploadprojectfile', //仅为示例,非真实的接口地址
  411. // filePath: tempFilePaths[0],
  412. // name: 'file',
  413. // formData: {
  414. // // UserID: //上传用户 id
  415. // // Name: //文件名
  416. // // Type: //规范文件 剧本 拍摄脚本 分镜头脚本 气氛图 项目简介 项目报告 场景图
  417. // // ProjectID: //项目ID
  418. //
  419. // "UserID": this.projectData[0].CreateUserID,
  420. // "Name": this.editDialogData.name,
  421. // "Type": this.editDialogData.type,
  422. // "ProjectID": this.projectData[0].Id,
  423. // },
  424. // success: (uploadFileRes) => {
  425. // console.log('upload ok=', uploadFileRes.data);
  426. // alert("创建成功");
  427. // this.model.projectName='';
  428. // this.model.describe='';
  429. // this.model.type='科幻';
  430. //
  431. // this.$emit('onBackCreateInfo');
  432. // }
  433. // });
  434. // }
  435. // });
  436. },
  437. editDialogDetermine(){
  438. this.editSave()
  439. },
  440. editDialogCancel(){
  441. this.editDialogshow = false
  442. this.editDialogData = {name : "", type :"", Introduction : ""}
  443. },
  444. // editDialogName(event){
  445. // this.editDialogData.name = event.target.value
  446. // },
  447. // editDialogType(event){
  448. // this.editDialogData.type = event.target.value
  449. // },
  450. // editDialogIntroduction(event){
  451. // this.editDialogData.Introduction = event.target.value
  452. // },
  453. determine(obj) {
  454. this.show = false;
  455. this.auditshow = false;
  456. // switch (this.callback) {
  457. // case "audit": //审核
  458. // const data = {
  459. // ProjectItemID: "xxxx",
  460. // Pass: obj == 0
  461. // }
  462. // this.auditPost(data);
  463. // break;
  464. // default:
  465. // break;
  466. // }
  467. // this.currentSelect = {section:0,buttonType:'delete',index:index};
  468. console.log("点了 对话框", obj);
  469. switch (this.currentSelect.section) {
  470. case 0: //項目管理
  471. switch (this.currentSelect.buttonType) {
  472. case 'delete':
  473. console.log("点了 删除", this.currentSelect);
  474. if (obj == 0) {
  475. console.log("点了 确定删除", this.currentSelect);
  476. this.deleteItemProject()
  477. }else if(obj == 1){
  478. console.log("点了 取消删除", this.currentSelect);
  479. }
  480. break;
  481. case 'edit':
  482. console.log("点了 修改", this.currentSelect);
  483. if (obj == 0) {
  484. console.log("点了 确定修改", this.currentSelect,this.projectData[0]);
  485. // CreateTime: "2021-04-17 11:04:09"
  486. // CreateUserID: "1e9c969f-8990-40f2-8a8c-ecbafc5720b2"
  487. // CreateUserName: "李力新"
  488. // Describe: "999"
  489. // Id: 28
  490. // ProjectName: "999"
  491. // ProjectReviewImage: "http://communication-org-simulation.oss-cn-beijing.aliyuncs.com/project_28_timg.jpeg?Expires=1618634575&OSSAccessKeyId=LTAI4G4obJx7AiUgWThKBL47&Signature=az3xXUG%2F6lmxEBTmRtwZ%2FankjK8%3D"
  492. // ReviewImageOss: "project_28_timg.jpeg"
  493. // Type: "科幻"
  494. this.editDialogData = {name : this.projectData[0].ProjectName, type :this.projectData[0].Type, Introduction : this.projectData[0].Describe}
  495. this.editDialogshow = true
  496. console.log("修改数据", this.editDialogData);
  497. }else if(obj == 1){
  498. this.editDialogData = {name : "", type :"", Introduction : ""}
  499. console.log("点了 取消修改", this.currentSelect);
  500. }
  501. break;
  502. default:
  503. break;
  504. }
  505. break;
  506. default:
  507. break;
  508. }
  509. this.currentSelect = {section:-1,buttonType:'',index:-1}
  510. // console.log(obj)
  511. },
  512. auditPost(obj) {
  513. uni.request({
  514. url: this.$Api + "/project/setfilepass",
  515. data: obj,
  516. method: "POST",
  517. dataType: "json",
  518. success: res => {
  519. var {
  520. data
  521. } = res;
  522. alert(data.msg);
  523. }
  524. })
  525. },
  526. getlist() {
  527. uni.request({
  528. url: this.$Api + "/project/getprojectcontent",
  529. data: {
  530. "UserID": this.$UserId,
  531. "ProjectID": this.projectData[0].Id
  532. },
  533. method: "POST",
  534. dataType: "json",
  535. success: res => {
  536. if (res.data.Code == 100) {
  537. this.projectData[0] = null
  538. this.projectData[0] = res.data.Project;
  539. // ++this.projectData
  540. this.$forceUpdate()
  541. }
  542. console.log("获取了什么样子的信息", this.projectData[0]);
  543. }
  544. })
  545. },
  546. getFileList() {
  547. // console.log("用户id");
  548. // console.log(this.$UserId);
  549. // console.log(this.projectData[0].Id);
  550. uni.request({
  551. url: this.$Api + "/project/getprojectcontent",
  552. data: {
  553. "UserID": this.$UserId,
  554. "ProjectID": this.projectData[0].Id
  555. },
  556. method: "POST",
  557. dataType: "json",
  558. success: res => {
  559. this.fileData = res.data.ProjectItem;
  560. console.log('this.fileData=',this.fileData)
  561. }
  562. })
  563. },
  564. viewProject(obj) {
  565. console.log('进来的什么信息',obj)
  566. this.projectData = [obj];
  567. this.getFileList();
  568. this.getMemberList();
  569. },
  570. getMemberList() {
  571. var temp = {
  572. "ProjectID": this.projectData[0].Id
  573. }
  574. uni.request({
  575. url: this.$Api + "/project/getmember",
  576. data: temp,
  577. method: "POST",
  578. dataType: "json",
  579. success: res => {
  580. // console.log("请求学生", res);
  581. if (res.data.Code == 100) {
  582. this.projectMembers = res.data.Users;
  583. // console.log();
  584. }
  585. }
  586. })
  587. },
  588. addMember() {
  589. this.isShowAddMember = true;
  590. },
  591. addMemberData(){
  592. console.log("添加学生", this.addedMemberModel,this.projectData[0]);
  593. // "userID" : "12eqwed12",
  594. // "ProjectID":1,
  595. // "DeleteUserID":"12eqwe12"
  596. // userID User.Id
  597. // ProjectID this.projectData[0].Id,
  598. // "UserID" : "12eqwed12", //项目创建人ID
  599. // "ProjectID": 10001, //项目ID
  600. // "AddUserID":"12eqwe12" //添加人员ID 支持ilabID UserID
  601. // "Type":"美术师" //编剧 摄影师 录音师 灯光师 创建人
  602. if (this.addedMemberModel.IlabAccount == "") {
  603. alert("学员id不能为空")
  604. return
  605. }
  606. console.log('删掉成员 ')
  607. let url = this.$Api + "/project/addmember"
  608. let data = {
  609. "UserID" : this.projectData[0].CreateUserID,
  610. "ProjectID":this.projectData[0].Id,
  611. "AddUserID":this.addedMemberModel.IlabAccount,
  612. "Type":this.addedMemberModel.type,
  613. }
  614. console.log('添加成员 发送数据 '," 地址 ",url," 数据 ",data,"项目数据",this.projectData)
  615. uni.request({
  616. url: url,
  617. data: data,
  618. method: "POST",
  619. dataType: "json",
  620. success: res => {
  621. console.log('添加成员 返回',res)
  622. if (res.data.Code == 100) {
  623. // this.$refs.table.getList();
  624. this.$forceUpdate()
  625. this.isShowAddMember = false
  626. }
  627. this.$forceUpdate()
  628. this.isShowAddMember = false
  629. // this.projectData.splice(index,index);
  630. }
  631. })
  632. },
  633. addMemberDataCancel(){
  634. this.isShowAddMember = false;
  635. },
  636. onClick_addMember_ok() {
  637. console.log("添加学生", this.addedMemberModel);
  638. var temp = {
  639. "UserID": this.projectData[0].CreateUserID, //项目创建人ID
  640. "ProjectID": this.projectData[0].Id, //项目ID
  641. "AddUserID": mydata_userInfo.UserID, //添加人员ID 支持ilabID UserID
  642. "Type": "美术师" //编剧 摄影师 录音师 灯光师 创建人
  643. }
  644. uni.request({
  645. url: this.$Api + "/project/getmember",
  646. data: temp,
  647. method: "POST",
  648. dataType: "json",
  649. success: res => {
  650. // console.log("请求学生", res);
  651. if (res.data.Code == 100) {
  652. this.projectMembers = res.data.Users;
  653. console.log();
  654. }
  655. }
  656. })
  657. },
  658. onClick_addFile(){
  659. console.log("项目 点了添加文件")
  660. },
  661. //删除条目
  662. deleteItemProject(){
  663. console.log('UserID=',this.$UserId)
  664. console.log('ProjectID=',this.projectData[0].Id)
  665. var temp = {
  666. "UserID":this.projectData[0].CreateUserID,
  667. "ProjectID" : this.projectData[0].Id,
  668. }
  669. console.log("要删除过去的数据为",temp)
  670. uni.request({
  671. url: this.$Api + "/backstage/deleteproject",
  672. data: temp,
  673. method: "POST",
  674. dataType: "json",
  675. success: res => {
  676. console.log("delete project ok", res);
  677. this.$emit('onBackToProjectList');
  678. this.$forceUpdate();//强制刷新页面
  679. }
  680. })
  681. },
  682. bindPickerChange_proType: function(e) {
  683. this.index_proType = e.target.value;
  684. this.editDialogData.type = this.proType[this.index_proType];
  685. // console.log(this.model)
  686. },
  687. bindPickerChange_proTypeadd: function(e) {
  688. this.index_addproType = e.target.value;
  689. this.addedMemberModel.type = this.addproType[this.index_addproType];
  690. // console.log(this.model)
  691. },
  692. deleteMember(item){
  693. // "userID" : "12eqwed12",
  694. // "ProjectID":1,
  695. // "DeleteUserID":"12eqwe12"
  696. // userID User.Id
  697. // ProjectID this.projectData[0].Id,
  698. console.log('删掉成员 ',item)
  699. let url = this.$Api + "/project/deletemember"
  700. let data = {
  701. "userID" : this.projectData[0].CreateUserID,
  702. "DeleteUserID":item.User.Id,
  703. "ProjectID":this.projectData[0].Id,
  704. }
  705. console.log('删掉成员 发送数据 '," 地址 ",url," 数据 ",data)
  706. uni.request({
  707. url: url,
  708. data: data,
  709. method: "POST",
  710. dataType: "json",
  711. success: res => {
  712. console.log('删掉成员 返回',res)
  713. if (res.data.Code == 100) {
  714. // this.$refs.table.getList();
  715. this.$forceUpdate();//强制刷新页面
  716. }
  717. // this.projectData.splice(index,index);
  718. }
  719. })
  720. }
  721. }
  722. }
  723. </script>
  724. <style lang="scss">
  725. .m_right {
  726. width: 100%;
  727. margin-top: 5rpx;
  728. // padding: 0 150rpx;
  729. background-color: #fff;
  730. box-shadow: 3px 0px 6px 0px rgba(0, 0, 0, 0.1);
  731. .m_right_container {
  732. padding: 150rpx;
  733. }
  734. .s_logo {
  735. width: 100%;
  736. height: 800rpx;
  737. }
  738. .m_right_hander {
  739. text-align: right;
  740. height: 250rpx;
  741. position: relative;
  742. .m_btn_red {
  743. position: absolute;
  744. height: 80rpx;
  745. line-height: 80rpx;
  746. padding: 0 40rpx;
  747. right: 0;
  748. top: 50%;
  749. transform: translateY(-50%);
  750. background: #EA252C;
  751. color: #fff;
  752. }
  753. }
  754. }
  755. .m_btn_download {
  756. height: 80rpx;
  757. line-height: 80rpx;
  758. padding: 0 70rpx;
  759. background: #EA252C;
  760. color: #fff;
  761. font-family: MicrosoftYaHei;
  762. }
  763. tbody tr {
  764. border-top: 2rpx solid #DDDDDD !important;
  765. }
  766. tbody tr th:first-child {
  767. position: relative;
  768. }
  769. tbody tr th {
  770. font-weight: 400 !important;
  771. height: 140rpx;
  772. line-height: 140rpx;
  773. }
  774. tbody tr:hover {
  775. // color: #fff;
  776. background: #FDEBEC;
  777. // opacity: 0.08;
  778. }
  779. .form-input {
  780. width: 100%;
  781. border: 1px solid #ece8e8;
  782. line-height: 50rpx;
  783. font-size: 30rpx;
  784. border-radius: 6rpx;
  785. padding: 10rpx 40rpx;
  786. }
  787. .m-table-hander {
  788. background-color: #FFF8F7;
  789. height: 140rpx;
  790. line-height: 140rpx;
  791. font-family: MicrosoftYaHei-Bold, MicrosoftYaHei;
  792. font-weight: bold;
  793. }
  794. .m_edit {
  795. position: absolute;
  796. top: 50%;
  797. left: 50%;
  798. transform: translate(-50%, -50%);
  799. background: rgb(67, 127, 250);
  800. color: rgb(255, 255, 255);
  801. min-width: 130rpx;
  802. }
  803. .m_delete {
  804. position: absolute;
  805. top: 50%;
  806. left: 50%;
  807. min-width: 130rpx;
  808. transform: translate(-50%, -50%);
  809. background: rgb(234, 37, 44);
  810. color: rgb(255, 255, 255);
  811. }
  812. .m_right_footer {
  813. margin-top: 80rpx;
  814. }
  815. .m_logoimg {
  816. width: 80rpx;
  817. height: 80rpx;
  818. position: absolute;
  819. top: 50%;
  820. left: 50%;
  821. transform: translate(-50%, -50%);
  822. }
  823. .m_paging {
  824. text-align: right;
  825. .m_paging_item {
  826. padding: 10rpx 18rpx;
  827. border: 1rpx solid #DDDDDD;
  828. border-radius: 8rpx;
  829. margin-right: 10rpx;
  830. }
  831. .p_act {
  832. background: #EA252C;
  833. color: #fff;
  834. border: inherit;
  835. }
  836. }
  837. .m_paging_item:hover {
  838. background: #EA252C;
  839. color: #fff;
  840. border: inherit;
  841. }
  842. .m_act1 {
  843. color: #FF0019;
  844. }
  845. .m_row {
  846. display: flex;
  847. height: 60rpx;
  848. line-height: 60rpx;
  849. font-size: 30rpx;
  850. color: #ea252c;
  851. padding: 0 0 80rpx 0;
  852. }
  853. .m_audit {
  854. position: absolute;
  855. top: 50%;
  856. left: 50%;
  857. min-width: 65px;
  858. -webkit-transform: translate(-50%, -50%);
  859. transform: translate(-50%, -50%);
  860. color: white;
  861. background-color: #FF791B;
  862. }
  863. .m_row_link {
  864. width: 10rpx;
  865. height: 60rpx;
  866. background-color: #ea252c;
  867. margin-right: 40rpx;
  868. }
  869. .m_row_title {
  870. color: #ea252c;
  871. font-weight: bold;
  872. font-size: 40rpx;
  873. }
  874. /*向下*/
  875. .triangle_border_down {
  876. width: 0;
  877. height: 0;
  878. border-width: 25rpx 25rpx 0;
  879. border-style: solid;
  880. border-color: #ea252c transparent transparent;
  881. /*灰 透明 透明 */
  882. margin: 20rpx auto;
  883. position: relative;
  884. }
  885. .m_row_class {
  886. margin-bottom: 60rpx;
  887. }
  888. .addMember_box{
  889. margin-bottom: 50rpx;
  890. height: 80rpx;
  891. }
  892. .addMember_input_box{
  893. width: 500rpx;
  894. height: 80rpx;
  895. }
  896. .addMember_input {
  897. width: 100%;
  898. height: 100%;
  899. border: 1px solid #ece8e8;
  900. line-height: 50rpx;
  901. font-size: 30rpx;
  902. border-radius: 6rpx;
  903. padding: 10rpx 40rpx;
  904. }
  905. .addMember_btn {
  906. width: 130rpx;
  907. height: 80rpx;
  908. transform: translate(-50%, -50%);
  909. background: rgb(234, 37, 44);
  910. color: rgb(255, 255, 255);
  911. }
  912. .blank{
  913. // display: flex;
  914. // align-items:center;
  915. // justify-content:center;
  916. border:1px solid black;
  917. }
  918. .table{
  919. // display: flex;
  920. // display: -webkit-flex;
  921. // align-items:center;
  922. // justify-content:center;
  923. border:1px solid black;
  924. }
  925. .input-item {
  926. // height: 110rpx;
  927. // font-size: 40rpx;
  928. // background: #000000;
  929. // text-align: center;
  930. // border-radius: 5%;
  931. // margin-left: 40rpx;
  932. // margin-right: 40rpx;
  933. // color: #00F6FF;
  934. // width: 50%;
  935. // display: flex;
  936. // display: -webkit-flex;
  937. // align-items:center;
  938. // justify-content:center;
  939. border:1px solid black;
  940. }
  941. .m_msg {
  942. width: 1500rpx;
  943. height: 900rpx;
  944. padding: 0rpx 0 40rpx 0;
  945. position: fixed;
  946. top: 50%;
  947. left: 50%;
  948. border-radius: 10rpx;
  949. transform: translate(-50%, -50%);
  950. z-index: 100;
  951. background-color: #fff;
  952. opacity: 1;
  953. .layout{
  954. position: absolute;
  955. left: 50%;
  956. bottom: 2%;
  957. }
  958. .m_edit {
  959. position: relative;
  960. left: 20%;
  961. transform: translate(-50%, -50%);
  962. background: rgb(67, 127, 250);
  963. color: rgb(255, 255, 255);
  964. min-width: 130rpx;
  965. }
  966. .m_delete {
  967. position: relative;
  968. left: 50%;
  969. min-width: 130rpx;
  970. transform: translate(-50%, -50%);
  971. background: rgb(234, 37, 44);
  972. color: rgb(255, 255, 255);
  973. }
  974. }
  975. </style>