simulationCore.vue 7.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290
  1. <template>
  2. <view class="s_container">
  3. <image src="../../assets/home/homeBG.png" class="s_logo" mode=""></image>
  4. <view class="s_content_container">
  5. <view class="s_title" v-text="'虚拟仿真1号摄影棚'">
  6. </view>
  7. <view class="s_content">
  8. <view class="">
  9. 影视现场实时特效是虚拟制片的一种影视创作流程与创作技术,处于虚 拟制片前、中、后期中的中期现场创作环节,与虚拟制片的前期艺术设 计、虚拟制作联系尤为密切。影视现场实时特效的核心
  10. 是通过实时渲染、数据跟踪、CG制作等核心技术,在影视拍摄现场实现虚拟创作与现 实创作的实时同步与实时协作,并在现场呈现影像最终效果。除现场摄 制以外,影视现场实时特效还包括
  11. 前期虚拟艺术(数字制景、数字道具、数字角色)的再创作和后期处理(合成、调色)的现场创作。
  12. </view>
  13. </view>
  14. </view>
  15. <view class="s_footer" style="text-align: center;padding: 80rpx;">
  16. <view class="s_title" v-text="'推荐项目'">
  17. </view>
  18. <view class="s_table_padding">
  19. <table style="width: 100%;border: 1px solid #DDDDDD;border-collapse: collapse">
  20. <thead class="m-table-hander">
  21. <tr>
  22. <th>项目</th>
  23. <th>名称</th>
  24. <th>类型</th>
  25. <th>介绍</th>
  26. <th>进度</th>
  27. <th>项目文件</th>
  28. <th>项目成员</th>
  29. </tr>
  30. </thead>
  31. <tbody>
  32. <tr v-for="(item,index) in projectData" :key="index">
  33. <th>{{item.Id}}</th>
  34. <th>{{item.ProjectName}}</th>
  35. <th>{{item.Type}}</th>
  36. <th>{{item.Intro}}</th>
  37. <th>{{item.Progress}}</th>
  38. <th class="m_yl"><button type="default" size="mini" class="m_edit" @click="preview(item)">预览</button></th>
  39. <th style="position: relative;"><button type="default" @click="deleteMember(item)" size="mini" class="m_delete">删除</button></th>
  40. </tr>
  41. </tbody>
  42. </table>
  43. </view>
  44. </view>
  45. </view>
  46. </template>
  47. <script>
  48. export default {
  49. name: "simulationCore", //虚拟影视开发中心
  50. data() {
  51. return {
  52. projectData: []
  53. }
  54. },
  55. methods: {
  56. init(){
  57. console.log('simulationCore init');
  58. // uni.chooseImage({
  59. // success: (chooseImageRes) => {
  60. // const tempFilePaths = chooseImageRes.tempFilePaths;
  61. // uni.uploadFile({
  62. // url: 'http://39.105.166.141:8085/project/createprojectnew', //仅为示例,非真实的接口地址
  63. // filePath: tempFilePaths[0],
  64. // name: 'file',
  65. // formData: {
  66. // 'CreateUserID':'1e9c969f-8990-40f2-8a8c-ecbafc5720b2', // 创建用户 id
  67. // 'ProjectName':'test22', // 项目名称
  68. // 'Describe':'aaa22', // 项目描述
  69. // 'Type':'bbbbb22', // 科幻 现实 历史 主旋律 纪录片
  70. // },
  71. // success: (uploadFileRes) => {
  72. // console.log('upload ok=',uploadFileRes.data);
  73. // }
  74. // });
  75. // }
  76. // });
  77. this.getProjectsID();
  78. },
  79. getProjectsID() {
  80. // console.log('userID=',this.$UserId)
  81. uni.request({
  82. url: this.$Api + "/project/getprojects",
  83. data: {
  84. "UserID": this.$UserId
  85. },
  86. method: "POST",
  87. dataType: "json",
  88. success: res => {
  89. // console.log('res=',res)
  90. // console.log('Projects=',res.data.Projects)
  91. let Projects = res.data.Projects;
  92. for(let i=0;i<Projects.length;i++)
  93. {
  94. let data = {};
  95. data.Id = Projects[i].Id;
  96. data.ProjectName = Projects[i].ProjectName;
  97. data.Type = '后台缺';
  98. data.Intro = '后台缺';
  99. data.Progress = '后台缺';
  100. data.File = [];
  101. data.Member = [];
  102. this.projectData.push(data);
  103. }
  104. for(let i=0;i<this.projectData.length;i++)
  105. {
  106. this.getProjectsCtcontent(i);
  107. }
  108. }
  109. })
  110. },
  111. getProjectsCtcontent(index) {
  112. // console.log('UserID=',this.$UserId)
  113. // console.log('ProjectID=',this.projectData[index].Id)
  114. uni.request({
  115. url: this.$Api + "/project/getprojectcontent",
  116. data: {
  117. "UserID": this.$UserId,
  118. "ProjectID": this.projectData[index].Id
  119. },
  120. method: "POST",
  121. dataType: "json",
  122. success: res => {
  123. // console.log('res=',res)
  124. this.projectData[index].Type = res.data.ProjectItem.Type;
  125. this.getMember(index);
  126. }
  127. })
  128. },
  129. getMember(index) {
  130. uni.request({
  131. url: this.$Api + "/project/getmember",
  132. data: {
  133. "ProjectID": this.projectData[index].Id
  134. },
  135. method: "POST",
  136. dataType: "json",
  137. success: res => {
  138. // console.log('res=',res)
  139. // console.log('Projects=',res.data.Users[0].User.Id)
  140. for(let i=0;i<res.data.Users.length;i++)
  141. {
  142. console.log('Projects=',res.data.Users[i].User.Id)
  143. this.projectData[index].Member.push(res.data.Users[i].User.Id);
  144. }
  145. }
  146. })
  147. },
  148. preview(item){
  149. uni.downloadFile({
  150. url: item.File,
  151. success: (res) => {
  152. if (res.statusCode === 200) {
  153. uni.openDocument({
  154. filePath: res.tempFilePath,
  155. // 如果文件名包含中文,建议使用escape(res.tempFilePath)转码,防止ios和安卓客户端导致的差异
  156. success: function(res) {
  157. console.log('打开文档成功');
  158. }
  159. });
  160. }
  161. },
  162. });
  163. },
  164. deleteMember(item){
  165. uni.request({
  166. url: this.$Api + "/project/deletemember",
  167. data: {
  168. "userID" : this.$UserId,
  169. "DeleteUserID":item.Id
  170. },
  171. method: "POST",
  172. dataType: "json",
  173. success: res => {
  174. console.log('res=',res)
  175. // this.projectData.splice(index,index);
  176. }
  177. })
  178. }
  179. }
  180. }
  181. </script>
  182. <style lang="scss" scoped>
  183. .s_container {
  184. width: 100%;
  185. height: 100%;
  186. background-color: #fff;
  187. }
  188. .s_logo {
  189. width: 100%;
  190. height: 1000rpx;
  191. }
  192. .s_content_container {
  193. padding: 0 206rpx;
  194. .s_title {
  195. font-weight: bold;
  196. text-align: center;
  197. line-height: 200rpx;
  198. font-size: 45rpx;
  199. }
  200. .s_content {
  201. font-weight: 500;
  202. font-size: 40rpx;
  203. line-height: 70rpx;
  204. }
  205. }
  206. .m_btn_download {
  207. height: 80rpx;
  208. line-height: 80rpx;
  209. padding: 0 70rpx;
  210. background: #EA252C;
  211. color: #fff;
  212. font-family: MicrosoftYaHei;
  213. }
  214. tbody tr {
  215. border-top: 2rpx solid #DDDDDD !important;
  216. }
  217. tbody tr th:first-child {
  218. position: relative;
  219. }
  220. tbody tr th {
  221. font-weight: 400 !important;
  222. height: 140rpx;
  223. line-height: 140rpx;
  224. }
  225. tbody tr:hover {
  226. // color: #fff;
  227. background: #FDEBEC;
  228. // opacity: 0.08;
  229. }
  230. .m-table-hander {
  231. background-color: #FFF8F7;
  232. height: 140rpx;
  233. line-height: 140rpx;
  234. font-family: MicrosoftYaHei-Bold, MicrosoftYaHei;
  235. font-weight: bold;
  236. }
  237. .m_edit {
  238. position: absolute;
  239. top: 50%;
  240. left: 50%;
  241. transform: translate(-50%, -50%);
  242. background: rgb(67, 127, 250);
  243. color: rgb(255, 255, 255);
  244. min-width: 130rpx;
  245. }
  246. .m_delete {
  247. position: absolute;
  248. top: 50%;
  249. left: 50%;
  250. min-width: 130rpx;
  251. transform: translate(-50%, -50%);
  252. background: rgb(234, 37, 44);
  253. color: rgb(255, 255, 255);
  254. }
  255. .m_yl {
  256. position: relative;
  257. }
  258. .s_table_padding {
  259. padding: 20rpx 400rpx;
  260. }
  261. .s_title {
  262. line-height: 120rpx;
  263. font-size: 40rpx;
  264. }
  265. </style>