shot.vue 49 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669
  1. <template>
  2. <headerBar
  3. :title="configInfoStore.appModel === 1 ? '拍摄商品' : '处理图像'"
  4. showUser
  5. :menu="menu"
  6. />
  7. <hardware-check/>
  8. <div class="photography-page flex-col">
  9. <div class="main-container">
  10. <template v-if="configInfoStore.appModel === 1 ">
  11. <div class="content-wrapper flex-row">
  12. <!-- <img class="camera-image" referrerpolicy="no-referrer" src="@/assets/images/Photography/camera-icon.png" />-->
  13. <div class="step-number flex-col"><span class="text_22">1</span></div>
  14. <div class="step-one flex-col justify-between">
  15. <div class="step-header flex-row">
  16. <span class="step-title">第一步:获取商品货号</span>
  17. <img class="step-icon" referrerpolicy="no-referrer" src="@/assets/images/Photography/step1-icon.png" />
  18. <img class="step-divider" referrerpolicy="no-referrer"
  19. src="@/assets/images/Photography/step-divider-line.png" />
  20. </div>
  21. <div class="step-content flex-row justify-between">
  22. <div class="method-container flex-col">
  23. <div class="input-container flex-row">
  24. <el-input class="input-item" ref="goodsArtNo" v-model="goods_art_no" placeholder="请输入货号"> </el-input>
  25. </div>
  26. <div class="auto-method flex-row justify-between">
  27. <div class="text-method-tag flex-col"><span class="text_4">自动获取</span></div>
  28. <span class="method-description">用遥控器扫描商品资料二维码</span>
  29. </div>
  30. <div class="scan-method flex-row justify-between">
  31. <div class="remote-control flex-col">
  32. </div>
  33. <!-- <span class="scan-label">遥控器扫描键</span>-->
  34. </div>
  35. </div>
  36. <img class="remote-image" referrerpolicy="no-referrer"
  37. src="@/assets/images/Photography/remote-control.png" />
  38. </div>
  39. </div>
  40. <div class="step-number flex-col"><span class="text_22">2</span></div>
  41. <div class="step-two flex-col justify-between">
  42. <span class="step-title">第二步:启动拍摄(根据按遥控器左右键启动)</span>
  43. <div class="shooting-container flex-col">
  44. <div class="shooting-tips flex-row justify-between">
  45. <img class="info-icon" referrerpolicy="no-referrer" src="@/assets/images/Photography/info-icon.png" />
  46. <span class="tips-text">遥控左右按键可启动拍摄,中间按钮可在拍摄5张主图后解锁,用于拍摄自定义图</span>
  47. </div>
  48. <div class="wifi mar-top-20">
  49. <img referrerpolicy="no-referrer"
  50. src="@/assets/images/Photography/wifi.png" style="width: 60px" />
  51. </div>
  52. <div class="remote-control-wrap">
  53. <RemoteControl
  54. @onRemoteControl="onRemoteControl"
  55. />
  56. </div>
  57. </div>
  58. </div>
  59. </div>
  60. <div class="last-photo" v-show="showlastPhoto" v-key="lastPhoto.file_path">
  61. <!-- <div class="flex between">
  62. <div></div>
  63. <div class="flex-item">{{ lastPhoto.action_name || '' }}</div>
  64. <div class="close">
  65. <el-icon style="color: #000" @click="showlastPhoto = false" class="close-icon" v-log="{ describe: { action: '关闭最近拍照预览' } }">
  66. <Close/>
  67. </el-icon>
  68. </div>
  69. </div>-->
  70. <el-image :src="getFilePath(lastPhoto.file_path)" fit="cover" ></el-image>
  71. </div>
  72. </template>
  73. <div class="history-section flex-col"
  74. :class="configInfoStore.appModel === 2 ? 'koutu-section' : ''"
  75. >
  76. <span class="history-title flex between">
  77. <div>拍摄记录</div>
  78. <div class="c-666 fs-12" v-if="goodsList.length" >
  79. <el-button :disabled="!(runLoading || takePictureLoading)" @click="oneClickStop" v-if="configInfoStore.appModel === 1" class="input-button" type="primary" size="mini" v-log="{ describe: { action: '一键停止拍摄' } }">一键停止</el-button>
  80. <el-button :disabled="runLoading || takePictureLoading" @click="delAll" class="input-button" type="danger" size="mini" v-log="{ describe: { action: '一键删除所有记录' } }">一键删除</el-button>
  81. </div>
  82. </span>
  83. <img class="divider-line" referrerpolicy="no-referrer" src="@/assets/images/Photography/divider-line.png" />
  84. <div class="history-warp">
  85. <div v-if="!goodsList.length" class="fs-14 c-666 mar-top-50">
  86. {{ loading ? '数据正在加载中,请稍候...' : '暂无数据,请先进行拍摄'}}
  87. </div>
  88. <div v-else class="history-item clearfix" v-for="item,index in goodsList" style="padding:10px;">
  89. <div class="flex between flex-item c-333">
  90. <div class="chaochu flex-item flex left">货号:{{ item.goods_art_no }}</div>
  91. <div >
  92. <!--
  93. <el-button :disabled="runLoading || takePictureLoading" size="small" plain >高级生成</el-button>
  94. -->
  95. <el-dropdown @command="handleGenerateCommand" :disabled="runLoading || takePictureLoading" >
  96. <el-button :disabled="runLoading || takePictureLoading" size="small" plain style="margin-right: 5px" >高级生成</el-button>
  97. <template #dropdown>
  98. <el-dropdown-menu>
  99. <el-dropdown-item
  100. v-for="menu in generate.children"
  101. @click.native="onGenerateCLick(menu,item)">{{ menu.name }}</el-dropdown-item>
  102. </el-dropdown-menu>
  103. </template>
  104. </el-dropdown>
  105. <el-button size="small" :disabled="runLoading || takePictureLoading" @click="delGoods({goods_art_nos:[item.goods_art_no]})" v-log="{ describe: { action: '删除货号', goods_art_no: item.goods_art_no } }">删除</el-button>
  106. </div>
  107. </div>
  108. <div class="flex between flex-item c-333" style="margin-top: 5px">
  109. <div class="c-999 fs-12">{{ getTime(item.action_time) }}</div>
  110. <el-button size="small" :disabled="runLoading || takePictureLoading" type="primary" @click="reTakePictureNos(item.goods_art_no,item)" plain v-if="configInfoStore.appModel === 1" v-log="{ describe: { action: '重拍货号', goods_art_no: item.goods_art_no } }">重拍</el-button>
  111. </div>
  112. <div class="mar-top-10 clearfix history-item_image_wrap" style="width: 100%" >
  113. <component class="history-item_image"
  114. v-for="image,index in item.items"
  115. v-loading="!image.PhotoRecord.image_path && runAction.goods_art_no == item.goods_art_no"
  116. :is="image.PhotoRecord.image_path ? 'div' : 'p'"
  117. >
  118. <span class="tag">{{ image.action_name }}</span>
  119. <el-popover
  120. :popper-class="configInfoStore.appModel === 1 ? 'shot-image-popper' : 'koutu-image-popper'"
  121. :placement=" configInfoStore.appModel === 1 ? 'left' : 'right'"
  122. :hide-after="0"
  123. width="50%"
  124. offset="20"
  125. v-if="image.PhotoRecord.image_path"
  126. >
  127. <template #reference>
  128. <div class="flex el-image_view">
  129. <el-image :src="getFilePath(image.PhotoRecord.image_path)" fit="contain" >
  130. <template #error>
  131. <div class="image-slot"></div>
  132. </template>
  133. </el-image>
  134. <el-button :disabled="runLoading || takePictureLoading" class="reset-button" @click="reTakePicture(image.PhotoRecord)" v-log="{ describe: { action: '重拍单张图片', goods_art_no: image.PhotoRecord.goods_art_no, action_name: image.action_name } }">重拍</el-button>
  135. </div>
  136. </template>
  137. <el-image :src="getFilePath(image.PhotoRecord.image_path)" fit="contain" >
  138. <template #error>
  139. <div class="image-slot"></div>
  140. </template>
  141. </el-image>
  142. </el-popover>
  143. <div class="flex el-image_view" v-else>
  144. <el-image :src="getFilePath(image.PhotoRecord.image_path)" fit="contain">
  145. <template #error>
  146. <div class="image-slot"></div>
  147. <el-button :disabled="runLoading || takePictureLoading" class="reset-button" @click="reTakePicture(image.PhotoRecord)" v-log="{ describe: { action: '重拍单张图片', goods_art_no: image.PhotoRecord.goods_art_no, action_name: image.action_name } }">重拍</el-button>
  148. </template>
  149. </el-image>
  150. </div>
  151. </component>
  152. <div v-if="item.items.length < 5"
  153. v-for="item in (5 - item.items.length)"
  154. class="history-item_image"
  155. >
  156. <span class="tag" style="font-size: 12px;">暂未配置</span>
  157. </div>
  158. </div>
  159. </div>
  160. </div>
  161. <!-- 无数据 -->
  162. <!-- <div class="empty-state flex-col justify-between">
  163. <img
  164. class="empty-icon"
  165. referrerpolicy="no-referrer"
  166. src="@/assets/images/Photography/empty-state-icon.png"
  167. />
  168. <span class="empty-text">暂无数据</span>
  169. </div>-->
  170. <div
  171. class="next-step button--primary1 flex-col"
  172. :class="{ 'is-disabled': !goodsList.length || runLoading || takePictureLoading }"
  173. @click="(!goodsList.length || runLoading || takePictureLoading) ? null : openPhotographyDetail()"
  174. v-log="{ describe: { action: '点击开始生成' } }"
  175. >
  176. <span class="next-step-text">{{ configInfoStore.appModel === 1 ? '开始生成' : '开始生成'}}</span>
  177. </div>
  178. </div>
  179. </div>
  180. </div>
  181. </template>
  182. <script setup lang="ts">
  183. import headerBar from '@/components/header-bar/index.vue'
  184. import { ref, reactive, onMounted, onBeforeUnmount,watchEffect, computed} from 'vue'
  185. import icpList from '@/utils/ipc'
  186. import client from "@/stores/modules/client";
  187. import socket from "@/stores/modules/socket";
  188. import { ElMessage ,ElMessageBox } from 'element-plus'
  189. import { getFilePath,getRouterUrl } from '@/utils/appfun'
  190. import {useRouter} from "vue-router";
  191. import HardwareCheck from '@/components/check/index.vue'
  192. import checkInfo from "@/stores/modules/check";
  193. import RemoteControl from '@/views/RemoteControl/index'
  194. import generate from '@/utils/menus/generate'
  195. const loading = ref(false)
  196. const runLoading = ref(false)
  197. const takePictureLoading = ref(false)
  198. import { Close } from '@element-plus/icons-vue'
  199. import { clickLog, setLogInfo } from '@/utils/log'
  200. import { useRoute } from 'vue-router'
  201. import useUserInfo from "@/stores/modules/user";
  202. const useUserInfoStore = useUserInfo();
  203. const route = useRoute();
  204. import configInfo from '@/stores/modules/config';
  205. const configInfoStore = configInfo();
  206. import qiehuan from '@/components/header-bar/assets/qiehuan.svg'
  207. const menu = computed(()=>{
  208. if(configInfoStore.appModel === 2){
  209. return [
  210. {
  211. type:'setting'
  212. },
  213. {
  214. name:'切换模式',
  215. click(){
  216. configInfoStore.updateAppModel(1)
  217. Router.push({
  218. name:'PhotographyCheck'
  219. })
  220. }
  221. },
  222. {
  223. ...generate
  224. },
  225. {
  226. type:'ota'
  227. }
  228. ]
  229. }
  230. if(useUserInfoStore.userInfo.brand_company_code === '1300' || configInfoStore.appConfig.debug){
  231. return [
  232. {
  233. type:'setting'
  234. },
  235. {
  236. type:'developer'
  237. },
  238. {
  239. ...generate,
  240. },
  241. {
  242. type:'ota'
  243. }
  244. ]
  245. }
  246. return [
  247. {
  248. type:'setting'
  249. },
  250. {
  251. ...generate
  252. },
  253. {
  254. type:'ota'
  255. }
  256. ]
  257. })
  258. const clientStore = client();
  259. const Router = useRouter()
  260. /*const goodsList = ref([
  261. {
  262. "goods_art_no": "123456789",
  263. "items": [
  264. {
  265. "record_id":1,
  266. "image_deal_mode":0,
  267. "image_path": "C:\\Users\\Administrator\\Pictures\\digiCamControl\\Session1\\DSC_0001.jpg",
  268. },
  269. {
  270. "record_id":2,
  271. "image_deal_mode":0,
  272. "image_path": "C:\\Users\\Administrator\\Pictures\\digiCamControl\\Session1\\DSC_0002.jpg",
  273. },
  274. {
  275. "record_id":3,
  276. "image_deal_mode":0,
  277. "image_path": "C:\\Users\\Administrator\\Pictures\\digiCamControl\\Session1\\DSC_0003.jpg",
  278. },
  279. {
  280. "record_id":4,
  281. "image_deal_mode":0,
  282. "image_path": "C:\\Users\\Administrator\\Pictures\\digiCamControl\\Session1\\DSC_0004.jpg",
  283. },
  284. {
  285. "record_id":5,
  286. "image_deal_mode":0,
  287. "image_path": "C:\\Users\\Administrator\\Pictures\\digiCamControl\\Session1\\DSC_0005.jpg",
  288. }
  289. ]
  290. }
  291. ])*/
  292. const goodsList = ref([])
  293. const goods_art_no_tpl = ref('')
  294. const goods_art_no = ref('')
  295. const runAction = ref({
  296. "action": "",
  297. "goods_art_no": ""
  298. })
  299. // 初始化 WebSocket 状态管理
  300. const socketStore = socket()
  301. /**
  302. * 保存货号模板到货号变量中。
  303. */
  304. function saveGoodsArtNo(){
  305. if(goods_art_no_tpl.value){
  306. goods_art_no.value = goods_art_no_tpl.value
  307. ElMessage.success('商品货号'+goods_art_no.value+'获取成功,请在遥控器上按下左或右脚按键,启动拍摄')
  308. }
  309. }
  310. /**
  311. * 获取拍照记录。
  312. * @param params - 可选参数,用于分页或其他筛选条件。
  313. */
  314. async function getPhotoRecords(params?:{}) {
  315. if(loading.value) return;
  316. loading.value = true;
  317. clientStore.ipc.send(icpList.takePhoto.getPhotoRecords,{
  318. ...params,
  319. page:1,
  320. size:100,
  321. });
  322. clientStore.ipc.on(icpList.takePhoto.getPhotoRecords, (event, result) => {
  323. loading.value = false;
  324. if(result.code === 0){
  325. clientStore.ipc.removeAllListeners(icpList.takePhoto.getPhotoRecords);
  326. console.log('getPhotoRecords print_time:'+new Date().toLocaleString()) // 打印当前时间
  327. console.log('getPhotoRecords print_time:'+JSON.stringify(result.data.list)) // 打印当前时间
  328. goodsList.value = result.data.list
  329. if(isDelGoodsGetList.value){
  330. isDelGoodsGetList.value = false;
  331. return;
  332. }
  333. getLastPhotoRecord()
  334. }else if(result.msg) {
  335. ElMessage.error(result.msg)
  336. }
  337. });
  338. }
  339. /**
  340. * 执行拍照操作。
  341. * @param data - 包含拍摄所需的数据对象。
  342. */
  343. async function runGoods(data) {
  344. if(runLoading.value || takePictureLoading.value){
  345. ElMessage.error('拍摄程序正在运行,请稍候')
  346. return
  347. }
  348. await socketStore.connectSocket();
  349. socketStore.sendMessage({
  350. type: 'run_mcu',
  351. data,
  352. })
  353. runLoading.value = true;
  354. runAction.value.action = data.action
  355. runAction.value.goods_art_no = data.goods_art_no
  356. goods_art_no.value = ''
  357. goods_art_no_tpl.value = ''
  358. reNosObj.value.goods_art_no = null;
  359. reNosObj.value.action = null;
  360. clientStore.ipc.on(icpList.socket.message + '_run_mcu', (event, result) => {
  361. clientStore.ipc.removeAllListeners(icpList.socket.message + '_run_mcu');
  362. console.log('_run_mcu');
  363. console.log(result);
  364. if(result.code !== 0 && result.msg){
  365. ElMessage.error(result.msg)
  366. runLoading.value = false
  367. return;
  368. }else{
  369. ElMessage.success('开始拍摄,请稍后')
  370. }
  371. })
  372. }
  373. /**
  374. * 格式化时间字符串。
  375. * @param time - 原始时间字符串。
  376. * @returns 格式化后的时间字符串,若输入为空则返回 null。
  377. */
  378. const getTime = function(time){
  379. if(!time) return null
  380. return time.replace('T',' ').substr(5,11)
  381. }
  382. /**
  383. * 删除所有商品货号的历史记录。
  384. */
  385. async function delAll(){
  386. let params = goodsList.value.map(item=>item.goods_art_no)
  387. try {
  388. await ElMessageBox.confirm('确定要删除当下的历史记录吗?', '提示', {
  389. confirmButtonText: '确定',
  390. cancelButtonText: '取消',
  391. })
  392. await clickLog({ describe: { action: '点击确认一键删除', goods_art_nos: params } }, route)
  393. del({goods_art_nos:params})
  394. } catch (e) {
  395. await clickLog({ describe: { action: '点击取消一键删除' } }, route)
  396. }
  397. }
  398. /**
  399. * 删除指定的商品货号。
  400. * @param params - 包含需要删除的货号列表的对象。
  401. */
  402. const delGoods = async function(params){
  403. try {
  404. await ElMessageBox.confirm('确定要删除货号:'+params.goods_art_nos[0]+'的拍摄数据吗?', '提示', {
  405. confirmButtonText: '确定',
  406. cancelButtonText: '取消',
  407. })
  408. await clickLog({ describe: { action: '点击确认删除货号', goods_art_no: params.goods_art_nos?.[0] } }, route)
  409. del(params)
  410. } catch (e) {
  411. await clickLog({ describe: { action: '点击取消删除货号', goods_art_no: params.goods_art_nos?.[0] } }, route)
  412. }
  413. }
  414. /**
  415. * 删除指定的商品货号。
  416. * @param params - 包含需要删除的货号列表的对象。
  417. */
  418. const isDelGoodsGetList = ref(false)
  419. const del = async function(params){
  420. clientStore.ipc.removeAllListeners(icpList.takePhoto.delectGoodsArts);
  421. clientStore.ipc.send(icpList.takePhoto.delectGoodsArts,params);
  422. clientStore.ipc.on(icpList.takePhoto.delectGoodsArts, (event, result) => {
  423. clientStore.ipc.removeAllListeners(icpList.takePhoto.delectGoodsArts);
  424. if(result.code === 0){
  425. isDelGoodsGetList.value =true
  426. ElMessage.info('货号删除成功')
  427. getPhotoRecords()
  428. if(reNosObj.value.goods_art_no){
  429. runGoods(
  430. {
  431. "action": reNosObj.value.action,
  432. "goods_art_no":reNosObj.value.goods_art_no
  433. })
  434. }
  435. }else if(result.msg) {
  436. ElMessage.error(result.msg)
  437. }
  438. });
  439. }
  440. //单个重拍
  441. const reTakePicture = async (img)=>{
  442. if(!img.id) return;
  443. try {
  444. await ElMessageBox.confirm('此操作会先删除此数据,需要继续吗?', '提示', {
  445. confirmButtonText: '确定',
  446. cancelButtonText: '取消',
  447. })
  448. await clickLog({ describe: { action: '点击确认单张重拍', goods_art_no: img.goods_art_no, action_name: img.action_name } }, route)
  449. } catch (e) {
  450. await clickLog({ describe: { action: '点击取消单张重拍', goods_art_no: img.goods_art_no, action_name: img.action_name } }, route)
  451. return
  452. }
  453. runLoading.value = true;
  454. reNosObj.value.goods_art_no = img.goods_art_no
  455. reNosObj.value.action = 're_take_picture'
  456. let params = {
  457. id: img.action_id
  458. }
  459. clientStore.ipc.removeAllListeners(icpList.setting.getDeviceConfigDetail);
  460. clientStore.ipc.send(icpList.setting.getDeviceConfigDetail, params);
  461. clientStore.ipc.on(icpList.setting.getDeviceConfigDetail, (event, result) => {
  462. console.log('getDeviceConfigDetail')
  463. console.log(result)
  464. if(result.code == 0 && result.data){
  465. clientStore.ipc.removeAllListeners(icpList.setting.getDeviceConfigDetail);
  466. this_run_mcu_single(result.data)
  467. }else if(result.msg){
  468. runLoading.value = false;
  469. reNosObj.value.goods_art_no = ''
  470. reNosObj.value.action = ''
  471. ElMessage.error(result.msg)
  472. }
  473. });
  474. function this_run_mcu_single(data){
  475. clientStore.ipc.removeAllListeners(icpList.socket.message+'_run_mcu_single');
  476. socketStore.sendMessage({
  477. type: 'run_mcu_single',
  478. data: {
  479. camera_height: Number(data.camera_height),
  480. camera_angle: Number(data.camera_angle),
  481. led_switch:data.led_switch,
  482. id:0,
  483. mode_type:data.mode_type,
  484. turntable_position:Number(data.turntable_position),
  485. action_name:data.action_name || '测试',
  486. turntable_angle: Number(data.turntable_angle),
  487. shoe_upturn: Number(data.shoe_upturn),
  488. action_index:1,
  489. number_focus:0,
  490. take_picture:false,
  491. pre_delay:0,
  492. after_delay:0,
  493. }
  494. });
  495. clientStore.ipc.on(icpList.socket.message+'_run_mcu_single', async (event, result) => {
  496. console.log('_run_mcu_single_row')
  497. clientStore.ipc.removeAllListeners(icpList.socket.message+'_run_mcu_single');
  498. this_re_take_picture()
  499. })
  500. }
  501. async function this_re_take_picture(){
  502. await ElMessageBox.alert('已复位到该视图下,请把鞋子摆放完毕之后,点击按钮开始重拍', '提示',{
  503. confirmButtonText:"开始重拍",
  504. showClose:false,
  505. closeOnClickModal:false,
  506. closeOnPressEscape:false
  507. })
  508. await clickLog({ describe: { action: '点击开始重拍', goods_art_no: img.goods_art_no } }, route)
  509. socketStore.sendMessage({
  510. type: 'smart_shooter_photo_take',
  511. "data":{"id":img.id,"goods_art_no":img.goods_art_no},
  512. })
  513. }
  514. }
  515. const resetStatus = ()=>{
  516. runLoading.value = false;
  517. reNosObj.value.goods_art_no = ''
  518. reNosObj.value.action = ''
  519. runAction.value.goods_art_no = '';
  520. runAction.value.action = '';
  521. }
  522. const reNosObj = ref({
  523. goods_art_no:null,
  524. action:null,
  525. })
  526. //货号重拍
  527. const reTakePictureNos = async (goods_art_no,item)=>{
  528. try {
  529. await ElMessageBox.confirm('此操作会先删除删除货号:'+goods_art_no+'的拍摄数据吗,需要继续吗?', '提示', {
  530. confirmButtonText: '确定',
  531. cancelButtonText: '取消',
  532. })
  533. await clickLog({ describe: { action: '点击确认重拍货号', goods_art_no } }, route)
  534. } catch (e) {
  535. await clickLog({ describe: { action: '点击取消重拍货号', goods_art_no } }, route)
  536. return
  537. }
  538. reNosObj.value.goods_art_no = goods_art_no
  539. reNosObj.value.action = '执行左脚程序'
  540. console.log(item);
  541. if(item.items && typeof item.items === 'object' && item.items[0].PhotoRecord.image_deal_mode){
  542. reNosObj.value.action = '执行右脚程序'
  543. }
  544. del({goods_art_nos:[goods_art_no]})
  545. }
  546. /**
  547. * 检查是否可以进入下一步操作。
  548. */
  549. const next = async function(){
  550. if(runLoading.value){
  551. ElMessage.error('正在拍摄中,请稍候')
  552. return;
  553. }
  554. if(goodsList.length){
  555. ElMessage.error('请先拍摄商品。')
  556. return;
  557. }
  558. }
  559. const oneClickStop = ()=>{
  560. if(!(runLoading.value || takePictureLoading.value)){
  561. ElMessage.error('拍摄程序已结束,不需要单独停止!')
  562. return
  563. }else{
  564. socketStore.sendMessage({
  565. type: 'stop_action',
  566. })
  567. }
  568. }
  569. const goodsArtNo = ref()
  570. /**
  571. * 页面挂载时初始化事件监听器并获取初始数据。
  572. */
  573. onMounted(async () => {
  574. // 监听蓝牙扫描事件
  575. clientStore.ipc.on(icpList.socket.message + '_blue_tooth_scan', (event, result) => {
  576. console.log('_blue_tooth_scan')
  577. if (result.code === 0 && result.data?.data) {
  578. console.log(goods_art_no.value);
  579. if(!goods_art_no.value){
  580. ElMessage.error('请在左侧第一步中,先扫描货号或者手动输入货号!')
  581. goodsArtNo.value?.focus() // 聚焦输入框
  582. return;
  583. }
  584. runGoods({
  585. ...result.data?.data,
  586. goods_art_no: goods_art_no.value
  587. })
  588. }
  589. });
  590. /* window.addEventListener('storage', handleStorageEvent);*/
  591. await getPhotoRecords();
  592. // 监听图片处理完成事件
  593. clientStore.ipc.on(icpList.socket.message + '_image_process', (event, result) => {
  594. console.log('_image_process')
  595. console.log(result)
  596. getPhotoRecords()
  597. // 延迟两秒再获取一遍数据
  598. setTimeout(()=>{
  599. getPhotoRecords()
  600. },3000)
  601. })
  602. // 监听拍照完成事件
  603. clientStore.ipc.on(icpList.socket.message + '_photo_take', (event, result) => {
  604. console.log('_photo_take')
  605. console.log(result)
  606. if(result.status === 2 && result.msg.includes('执行完成')){
  607. getPhotoRecords()
  608. // 延迟两秒再获取一遍数据
  609. setTimeout(()=>{
  610. getPhotoRecords()
  611. },3000)
  612. takePictureLoading.value = false;
  613. return;
  614. }
  615. if(result.code !== 0 && result.msg){
  616. ElMessage.error(result.msg)
  617. takePictureLoading.value = false;
  618. }
  619. })
  620. // 监听一键停止
  621. clientStore.ipc.on(icpList.socket.message + '_stop_action', (event, result) => {
  622. console.log('_stop_action')
  623. console.log(result)
  624. oneClickStop()
  625. })
  626. // 监听一键停止结束
  627. clientStore.ipc.on(icpList.socket.message + '_run_mcu_stop', (event, result) => {
  628. console.log('_run_mcu_stop')
  629. resetStatus()
  630. })
  631. // 监听拍照完成后的最终状态事件
  632. clientStore.ipc.on(icpList.socket.message + '_photo_take_finish', (event, result) => {
  633. console.log('_photo_take_finish')
  634. console.log(result)
  635. if(result.code === 0) {
  636. setLogInfo(route, { action: '全部拍摄完成', goods_art_no: runAction.value.goods_art_no });
  637. runLoading.value = false;
  638. runAction.value.goods_art_no = '';
  639. runAction.value.action = '';
  640. setTimeout(()=>{
  641. showlastPhoto.value = false
  642. },3000)
  643. }
  644. })
  645. // 监听手动触发拍照事件
  646. clientStore.ipc.on(icpList.socket.message + '_handler_take_picture', async (event, result) => {
  647. console.log('_handler_take_picture')
  648. console.log(result)
  649. if(result.code === 0){
  650. if(runLoading.value || takePictureLoading.value){
  651. ElMessage.error('拍摄程序正在运行,请稍候')
  652. return
  653. }
  654. ElMessage.success('正在拍摄中,请稍候')
  655. takePictureLoading.value = true;
  656. /* setTimeout(()=>{
  657. takePictureLoading.value = false;
  658. },3000)*/
  659. await socketStore.connectSocket();
  660. socketStore.sendMessage(result.data)
  661. getPhotoRecords()
  662. // 延迟两秒再获取一遍数据
  663. setTimeout(()=>{
  664. getPhotoRecords()
  665. },3000)
  666. }
  667. })
  668. })
  669. const onRemoteControl = (type)=>{
  670. if(type == 'take_picture'){
  671. // 埋点:手动拍照
  672. clickLog({ describe: { action: '点击遥控器拍照按钮' } }, route);
  673. if(runLoading.value || takePictureLoading.value){
  674. ElMessage.error('拍摄程序正在运行,请稍候')
  675. return
  676. }
  677. ElMessage.success('正在拍摄中,请稍候')
  678. socketStore.sendMessage({
  679. type: 'handler_take_picture',
  680. })
  681. return;
  682. }
  683. if(!goods_art_no.value){
  684. ElMessage.error('请在左侧第一步中,先扫描货号或者手动输入货号!')
  685. goodsArtNo.value?.focus() // 聚焦输入框
  686. return;
  687. }
  688. let action = '执行左脚程序'
  689. if(type === 'right') action = '执行右脚程序'
  690. // 埋点:遥控器启动拍摄
  691. clickLog({ describe: { action: `点击遥控器${type === 'left' ? '左脚' : '右脚'}按钮`, goods_art_no: goods_art_no.value } }, route);
  692. runGoods({
  693. "action": action,
  694. "goods_art_no": goods_art_no.value,
  695. })
  696. }
  697. /*const handleStorageEvent = (e) => {
  698. if(e.key === 'run_mcu' && e.newValue){
  699. if(!goods_art_no.value){
  700. ElMessage.error('请先扫描货号或者手动输入货号!')
  701. localStorage.setItem('run_mcu','')
  702. return;
  703. }
  704. let action = '执行左脚程序'
  705. if(e.newValue === 'right') action = '执行右脚程序'
  706. runGoods({
  707. "action": action,
  708. "goods_art_no": goods_art_no.value,
  709. })
  710. localStorage.setItem('run_mcu','')
  711. }
  712. };*/
  713. const checkInfoStore = checkInfo()
  714. checkInfoStore.set_blue_tooth_scan_NO('')
  715. watchEffect(async ()=>{
  716. if(checkInfoStore.blue_tooth_scan_NO){
  717. ElMessage.success('商品货号'+checkInfoStore.blue_tooth_scan_NO+'获取成功,请在遥控器上按下左或右脚按键,启动拍摄')
  718. goods_art_no.value = checkInfoStore.blue_tooth_scan_NO
  719. checkInfoStore.set_blue_tooth_scan_NO('')
  720. }
  721. })
  722. /**
  723. * 页面卸载时移除所有事件监听器。
  724. */
  725. onBeforeUnmount(() => {
  726. clientStore.ipc.removeAllListeners(icpList.socket.message + '_blue_tooth_scan');
  727. clientStore.ipc.removeAllListeners(icpList.socket.message + '_image_process');
  728. clientStore.ipc.removeAllListeners(icpList.socket.message + '_run_mcu');
  729. clientStore.ipc.removeAllListeners(icpList.socket.message + '_photo_take');
  730. clientStore.ipc.removeAllListeners(icpList.socket.message + '_photo_take_finish');
  731. clientStore.ipc.removeAllListeners(icpList.socket.message + '_run_mcu_update');
  732. clientStore.ipc.removeAllListeners(icpList.socket.message + '_stop_action');
  733. clientStore.ipc.removeAllListeners(icpList.socket.message + '_smart_shooter_photo_take');
  734. clientStore.ipc.removeAllListeners(icpList.socket.message + '_run_mcu_stop');
  735. clientStore.ipc.removeAllListeners(icpList.socket.message + '_digicam_take_picture');
  736. /* window.removeEventListener('storage', handleStorageEvent);*/
  737. })
  738. /*
  739. * 打开最近一张拍摄图
  740. * */
  741. const lastPhoto = ref({})
  742. const showlastPhoto = ref(false)
  743. const getLastPhotoRecord = async ()=>{
  744. return;
  745. if(goodsList.value && goodsList.value.length === 0) return;
  746. clientStore.ipc.removeAllListeners(icpList.takePhoto.getLastPhotoRecord);
  747. clientStore.ipc.send(icpList.takePhoto.getLastPhotoRecord,);
  748. clientStore.ipc.on(icpList.takePhoto.getLastPhotoRecord, (event, result) => {
  749. console.log('getLastPhotoRecord');
  750. console.log( result.data?.goods_art_no);
  751. clientStore.ipc.removeAllListeners(icpList.takePhoto.getLastPhotoRecord);
  752. if(result.code === 0){
  753. if(lastPhoto.value?.photo_file_name){
  754. // if( lastPhoto.value?.image_path == result.data?.image_path) return;
  755. if(runAction.value.goods_art_no === result.data?.goods_art_no){
  756. showlastPhoto.value = true
  757. }
  758. }
  759. lastPhoto.value = result.data
  760. }else if(result.msg) {
  761. ElMessage.error(result.msg)
  762. }
  763. });
  764. }
  765. let smartShooterTimeout = null; // 在合适的位置定义一个全局变量用于保存定时器
  766. //拍照成功 SmartShooter
  767. clientStore.ipc.on(icpList.socket.message+'_smart_shooter_photo_take', async (event, result) => {
  768. console.log('_smart_shooter_photo_take');
  769. console.log(result);
  770. // runLoading.value = false;
  771. //
  772. if(result.code === 0){
  773. if(!result.data.goods_art_no ) return;
  774. setLogInfo(route, { action: '单张拍摄完成', goods_art_no: result.data.goods_art_no });
  775. if(reNosObj.value?.goods_art_no === result.data.goods_art_no){
  776. runLoading.value = false;
  777. }
  778. if (smartShooterTimeout) {
  779. clearTimeout(smartShooterTimeout);
  780. }
  781. setTimeout(() => {
  782. showlastPhoto.value = true;
  783. lastPhoto.value = {
  784. file_path:result.data.photo_file_name
  785. };
  786. setTimeout(()=>{
  787. if(!runAction.value.goods_art_no){
  788. showlastPhoto.value = false;
  789. }
  790. },3000)
  791. }, 100);
  792. smartShooterTimeout = setTimeout(() => {
  793. getPhotoRecords();
  794. if(!runAction.value.goods_art_no){
  795. showlastPhoto.value = false;
  796. }
  797. }, 2000);
  798. }else if(result.msg) {
  799. runLoading.value = false;
  800. reNosObj.value.goods_art_no = ''
  801. reNosObj.value.action = ''
  802. ElMessage.error(result.msg)
  803. }
  804. })
  805. // 监听拍照完成后的最终状态事件
  806. clientStore.ipc.on(icpList.socket.message + '_run_mcu_update', (event, result) => {
  807. console.log('run_mcu_updat print_time:'+new Date().toLocaleString()) // 打印当前时间
  808. console.log('run_mcu_update print_time:'+JSON.stringify(result))
  809. if(result.code === 0){
  810. if(result.data?.file_path){
  811. if( lastPhoto.value?.file_path == result.data?.file_path) return;
  812. let goods_art_no = runAction.value.goods_art_no || reNosObj.value.goods_art_no
  813. if(goods_art_no === result.data?.goods_art_no){
  814. showlastPhoto.value = true
  815. goodsList.value.map(item=>{
  816. if(item.goods_art_no === result.data?.goods_art_no){
  817. item.items[result.data.image_index].PhotoRecord.image_path = result.data?.file_path
  818. result.data.action_name = item.items[result.data.image_index].action_name
  819. setTimeout(()=>{
  820. item.items[result.data.image_index].PhotoRecord.image_path = result.data?.file_path
  821. },1000)
  822. setTimeout(()=>{
  823. showlastPhoto.value = false
  824. },3000)
  825. }
  826. })
  827. // getPhotoRecords()
  828. setTimeout(()=>{
  829. getPhotoRecords()
  830. },2000)
  831. }
  832. lastPhoto.value = result.data
  833. }
  834. }else if(result.msg) {
  835. ElMessage.error(result.msg)
  836. }
  837. if(reNosObj.value.goods_art_no){
  838. resetStatus()
  839. }
  840. })
  841. /**
  842. * 打开主图详情页面。
  843. */
  844. function openPhotographyDetail() {
  845. // 埋点:开始生成
  846. clickLog({ describe: { action: '开始生成', goods_count: goodsList.value.length, goods_art_nos: goodsList.value.map(item=>item.goods_art_no) } }, route);
  847. if(runLoading.value || takePictureLoading.value){
  848. ElMessage.error('正在拍摄中,请稍候')
  849. return;
  850. }
  851. const { href } = Router.resolve({
  852. name: 'PhotographyDetail',
  853. query:{
  854. goods_art_nos:goodsList.value.map(item=>item.goods_art_no),
  855. }
  856. })
  857. clientStore.ipc.removeAllListeners(icpList.utils.openMain);
  858. let params = {
  859. title: '主图与详情生成',
  860. width: 1000,
  861. height: 630,
  862. frame: true,
  863. id: "PhotographyDetail",
  864. url: getRouterUrl(href)
  865. }
  866. clientStore.ipc.send(icpList.utils.openMain, params);
  867. }
  868. /*高级生成*/
  869. const onGenerateCLick = (menu,item)=>{
  870. if(menu.name === '历史记录'){
  871. menu.click()
  872. return
  873. }
  874. const firstWithImagePath = item.items.find(
  875. (image) => image.PhotoRecord.image_path
  876. );
  877. if (firstWithImagePath) {
  878. menu.click({
  879. query:{
  880. image_path:firstWithImagePath.PhotoRecord.image_path
  881. }
  882. })
  883. } else {
  884. menu.click()
  885. }
  886. }
  887. </script>
  888. <style lang="scss">
  889. .shot-image-popper {
  890. width: calc(100vw - 470px) !important;
  891. left: 70px !important;
  892. top: 100px !important;
  893. height: calc(100vh - 170px) !important;
  894. transform: translate(0px, 0px) !important;
  895. .el-image {
  896. width: 100%;
  897. height:100%;
  898. display: block;
  899. .el-image__inner {
  900. width: 100%;
  901. height:100%;
  902. display: block;
  903. }
  904. }
  905. }
  906. </style>
  907. <style scoped lang="scss">
  908. .photography-page {
  909. background-color: rgba(255, 255, 255, 1);
  910. position: relative;
  911. .main-container {
  912. position: relative;
  913. display: flex;
  914. .content-wrapper {
  915. flex-grow: 1 ;
  916. position: relative;
  917. top: 0;
  918. left: 0;
  919. right: 0;
  920. bottom: 0;
  921. margin: auto;
  922. justify-content: center;
  923. .step-number {
  924. background-color: rgba(22, 119, 255, 1);
  925. border-radius: 50%;
  926. height: 32px;
  927. margin-top: 51px;
  928. width: 32px;
  929. .text_22 {
  930. width: 6px;
  931. height: 22px;
  932. overflow-wrap: break-word;
  933. color: rgba(255, 255, 255, 1);
  934. font-size: 14px;
  935. font-weight: NaN;
  936. text-align: right;
  937. white-space: nowrap;
  938. line-height: 22px;
  939. margin: 5px 0 0 13px;
  940. }
  941. }
  942. .step-one {
  943. width: 426px;
  944. height: 521px;
  945. margin: 55px 0 0 5px;
  946. .step-header {
  947. width: 391px;
  948. height: 24px;
  949. margin-left: 3px;
  950. .step-title {
  951. width: 160px;
  952. height: 24px;
  953. overflow-wrap: break-word;
  954. color: rgba(0, 0, 0, 0.85);
  955. font-size: 16px;
  956. font-family: PingFangSC-Medium;
  957. font-weight: 500;
  958. text-align: left;
  959. white-space: nowrap;
  960. line-height: 24px;
  961. }
  962. .step-icon {
  963. width: 32px;
  964. height: 20px;
  965. margin-top: 4px;
  966. }
  967. .step-divider {
  968. width: 191px;
  969. height: 1px;
  970. margin: 13px 0 0 8px;
  971. }
  972. }
  973. .step-content {
  974. width: 426px;
  975. height: 469px;
  976. margin-top: 28px;
  977. .method-container {
  978. background-color: rgba(247, 247, 247, 1);
  979. height: 484px;
  980. width: 353px;
  981. .auto-method {
  982. width: 253px;
  983. height: 24px;
  984. margin: 28px 0 0 14px;
  985. .text-method-tag {
  986. background-color: rgba(0, 174, 30, 1);
  987. height: 24px;
  988. width: 65px;
  989. .text_4 {
  990. width: 56px;
  991. height: 20px;
  992. overflow-wrap: break-word;
  993. color: rgba(255, 255, 255, 1);
  994. font-size: 14px;
  995. font-family: PingFangSC-Semibold;
  996. font-weight: 600;
  997. text-align: left;
  998. white-space: nowrap;
  999. line-height: 20px;
  1000. margin: 2px 0 0 4px;
  1001. }
  1002. }
  1003. .method-description {
  1004. width: 182px;
  1005. height: 20px;
  1006. overflow-wrap: break-word;
  1007. color: rgba(71, 71, 71, 1);
  1008. font-size: 14px;
  1009. font-family: PingFangSC-Semibold;
  1010. font-weight: 600;
  1011. text-align: left;
  1012. white-space: nowrap;
  1013. line-height: 20px;
  1014. margin-top: 2px;
  1015. }
  1016. }
  1017. .scan-method {
  1018. width: 350px;
  1019. height: 350px;
  1020. margin: 10px;
  1021. .remote-control {
  1022. width: 350px;
  1023. height: 350px;
  1024. background: url(@/assets/images/Photography/left.png) 0px 0px no-repeat;
  1025. background-size: 300px 300px;
  1026. position: relative;
  1027. .scan-button {
  1028. background-color: rgba(0, 174, 30, 1);
  1029. border-radius: 50%;
  1030. width: 27px;
  1031. height: 27px;
  1032. margin: 27px 0 0 34px;
  1033. }
  1034. .scan-line {
  1035. position: absolute;
  1036. left: 52px;
  1037. top: 40px;
  1038. width: 112px;
  1039. height: 1px;
  1040. }
  1041. }
  1042. .scan-label {
  1043. width: 96px;
  1044. height: 22px;
  1045. overflow-wrap: break-word;
  1046. color: rgba(0, 174, 30, 1);
  1047. font-size: 16px;
  1048. font-family: PingFangSC-Semibold;
  1049. font-weight: 600;
  1050. text-align: left;
  1051. white-space: nowrap;
  1052. line-height: 22px;
  1053. margin-top: 30px;
  1054. }
  1055. }
  1056. .manual-method {
  1057. width: 155px;
  1058. height: 24px;
  1059. margin: 53px 0 0 14px;
  1060. .method-tag {
  1061. background-color: rgba(0, 148, 174, 1);
  1062. height: 24px;
  1063. width: 65px;
  1064. .text_7 {
  1065. width: 56px;
  1066. height: 20px;
  1067. overflow-wrap: break-word;
  1068. color: rgba(255, 255, 255, 1);
  1069. font-size: 14px;
  1070. font-family: PingFangSC-Semibold;
  1071. font-weight: 600;
  1072. text-align: left;
  1073. white-space: nowrap;
  1074. line-height: 20px;
  1075. margin: 2px 0 0 4px;
  1076. }
  1077. }
  1078. .method-description {
  1079. width: 84px;
  1080. height: 20px;
  1081. overflow-wrap: break-word;
  1082. color: rgba(71, 71, 71, 1);
  1083. font-size: 14px;
  1084. font-family: PingFangSC-Semibold;
  1085. font-weight: 600;
  1086. text-align: left;
  1087. white-space: nowrap;
  1088. line-height: 20px;
  1089. margin-top: 2px;
  1090. }
  1091. }
  1092. .input-container {
  1093. width: calc(100% - 20px );
  1094. height: 36px;
  1095. margin: 20px 10px 0;
  1096. .input-item {
  1097. :deep(.el-input__inner){
  1098. height: 36px;
  1099. line-height: 36px;
  1100. }
  1101. }
  1102. }
  1103. }
  1104. .remote-image {
  1105. width: 61px;
  1106. height: 38px;
  1107. margin-top: 216px;
  1108. }
  1109. }
  1110. }
  1111. .step-two {
  1112. width: 384px;
  1113. height: 521px;
  1114. margin: 55px 0 0 7px;
  1115. .step-title {
  1116. width: 384px;
  1117. height: 24px;
  1118. overflow-wrap: break-word;
  1119. color: rgba(0, 0, 0, 0.85);
  1120. font-size: 16px;
  1121. font-family: PingFangSC-Medium;
  1122. font-weight: 500;
  1123. text-align: left;
  1124. white-space: nowrap;
  1125. line-height: 24px;
  1126. }
  1127. .shooting-container {
  1128. background-color: rgba(247, 247, 247, 1);
  1129. width: 353px;
  1130. height: 484px;
  1131. margin: 28px 0 0 2px;
  1132. .remote-control-wrap {
  1133. width: 353px;
  1134. height: 300px;
  1135. }
  1136. .shooting-tips {
  1137. width: 325px;
  1138. height: 40px;
  1139. margin: 12px 0 0 15px;
  1140. .info-icon {
  1141. width: 16px;
  1142. height: 16px;
  1143. margin-top: 2px;
  1144. }
  1145. .tips-text {
  1146. width: 302px;
  1147. height: 40px;
  1148. overflow-wrap: break-word;
  1149. color: rgba(255, 76, 0, 1);
  1150. font-size: 14px;
  1151. font-weight: NaN;
  1152. text-align: left;
  1153. line-height: 20px;
  1154. }
  1155. }
  1156. .left-foot-text {
  1157. width: 240px;
  1158. height: 22px;
  1159. overflow-wrap: break-word;
  1160. color: rgba(0, 174, 30, 1);
  1161. font-size: 16px;
  1162. font-family: PingFangSC-Semibold;
  1163. font-weight: 600;
  1164. text-align: left;
  1165. white-space: nowrap;
  1166. line-height: 22px;
  1167. margin: 36px 0 0 9px;
  1168. }
  1169. .remote-control-container {
  1170. position: relative;
  1171. width: 280px;
  1172. height: 298px;
  1173. margin: 9px 0 0 35px;
  1174. .remote-buttons {
  1175. width: 206px;
  1176. height: 233px;
  1177. background: url(@/assets/images/Photography/right-button.png) 100% no-repeat;
  1178. background-size: 100% 100%;
  1179. margin: 30px 0 0 37px;
  1180. .left-button {
  1181. background-color: rgba(0, 174, 30, 1);
  1182. border-radius: 50%;
  1183. width: 55px;
  1184. height: 55px;
  1185. margin: 91px 0 0 1px;
  1186. }
  1187. .right-button {
  1188. background-color: rgba(0, 148, 174, 1);
  1189. border-radius: 50%;
  1190. width: 55px;
  1191. height: 55px;
  1192. margin: 91px 2px 0 93px;
  1193. }
  1194. }
  1195. .left-button-image {
  1196. width: 40px;
  1197. height: 148px;
  1198. margin: 150px 0 0 -3px;
  1199. }
  1200. .right-button-image {
  1201. position: absolute;
  1202. left: 0;
  1203. top: 0;
  1204. width: 40px;
  1205. height: 148px;
  1206. }
  1207. }
  1208. .right-foot-text {
  1209. width: 240px;
  1210. height: 22px;
  1211. overflow-wrap: break-word;
  1212. color: rgba(0, 148, 174, 1);
  1213. font-size: 16px;
  1214. font-family: PingFangSC-Semibold;
  1215. font-weight: 600;
  1216. text-align: left;
  1217. white-space: nowrap;
  1218. line-height: 22px;
  1219. margin: 12px 0 18px 98px;
  1220. }
  1221. }
  1222. }
  1223. }
  1224. .camera-image {
  1225. position: absolute;
  1226. left: 620px;
  1227. top: 220px;
  1228. width: 111px;
  1229. height: 111px;
  1230. }
  1231. .step-number-two {
  1232. background-color: rgba(22, 119, 255, 1);
  1233. border-radius: 50%;
  1234. height: 32px;
  1235. width: 32px;
  1236. position: absolute;
  1237. left: 450px;
  1238. top: 51px;
  1239. .step-text {
  1240. width: 9px;
  1241. height: 22px;
  1242. overflow-wrap: break-word;
  1243. color: rgba(255, 255, 255, 1);
  1244. font-size: 14px;
  1245. font-weight: NaN;
  1246. text-align: right;
  1247. white-space: nowrap;
  1248. line-height: 22px;
  1249. margin: 5px 0 0 12px;
  1250. }
  1251. }
  1252. }
  1253. }
  1254. .history-section {
  1255. background-color: rgba(234, 236, 237, 1);
  1256. width: 332px;
  1257. height: calc(100vh - 30px);
  1258. &.koutu-section {
  1259. width: 100%;
  1260. .reset-button {
  1261. display: none !important;
  1262. }
  1263. }
  1264. .history-title {
  1265. width: calc(100% - 20px);
  1266. height: 22px;
  1267. overflow-wrap: break-word;
  1268. color: rgba(51, 51, 51, 1);
  1269. font-size: 16px;
  1270. font-family: PingFangSC-Semibold;
  1271. font-weight: 600;
  1272. text-align: center;
  1273. white-space: nowrap;
  1274. line-height: 22px;
  1275. margin: 9px 0 0 10px;
  1276. }
  1277. .divider-line {
  1278. width: 100%;
  1279. height: 1px;
  1280. margin-top: 9px;
  1281. }
  1282. .history-warp {
  1283. flex-grow: 1;
  1284. overflow: auto;
  1285. height: calc(100% - 125px);
  1286. .history-item {
  1287. .history-item_image_wrap {
  1288. padding-bottom: 20px;
  1289. border-bottom: 1px solid #CCCCCC;
  1290. }
  1291. .history-item_image {
  1292. .tag {
  1293. color: #bbb;
  1294. position: absolute;
  1295. left: 0;
  1296. right: 0;
  1297. top:50%;
  1298. margin-top: -15px;
  1299. line-height: 20px;
  1300. }
  1301. /* &:nth-child(1)::before{
  1302. content:"俯视图";
  1303. }
  1304. &:nth-child(2)::before{
  1305. content:"侧视图";
  1306. }
  1307. &:nth-child(3)::before{
  1308. content:"后视图";
  1309. }
  1310. &:nth-child(4)::before{
  1311. content:"鞋底";
  1312. }
  1313. &:nth-child(5)::before{
  1314. content:"内里";
  1315. }*/
  1316. position: relative;
  1317. width: 70px;
  1318. height: 70px;
  1319. float: left;
  1320. margin: 6px 0 0 6px;
  1321. background: #F7F7F7;
  1322. .el-image {
  1323. display: block;
  1324. width:100%;
  1325. height: 100%;
  1326. }
  1327. &:first-child {
  1328. width: 146px;
  1329. height: 146px;
  1330. }
  1331. &.el-loading-parent--relative{
  1332. ::v-deep {
  1333. .el-loading-mask { display: none}
  1334. }
  1335. }
  1336. }
  1337. .el-image_view {
  1338. display: flex;
  1339. width: 100%;
  1340. height: 100%;
  1341. .reset-button {
  1342. width: 40px;
  1343. text-align: center;
  1344. height: 20px;
  1345. position: absolute;
  1346. left:50%;
  1347. top:50%;
  1348. padding: 0px;
  1349. margin-left:-20px;
  1350. margin-top:-10px;
  1351. color: #ffffff;
  1352. font-size: 14px;
  1353. background: rgba(0,0,0,0.6);
  1354. border-radius: 12px;
  1355. display: none;
  1356. cursor: pointer;
  1357. }
  1358. &:hover {
  1359. .reset-button {
  1360. display: block;
  1361. }
  1362. }
  1363. }
  1364. p:first-of-type {
  1365. ::v-deep {
  1366. .el-loading-mask { display: block !important;}
  1367. }
  1368. }
  1369. }
  1370. }
  1371. .empty-state {
  1372. width: 56px;
  1373. height: 48px;
  1374. .empty-icon {
  1375. width: 32px;
  1376. height: 18px;
  1377. margin-left: 12px;
  1378. }
  1379. .empty-text {
  1380. width: 56px;
  1381. height: 20px;
  1382. overflow-wrap: break-word;
  1383. color: rgba(153, 153, 153, 1);
  1384. font-size: 14px;
  1385. font-weight: NaN;
  1386. text-align: left;
  1387. white-space: nowrap;
  1388. line-height: 20px;
  1389. margin-top: 10px;
  1390. }
  1391. }
  1392. .next-step {
  1393. height: 50px;
  1394. background-size: 100% 100%;
  1395. width: 100%;
  1396. line-height: 50px;
  1397. cursor: pointer;
  1398. &.is-disabled {
  1399. opacity: 0.5;
  1400. cursor: not-allowed;
  1401. pointer-events: none;
  1402. }
  1403. .next-step-text {
  1404. width: 100%;
  1405. overflow-wrap: break-word;
  1406. color: rgba(255, 255, 255, 1);
  1407. text-align: center;
  1408. white-space: nowrap;
  1409. }
  1410. }
  1411. }
  1412. .last-photo{
  1413. position: fixed;
  1414. padding: 10px;
  1415. box-shadow: 0 0 5px rgb(0 0 0 / 50%);
  1416. left: 70px;
  1417. top: 100px;
  1418. bottom: 60px;
  1419. right: 400px;
  1420. z-index: 10;
  1421. .close {
  1422. position: absolute;
  1423. right: -7px;
  1424. top: -1px;
  1425. background: #fff;
  1426. width: 30px;
  1427. height: 30px;
  1428. border-radius: 30px;
  1429. z-index: 11;
  1430. text-align: center;
  1431. line-height: 30px;
  1432. box-shadow: 0 0 5px rgb(0 0 0 / 50%);
  1433. }
  1434. .el-image {
  1435. width: 100%;
  1436. height:100%;
  1437. display: block;
  1438. .el-image__inner {
  1439. width: 100%;
  1440. height:100%;
  1441. display: block;
  1442. }
  1443. }
  1444. }
  1445. </style>