simulationCore.vue 7.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308
  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. <button size="mini" class="m_btn_download" style="" @click="goToProjectMange">进入项目管理中心</button>
  17. </view>
  18. <!-- <view class="s_footer" style="text-align: center;padding: 80rpx;">
  19. <view class="s_title" v-text="'推荐项目'">
  20. </view>
  21. <view class="s_table_padding">
  22. <table style="width: 100%;border: 1px solid #DDDDDD;border-collapse: collapse">
  23. <thead class="m-table-hander">
  24. <tr>
  25. <th>项目</th>
  26. <th>名称</th>
  27. <th>类型</th>
  28. <th>介绍</th>
  29. <th>项目文件</th>
  30. <th>项目成员</th>
  31. </tr>
  32. </thead>
  33. <tbody>
  34. <tr v-for="(item,index) in projectData" :key="index">
  35. <th>{{item.Id}}</th>
  36. <th>{{item.ProjectName}}</th>
  37. <th>{{item.Type}}</th>
  38. <th>{{item.Intro}}</th>
  39. <th class="m_yl"><button type="default" size="mini" class="m_edit" @click="preview(item)">预览</button></th>
  40. <th style="position: relative;"><button type="default" @click="deleteMember(item)" size="mini" class="m_delete">删除</button></th>
  41. </tr>
  42. </tbody>
  43. </table>
  44. </view>
  45. </view> -->
  46. </view>
  47. </template>
  48. <script>
  49. export default {
  50. name: "simulationCore", //虚拟影视开发中心
  51. data() {
  52. return {
  53. projectData: []
  54. }
  55. },
  56. methods: {
  57. init(){
  58. console.log('simulationCore init');
  59. // uni.chooseFile({
  60. // success: (chooseImageRes) => {
  61. // const tempFilePaths = chooseImageRes.tempFilePaths;
  62. // uni.uploadFile({
  63. // url: this.$Api + "/project/uploadprojectfile", //仅为示例,非真实的接口地址
  64. // filePath: tempFilePaths[0],
  65. // name: 'file',
  66. // formData: {
  67. // 'UserID':'1e9c969f-8990-40f2-8a8c-ecbafc5720b2', // 创建用户 id
  68. // 'Name':'11', // 项目名称
  69. // 'Type':'11', // 项目描述
  70. // 'ProjectID':'2', // 科幻 现实 历史 主旋律 纪录片
  71. // },
  72. // success: (uploadFileRes) => {
  73. // console.log('upload ok=',uploadFileRes.data);
  74. // }
  75. // });
  76. // }
  77. // });
  78. // this.getProjectsID();
  79. },
  80. goToProjectMange(){
  81. this.$emit('goToTeachCreation');
  82. },
  83. getProjectsID() {
  84. // console.log('userID=',this.$UserId)
  85. uni.request({
  86. url: this.$Api + "/project/getprojects",
  87. data: {
  88. "UserID": this.$UserId
  89. },
  90. method: "POST",
  91. dataType: "json",
  92. success: res => {
  93. // console.log('res=',res)
  94. console.log('Projects=',res.data.Projects)
  95. let Projects = res.data.Projects;
  96. for(let i=0;i<Projects.length;i++)
  97. {
  98. let data = {};
  99. data.Id = Projects[i].Id;
  100. data.ProjectName = Projects[i].ProjectName;
  101. data.Type = Projects[i].Type;
  102. data.Intro = '';
  103. data.File = [];
  104. data.Member = [];
  105. this.projectData.push(data);
  106. }
  107. for(let i=0;i<this.projectData.length;i++)
  108. {
  109. this.getProjectsCtcontent(i);
  110. }
  111. }
  112. })
  113. },
  114. getProjectsCtcontent(index) {
  115. // console.log('UserID=',this.$UserId)
  116. // console.log('ProjectID=',this.projectData[index].Id)
  117. uni.request({
  118. url: this.$Api + "/project/getprojectcontent",
  119. data: {
  120. "UserID": this.$UserId,
  121. "ProjectID": this.projectData[index].Id
  122. },
  123. method: "POST",
  124. dataType: "json",
  125. success: res => {
  126. console.log('res=',res)
  127. if(res.data.ProjectItem.length!=0)
  128. {
  129. this.projectData[index].Intro = res.data.ProjectItem[0].Type;
  130. this.projectData[index].File = res.data.ProjectItem[0].URL;
  131. }
  132. this.getMember(index);
  133. }
  134. })
  135. },
  136. getMember(index) {
  137. uni.request({
  138. url: this.$Api + "/project/getmember",
  139. data: {
  140. "ProjectID": this.projectData[index].Id
  141. },
  142. method: "POST",
  143. dataType: "json",
  144. success: res => {
  145. // console.log('res=',res)
  146. // console.log('Projects=',res.data.Users[0].User.Id)
  147. for(let i=0;i<res.data.Users.length;i++)
  148. {
  149. console.log('Projects=',res.data.Users[i].User.Id)
  150. this.projectData[index].Member.push(res.data.Users[i].User.Id);
  151. }
  152. }
  153. })
  154. },
  155. preview(item){
  156. uni.downloadFile({
  157. url: item.File,
  158. success: (res) => {
  159. if (res.statusCode === 200) {
  160. uni.openDocument({
  161. filePath: res.tempFilePath,
  162. // 如果文件名包含中文,建议使用escape(res.tempFilePath)转码,防止ios和安卓客户端导致的差异
  163. success: function(res) {
  164. console.log('打开文档成功');
  165. }
  166. });
  167. }
  168. },
  169. });
  170. },
  171. deleteMember(item){
  172. uni.request({
  173. url: this.$Api + "/project/deletemember",
  174. data: {
  175. "userID" : this.$UserId,
  176. "DeleteUserID":item.Id
  177. },
  178. method: "POST",
  179. dataType: "json",
  180. success: res => {
  181. console.log('res=',res)
  182. // this.projectData.splice(index,index);
  183. }
  184. })
  185. }
  186. }
  187. }
  188. </script>
  189. <style lang="scss" scoped>
  190. .s_container {
  191. width: 100%;
  192. height: 100%;
  193. background-color: #fff;
  194. }
  195. .s_logo {
  196. width: 100%;
  197. height: 1000rpx;
  198. }
  199. .s_content_container {
  200. padding: 0 206rpx;
  201. .s_title {
  202. font-weight: bold;
  203. text-align: center;
  204. line-height: 200rpx;
  205. font-size: 45rpx;
  206. }
  207. .s_content {
  208. font-weight: 500;
  209. font-size: 40rpx;
  210. line-height: 70rpx;
  211. }
  212. }
  213. .m_btn_download {
  214. height: 80rpx;
  215. line-height: 80rpx;
  216. padding: 0 70rpx;
  217. background: #EA252C;
  218. color: #fff;
  219. font-family: MicrosoftYaHei;
  220. }
  221. tbody tr {
  222. border-top: 2rpx solid #DDDDDD !important;
  223. }
  224. tbody tr th:first-child {
  225. position: relative;
  226. }
  227. tbody tr th {
  228. font-weight: 400 !important;
  229. height: 140rpx;
  230. line-height: 140rpx;
  231. }
  232. tbody tr:hover {
  233. // color: #fff;
  234. background: #FDEBEC;
  235. // opacity: 0.08;
  236. }
  237. .m-table-hander {
  238. background-color: #FFF8F7;
  239. height: 140rpx;
  240. line-height: 140rpx;
  241. font-family: MicrosoftYaHei-Bold, MicrosoftYaHei;
  242. font-weight: bold;
  243. }
  244. .m_edit {
  245. position: absolute;
  246. top: 50%;
  247. left: 50%;
  248. transform: translate(-50%, -50%);
  249. background: rgb(67, 127, 250);
  250. color: rgb(255, 255, 255);
  251. min-width: 130rpx;
  252. }
  253. .m_delete {
  254. position: absolute;
  255. top: 50%;
  256. left: 50%;
  257. min-width: 130rpx;
  258. transform: translate(-50%, -50%);
  259. background: rgb(234, 37, 44);
  260. color: rgb(255, 255, 255);
  261. }
  262. .m_yl {
  263. position: relative;
  264. }
  265. .s_table_padding {
  266. padding: 20rpx 400rpx;
  267. }
  268. .s_title {
  269. line-height: 120rpx;
  270. font-size: 40rpx;
  271. }
  272. .m_btn_download {
  273. height: 80rpx;
  274. line-height: 80rpx;
  275. padding: 0 70rpx;
  276. background: #EA252C;
  277. color: #fff;
  278. font-family: MicrosoftYaHei;
  279. }
  280. </style>