project.vue 37 KB

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