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. },
  82. getProjectsID() {
  83. // console.log('userID=',this.$UserId)
  84. uni.request({
  85. url: this.$Api + "/project/getprojects",
  86. data: {
  87. "UserID": this.$UserId
  88. },
  89. method: "POST",
  90. dataType: "json",
  91. success: res => {
  92. // console.log('res=',res)
  93. console.log('Projects=',res.data.Projects)
  94. let Projects = res.data.Projects;
  95. for(let i=0;i<Projects.length;i++)
  96. {
  97. let data = {};
  98. data.Id = Projects[i].Id;
  99. data.ProjectName = Projects[i].ProjectName;
  100. data.Type = Projects[i].Type;
  101. data.Intro = '';
  102. data.File = [];
  103. data.Member = [];
  104. this.projectData.push(data);
  105. }
  106. for(let i=0;i<this.projectData.length;i++)
  107. {
  108. this.getProjectsCtcontent(i);
  109. }
  110. }
  111. })
  112. },
  113. getProjectsCtcontent(index) {
  114. // console.log('UserID=',this.$UserId)
  115. // console.log('ProjectID=',this.projectData[index].Id)
  116. uni.request({
  117. url: this.$Api + "/project/getprojectcontent",
  118. data: {
  119. "UserID": this.$UserId,
  120. "ProjectID": this.projectData[index].Id
  121. },
  122. method: "POST",
  123. dataType: "json",
  124. success: res => {
  125. console.log('res=',res)
  126. if(res.data.ProjectItem.length!=0)
  127. {
  128. this.projectData[index].Intro = res.data.ProjectItem[0].Type;
  129. this.projectData[index].File = res.data.ProjectItem[0].URL;
  130. }
  131. this.getMember(index);
  132. }
  133. })
  134. },
  135. getMember(index) {
  136. uni.request({
  137. url: this.$Api + "/project/getmember",
  138. data: {
  139. "ProjectID": this.projectData[index].Id
  140. },
  141. method: "POST",
  142. dataType: "json",
  143. success: res => {
  144. // console.log('res=',res)
  145. // console.log('Projects=',res.data.Users[0].User.Id)
  146. for(let i=0;i<res.data.Users.length;i++)
  147. {
  148. console.log('Projects=',res.data.Users[i].User.Id)
  149. this.projectData[index].Member.push(res.data.Users[i].User.Id);
  150. }
  151. }
  152. })
  153. },
  154. preview(item){
  155. uni.downloadFile({
  156. url: item.File,
  157. success: (res) => {
  158. if (res.statusCode === 200) {
  159. uni.openDocument({
  160. filePath: res.tempFilePath,
  161. // 如果文件名包含中文,建议使用escape(res.tempFilePath)转码,防止ios和安卓客户端导致的差异
  162. success: function(res) {
  163. console.log('打开文档成功');
  164. }
  165. });
  166. }
  167. },
  168. });
  169. },
  170. deleteMember(item){
  171. uni.request({
  172. url: this.$Api + "/project/deletemember",
  173. data: {
  174. "userID" : this.$UserId,
  175. "DeleteUserID":item.Id
  176. },
  177. method: "POST",
  178. dataType: "json",
  179. success: res => {
  180. console.log('res=',res)
  181. // this.projectData.splice(index,index);
  182. }
  183. })
  184. }
  185. }
  186. }
  187. </script>
  188. <style lang="scss" scoped>
  189. .s_container {
  190. width: 100%;
  191. height: 100%;
  192. background-color: #fff;
  193. }
  194. .s_logo {
  195. width: 100%;
  196. height: 1000rpx;
  197. }
  198. .s_content_container {
  199. padding: 0 206rpx;
  200. .s_title {
  201. font-weight: bold;
  202. text-align: center;
  203. line-height: 200rpx;
  204. font-size: 45rpx;
  205. }
  206. .s_content {
  207. font-weight: 500;
  208. font-size: 40rpx;
  209. line-height: 70rpx;
  210. }
  211. }
  212. .m_btn_download {
  213. height: 80rpx;
  214. line-height: 80rpx;
  215. padding: 0 70rpx;
  216. background: #EA252C;
  217. color: #fff;
  218. font-family: MicrosoftYaHei;
  219. }
  220. tbody tr {
  221. border-top: 2rpx solid #DDDDDD !important;
  222. }
  223. tbody tr th:first-child {
  224. position: relative;
  225. }
  226. tbody tr th {
  227. font-weight: 400 !important;
  228. height: 140rpx;
  229. line-height: 140rpx;
  230. }
  231. tbody tr:hover {
  232. // color: #fff;
  233. background: #FDEBEC;
  234. // opacity: 0.08;
  235. }
  236. .m-table-hander {
  237. background-color: #FFF8F7;
  238. height: 140rpx;
  239. line-height: 140rpx;
  240. font-family: MicrosoftYaHei-Bold, MicrosoftYaHei;
  241. font-weight: bold;
  242. }
  243. .m_edit {
  244. position: absolute;
  245. top: 50%;
  246. left: 50%;
  247. transform: translate(-50%, -50%);
  248. background: rgb(67, 127, 250);
  249. color: rgb(255, 255, 255);
  250. min-width: 130rpx;
  251. }
  252. .m_delete {
  253. position: absolute;
  254. top: 50%;
  255. left: 50%;
  256. min-width: 130rpx;
  257. transform: translate(-50%, -50%);
  258. background: rgb(234, 37, 44);
  259. color: rgb(255, 255, 255);
  260. }
  261. .m_yl {
  262. position: relative;
  263. }
  264. .s_table_padding {
  265. padding: 20rpx 400rpx;
  266. }
  267. .s_title {
  268. line-height: 120rpx;
  269. font-size: 40rpx;
  270. }
  271. .m_btn_download {
  272. height: 80rpx;
  273. line-height: 80rpx;
  274. padding: 0 70rpx;
  275. background: #EA252C;
  276. color: #fff;
  277. font-family: MicrosoftYaHei;
  278. }
  279. </style>