shot.vue 44 KB

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