simulationCore.vue 7.2 KB

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