index.vue 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550
  1. <template>
  2. <el-card class="box-card">
  3. <byForm :formConfig="formConfig" :formOption="formOption" v-model="formData.data" :rules="rules" ref="submit">
  4. <template #detail>
  5. <div style="width: 100%; padding: 0 20px">
  6. <el-table :data="[formData.data]" :row-style="{ height: '35px' }" header-row-class-name="tableHeader" border>
  7. <el-table-column label="产品基础信息" width="320">
  8. <template #default="{ row }">
  9. <div style="line-height: 35px">
  10. <span style="color: black; font-weight: 700">商品名称: </span>
  11. <span>{{ row.skuSpecName }}</span>
  12. </div>
  13. <div style="line-height: 35px">
  14. <span style="color: black; font-weight: 700">产品尺寸: </span>
  15. <span>{{ row.length }} * {{ row.width }} * {{ row.height }}</span>
  16. </div>
  17. <div style="line-height: 35px">
  18. <span style="color: black; font-weight: 700">SKU品号: </span>
  19. <span>{{ row.skuSpecCode }}</span>
  20. </div>
  21. <div style="line-height: 35px">
  22. <span style="color: black; font-weight: 700">BOM品号: </span>
  23. <span>{{ row.bomSpecCode }}</span>
  24. </div>
  25. </template>
  26. </el-table-column>
  27. <el-table-column label="客户定制图样" width="260">
  28. <template #default="{ row }">
  29. <div style="display: flex; width: 100%">
  30. <div style="width: 60px; height: 32px; line-height: 32px">设计图:</div>
  31. <div style="width: calc(100% - 60px)">
  32. <el-image
  33. fit="scale-down"
  34. style="width: 160px; border: 1px solid #ccc; cursor: pointer"
  35. v-if="row.blueprint"
  36. :src="row.blueprint"
  37. @click="openFile(row.blueprint)">
  38. <template #error>
  39. <div class="image-slot">
  40. <el-icon><Picture /></el-icon>
  41. </div>
  42. </template>
  43. </el-image>
  44. <el-button type="primary" @click="clickToView()" text>查看定制图样</el-button>
  45. </div>
  46. </div>
  47. </template>
  48. </el-table-column>
  49. <el-table-column label="设计样图" width="280">
  50. <template #default="{ row }">
  51. <div style="display: flex; width: 100%">
  52. <div style="width: 70px; height: 32px; line-height: 32px">设计样图:</div>
  53. <div style="width: calc(100% - 70px)">
  54. <el-image
  55. fit="scale-down"
  56. style="width: 160px; border: 1px solid #ccc; cursor: pointer"
  57. v-if="row.proofingImg"
  58. :src="row.proofingImg"
  59. @click="openFile(row.proofingImg)">
  60. </el-image>
  61. <el-upload
  62. :show-file-list="false"
  63. action="https://winfaster.obs.cn-south-1.myhuaweicloud.com"
  64. :data="uploadImgData"
  65. :before-upload="uploadImgFile"
  66. :on-success="handleImgSuccess"
  67. style="width: 100%"
  68. accept=".jpg,.jpeg,.png,.GIF,.JPG,.PNG">
  69. <el-button type="primary" text>上传图片</el-button>
  70. </el-upload>
  71. </div>
  72. </div>
  73. <div style="display: flex; margin-top: 20px; width: 100%">
  74. <div style="width: 70px; height: 32px; line-height: 32px">图稿文件:</div>
  75. <div style="width: calc(100% - 70px); line-height: 32px">
  76. <a
  77. style="color: #409eff; cursor: pointer; word-break: break-all; margin-right: 10px"
  78. @click="openFile(row.productionDocument)"
  79. v-if="row.productionDocument">
  80. {{ row.productionDocument }}
  81. </a>
  82. <el-upload
  83. :show-file-list="false"
  84. action="https://winfaster.obs.cn-south-1.myhuaweicloud.com"
  85. :data="uploadData"
  86. :before-upload="uploadFile"
  87. :on-success="handleSuccess"
  88. style="width: 100%">
  89. <el-button type="primary" text>上传ez3/dxf文件</el-button>
  90. </el-upload>
  91. </div>
  92. </div>
  93. </template>
  94. </el-table-column>
  95. <el-table-column label="图稿确认历史" min-width="500">
  96. <template #default="{}">
  97. <div style="width: 100%">
  98. <el-table :data="logList" :row-style="{ height: '35px' }" header-row-class-name="tableHeader">
  99. <el-table-column label="时间" prop="createTime" width="160" />
  100. <el-table-column label="操作人" prop="operator" width="140" />
  101. <el-table-column label="类型" width="120">
  102. <template #default="{ row }">
  103. <div>{{ dictKeyValue(row.type, logType) }}</div>
  104. </template>
  105. </el-table-column>
  106. <el-table-column label="备注" prop="remark" />
  107. </el-table>
  108. </div>
  109. </template>
  110. </el-table-column>
  111. </el-table>
  112. </div>
  113. </template>
  114. </byForm>
  115. <div style="padding: 10px 0; text-align: center">
  116. <el-button style="width: 120px" @click="clickCancel()" v-preReClick>取 消</el-button>
  117. <el-button type="primary" style="width: 120px" @click="clickSubmit()" v-preReClick>提交图稿</el-button>
  118. </div>
  119. <el-dialog title="定制图样" v-if="openDrawing" v-model="openDrawing" width="70%">
  120. <div style="height: calc(100vh - 94px); overflow: auto; display: flex; align-items: center; justify-content: center; position: relative">
  121. <div style="position: absolute; left: 10px; top: 10px">
  122. <div style="font-size: 20; font-weight: 700">裸垫参数:</div>
  123. <div style="margin: 4px 8px 4px">长: {{ formData.data.length }}cm</div>
  124. <div style="margin: 4px 8px 4px">宽: {{ formData.data.width }}cm</div>
  125. <div style="margin-top: 16px; font-size: 20; font-weight: 700">元素参数:</div>
  126. <div style="margin: 4px 8px 4px">长: {{ elLength }}cm</div>
  127. <div style="margin: 4px 8px 4px">宽: {{ elWidth }}cm</div>
  128. <div style="margin: 4px 8px 4px">旋转角度: {{ elAngle }}</div>
  129. <div style="margin-top: 16px; font-size: 20; font-weight: 700">比例:</div>
  130. <div style="margin: 4px 8px 4px">{{ ratio }}px : 1cm</div>
  131. </div>
  132. <div style="width: 757px; height: 813px; border: 2px dashed #bdbdbd" ref="mainDIV">
  133. <div style="position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%)">
  134. <canvas ref="canvas" :width="width" :height="height" style="border: 1px solid #ccc"></canvas>
  135. </div>
  136. </div>
  137. </div>
  138. </el-dialog>
  139. </el-card>
  140. </template>
  141. <script setup>
  142. import { useRoute, useRouter } from "vue-router";
  143. import useTagsViewStore from "/src/store/modules/tagsView.js";
  144. import byForm from "/src/components/byForm/index";
  145. import { nextTick } from "vue";
  146. import { ElMessage } from "element-plus";
  147. const { proxy } = getCurrentInstance();
  148. const route = useRoute();
  149. const router = useRouter();
  150. const formOption = reactive({
  151. inline: true,
  152. labelWidth: "100px",
  153. itemWidth: 100,
  154. rules: [],
  155. labelPosition: "right",
  156. });
  157. const formConfig = computed(() => {
  158. return [
  159. {
  160. type: "title",
  161. title: "产品",
  162. label: "",
  163. },
  164. {
  165. type: "slot",
  166. slotName: "detail",
  167. },
  168. ];
  169. });
  170. const formData = reactive({
  171. data: {},
  172. });
  173. const rules = ref({
  174. isProofing: [{ required: true, message: "请选择是否打样", trigger: "change" }],
  175. quantity: [{ required: true, message: "请输入数量", trigger: "blur" }],
  176. consignee: [{ required: true, message: "请输入联系人", trigger: "blur" }],
  177. consigneeNumber: [{ required: true, message: "请输入联系人电话", trigger: "blur" }],
  178. province: [{ required: true, message: "请输入省", trigger: "blur" }],
  179. city: [{ required: true, message: "请输入市", trigger: "blur" }],
  180. county: [{ required: true, message: "请输入区/县", trigger: "blur" }],
  181. streetCode: [{ required: true, message: "请输入街道", trigger: "blur" }],
  182. detailedAddress: [{ required: true, message: "请输入详细地址", trigger: "blur" }],
  183. skuCode: [{ required: true, message: "请输入SKU品号", trigger: "blur" }],
  184. });
  185. const logList = ref([]);
  186. const logType = ref([
  187. { dictKey: 10, dictValue: "上传设计图" },
  188. { dictKey: 20, dictValue: "上传打样图" },
  189. { dictKey: 21, dictValue: "上传打样图稿" },
  190. { dictKey: 22, dictValue: "驳回打样图稿" },
  191. { dictKey: 30, dictValue: "确认打样图" },
  192. { dictKey: 40, dictValue: "上传设计图稿" },
  193. ]);
  194. const submit = ref(null);
  195. onMounted(() => {
  196. if (route.query && route.query.id) {
  197. proxy.post("/orderSkuArtworkMake/detail", { id: route.query.id }).then((res) => {
  198. formData.data = res;
  199. proxy.post("/orderSkuArtworkLog/list", { orderSkuId: res.orderSkuId }).then((res) => {
  200. logList.value = res;
  201. });
  202. });
  203. }
  204. });
  205. const openFile = (path) => {
  206. window.open(path, "_blank");
  207. };
  208. const uploadImgData = ref({});
  209. const uploadImgFile = async (file) => {
  210. const res = await proxy.post("/fileInfo/getSing", { fileName: file.name });
  211. uploadImgData.value = res.uploadBody;
  212. file.id = res.id;
  213. file.fileName = res.fileName;
  214. file.fileUrl = res.fileUrl;
  215. return true;
  216. };
  217. const handleImgSuccess = (response, UploadFile) => {
  218. formData.data.proofingImg = UploadFile.raw.fileUrl;
  219. };
  220. const uploadData = ref({});
  221. const uploadFile = async (file) => {
  222. const res = await proxy.post("/fileInfo/getSing", { fileName: file.name });
  223. uploadData.value = res.uploadBody;
  224. file.id = res.id;
  225. file.fileName = res.fileName;
  226. file.fileUrl = res.fileUrl;
  227. return true;
  228. };
  229. const handleSuccess = (response, UploadFile) => {
  230. formData.data.productionDocument = UploadFile.raw.fileUrl;
  231. };
  232. const openDrawing = ref(false);
  233. const width = ref(0);
  234. const height = ref(0);
  235. const ratio = ref(1);
  236. const canvas = ref(null);
  237. const ctx = ref("");
  238. const clickCoordinate = { x: 0, y: 0 };
  239. /** 图片数据 名字 位置等 */
  240. const imagesData = ref([]);
  241. const elLength = ref("");
  242. const elWidth = ref("");
  243. const elAngle = ref("");
  244. const elCoordinates = ref([]);
  245. const init = () => {
  246. ctx.value = canvas.value.getContext("2d");
  247. canvas.value.addEventListener("mousedown", mousedownFn, false);
  248. let list = JSON.parse(formData.data.blueprintDetails)[0].imagesData;
  249. if (list && list.length > 0) {
  250. for (let i = 0; i < list.length; i++) {
  251. if (list[i].imgStatus) {
  252. let img = new Image();
  253. img.setAttribute("crossOrigin", "anonymous");
  254. img.src = list[i].imgUrl.replace("https://os.winfaster.cn/sd_sell", import.meta.env.VITE_APP_IPS + "/sd_sell");
  255. img.onload = function () {
  256. const obj = { ...list[i], img };
  257. imagesData.value.push(obj);
  258. drawByObj(obj);
  259. };
  260. } else {
  261. imagesData.value.push(list[i]);
  262. drawText(list[i]);
  263. }
  264. }
  265. }
  266. };
  267. const drawByObj = (obj) => {
  268. if (obj.selectStatus) {
  269. drawGuideByObj(obj);
  270. }
  271. ctx.value.save(); // 保存旧的坐标系状态
  272. ctx.value.translate(obj.x + obj.w / 2, obj.y + obj.h / 2); // 坐标原点移动到旋转中心
  273. ctx.value.rotate((obj.angle * Math.PI) / 180); // 旋转坐标系
  274. if (obj.verticalMirrorStatus) {
  275. ctx.value.scale(1, -1); //上下镜像翻转
  276. }
  277. if (obj.horizontalMirrorStatus) {
  278. ctx.value.scale(-1, 1); //左右镜像翻转
  279. }
  280. ctx.value.translate(-(obj.x + obj.w / 2), -(obj.y + obj.h / 2)); // 坐标原点还原
  281. ctx.value.drawImage(obj.img, obj.x, obj.y, obj.w, obj.h);
  282. ctx.value.restore(); // 还原之前的坐标系状态
  283. };
  284. const drawGuideByObj = (obj) => {
  285. if (obj.imgStatus) {
  286. ctx.value.save(); // 保存旧的坐标系状态
  287. ctx.value.beginPath();
  288. ctx.value.lineWidth = 4;
  289. ctx.value.strokeStyle = "green";
  290. ctx.value.translate(obj.x + obj.w / 2, obj.y + obj.h / 2); // 坐标原点移动到旋转中心
  291. ctx.value.rotate((obj.angle * Math.PI) / 180); // 旋转坐标系
  292. ctx.value.translate(-(obj.x + obj.w / 2), -(obj.y + obj.h / 2)); // 坐标原点还原
  293. ctx.value.rect(obj.x, obj.y, obj.w, obj.h); // 以新坐标系为参照,画出矩形。
  294. ctx.value.stroke();
  295. ctx.value.restore(); // 还原之前的坐标系状态
  296. } else {
  297. let textPixel = getStringPixel(obj.text, obj.size + "px 宋体");
  298. let textWidth = textPixel.width;
  299. let fontHeight = textPixel.fontBoundingBoxAscent + textPixel.fontBoundingBoxDescent;
  300. ctx.value.save(); // 保存旧的坐标系状态
  301. ctx.value.beginPath();
  302. ctx.value.lineWidth = 2;
  303. ctx.value.strokeStyle = "green";
  304. ctx.value.translate(obj.x + textWidth / 2, obj.y - fontHeight / 2); // 坐标原点移动到旋转中心
  305. ctx.value.rotate((obj.angle * Math.PI) / 180); // 旋转坐标系
  306. ctx.value.translate(-(obj.x + textWidth / 2), -(obj.y - fontHeight / 2)); // 坐标原点还原
  307. ctx.value.rect(obj.x, obj.y - fontHeight, textWidth, fontHeight); // 以新坐标系为参照,画出矩形。
  308. ctx.value.stroke();
  309. ctx.value.restore(); // 还原之前的坐标系状态
  310. }
  311. };
  312. const mousedownFn = (e) => {
  313. clickCoordinate.x = e.offsetX - canvas.value.offsetLeft;
  314. clickCoordinate.y = e.offsetY - canvas.value.offsetTop;
  315. checkElement();
  316. };
  317. const getStringPixel = (text, font) => {
  318. ctx.value.font = font;
  319. return ctx.value.measureText(text);
  320. };
  321. const drawText = (obj) => {
  322. if (obj.selectStatus) {
  323. drawGuideByObj(obj);
  324. }
  325. let textPixel = getStringPixel(obj.text, obj.size + "px 宋体");
  326. let textWidth = textPixel.width;
  327. let fontHeight = textPixel.fontBoundingBoxAscent + textPixel.fontBoundingBoxDescent;
  328. ctx.value.save(); // 保存旧的坐标系状态
  329. ctx.value.translate(obj.x + textWidth / 2, obj.y - fontHeight / 2); // 坐标原点移动到旋转中心
  330. ctx.value.rotate((obj.angle * Math.PI) / 180); // 旋转坐标系
  331. if (obj.verticalMirrorStatus) {
  332. ctx.value.scale(1, -1); //上下镜像翻转
  333. }
  334. if (obj.horizontalMirrorStatus) {
  335. ctx.value.scale(-1, 1); //左右镜像翻转
  336. }
  337. ctx.value.translate(-(obj.x + textWidth / 2), -(obj.y - fontHeight / 2)); // 坐标原点还原
  338. ctx.value.beginPath();
  339. ctx.value.font = obj.size + "px 宋体";
  340. ctx.value.fillStyle = obj.color;
  341. ctx.value.textBaseline = "bottom";
  342. ctx.value.textAlign = "start";
  343. ctx.value.fillText(obj.text, obj.x, obj.y);
  344. ctx.value.restore(); // 还原之前的坐标系状态
  345. };
  346. const repaint = () => {
  347. // 清空画布
  348. ctx.value.clearRect(0, 0, 2 * canvas.value.width, 2 * canvas.value.height);
  349. // 清空画布以后重新绘制
  350. imagesData.value.forEach((i) => {
  351. if (i.imgStatus) {
  352. drawByObj(i);
  353. } else {
  354. drawText(i);
  355. }
  356. });
  357. nextTick(() => {
  358. elCoordinates.value.forEach((i) => {
  359. if (i.textStatus) {
  360. ctx.value.beginPath();
  361. ctx.value.font = "14px 宋体";
  362. ctx.value.fillStyle = i.color;
  363. if (i.crosswise) {
  364. if (i.y > height.value / 2) {
  365. ctx.value.textAlign = "start";
  366. ctx.value.textBaseline = "bottom";
  367. } else {
  368. ctx.value.textAlign = "start";
  369. ctx.value.textBaseline = "top";
  370. }
  371. } else {
  372. if (i.x > width.value / 2) {
  373. ctx.value.textAlign = "end";
  374. ctx.value.textBaseline = "top";
  375. } else {
  376. ctx.value.textAlign = "start";
  377. ctx.value.textBaseline = "top";
  378. }
  379. }
  380. ctx.value.fillText(i.text, i.x, i.y);
  381. } else {
  382. ctx.value.beginPath();
  383. ctx.value.moveTo(i.x1, i.y1);
  384. ctx.value.lineTo(i.x2, i.y2);
  385. ctx.value.lineWidth = 1;
  386. ctx.value.strokeStyle = "red";
  387. ctx.value.stroke();
  388. }
  389. });
  390. });
  391. };
  392. /** 判断点击的是哪个 */
  393. const checkElement = () => {
  394. elLength.value = "";
  395. elWidth.value = "";
  396. elAngle.value = "";
  397. elCoordinates.value = [];
  398. try {
  399. imagesData.value.forEach((item, index) => {
  400. drawGuideByObj(item);
  401. if (ctx.value.isPointInPath(clickCoordinate.x, clickCoordinate.y)) {
  402. imagesData.value = imagesData.value.map((itemList, listIndex) => {
  403. let selectStatusA = false;
  404. if (listIndex === index) {
  405. selectStatusA = true;
  406. }
  407. return {
  408. ...itemList,
  409. selectStatus: selectStatusA,
  410. };
  411. });
  412. imagesData.value.sort((a, b) => (b.selectStatus ? -1 : 0));
  413. elementMarking(item);
  414. throw "选中";
  415. } else {
  416. item.selectStatus = false;
  417. repaint();
  418. }
  419. });
  420. } catch (e) {
  421. console.log(e);
  422. repaint();
  423. }
  424. };
  425. const elementMarking = (item) => {
  426. elCoordinates.value = [];
  427. elAngle.value = item.angle;
  428. let x = Number(Math.round(item.x));
  429. let y = Number(Math.round(item.y));
  430. let w = 0;
  431. let h = 0;
  432. let x1 = 0;
  433. let y1 = 0;
  434. let x3 = 0;
  435. let y3 = 0;
  436. let cx = 0;
  437. let cy = 0;
  438. if (item.imgStatus) {
  439. w = Number(Math.round(item.w));
  440. h = Number(Math.round(item.h));
  441. elLength.value = Number(Math.round(item.w / ratio.value));
  442. elWidth.value = Number(Math.round(item.h / ratio.value));
  443. x1 = x;
  444. y1 = y;
  445. x3 = x;
  446. y3 = y + h;
  447. cx = x + w / 2;
  448. cy = y + h / 2;
  449. } else {
  450. let textPixel = getStringPixel(item.text, item.size + "px 宋体");
  451. w = Number(Math.round(textPixel.width));
  452. h = Number(Math.round(textPixel.fontBoundingBoxAscent + textPixel.fontBoundingBoxDescent));
  453. elLength.value = Number(Math.round(textPixel.width / ratio.value));
  454. elWidth.value = Number(Math.round((textPixel.fontBoundingBoxAscent + textPixel.fontBoundingBoxDescent) / ratio.value));
  455. x1 = x;
  456. y1 = y - h;
  457. x3 = x;
  458. y3 = y;
  459. cx = x + w / 2;
  460. cy = y - h / 2;
  461. }
  462. let x1_rotated = (x1 - cx) * Math.cos((item.angle * Math.PI) / 180) - (y1 - cy) * Math.sin((item.angle * Math.PI) / 180);
  463. let y1_rotated = (x1 - cx) * Math.sin((item.angle * Math.PI) / 180) + (y1 - cy) * Math.cos((item.angle * Math.PI) / 180);
  464. let x3_rotated = (x3 - cx) * Math.cos((item.angle * Math.PI) / 180) - (y3 - cy) * Math.sin((item.angle * Math.PI) / 180);
  465. let y3_rotated = (x3 - cx) * Math.sin((item.angle * Math.PI) / 180) + (y3 - cy) * Math.cos((item.angle * Math.PI) / 180);
  466. x1_rotated += cx;
  467. y1_rotated += cy;
  468. x3_rotated += cx;
  469. y3_rotated += cy;
  470. let xLine = 0;
  471. let yLine = 0;
  472. if ((x1_rotated == x3_rotated && y1_rotated < y3_rotated) || x1_rotated < x3_rotated) {
  473. xLine = x1_rotated;
  474. yLine = y1_rotated;
  475. } else {
  476. xLine = x3_rotated;
  477. yLine = y3_rotated;
  478. }
  479. elCoordinates.value.push({ textStatus: false, x1: 0, y1: yLine, x2: xLine, y2: yLine });
  480. elCoordinates.value.push({ textStatus: false, x1: xLine, y1: 0, x2: xLine, y2: yLine });
  481. elCoordinates.value.push({ textStatus: true, x: xLine / 2, y: yLine, color: "red", text: Number(Math.round(xLine / ratio.value)) + "cm", crosswise: true });
  482. elCoordinates.value.push({ textStatus: true, x: xLine, y: yLine / 2, color: "red", text: Number(Math.round(yLine / ratio.value)) + "cm", crosswise: false });
  483. };
  484. const clickToView = () => {
  485. openDrawing.value = true;
  486. nextTick(() => {
  487. let divWidth = proxy.$refs.mainDIV.clientWidth;
  488. let divHeight = proxy.$refs.mainDIV.clientHeight;
  489. ratio.value = Math.min(Math.floor(divWidth / formData.data.width), Math.floor(divHeight / formData.data.length));
  490. width.value = Number(Math.round(formData.data.width * ratio.value));
  491. height.value = Number(Math.round(formData.data.length * ratio.value));
  492. nextTick(() => {
  493. init();
  494. });
  495. });
  496. };
  497. const clickCancel = () => {
  498. const useTagsStore = useTagsViewStore();
  499. useTagsStore.delVisitedView(router.currentRoute.value);
  500. router.replace({ path: "/sell/draft-design/draft-design-management" });
  501. };
  502. const clickSubmit = () => {
  503. if (!formData.data.proofingImg) {
  504. return ElMessage("请上传设计样图");
  505. }
  506. if (!formData.data.productionDocument) {
  507. return ElMessage("请上传图稿文件");
  508. }
  509. proxy.post("/orderSkuArtworkMake/edit", formData.data).then(() => {
  510. ElMessage({ message: "提交成功", type: "success" });
  511. const useTagsStore = useTagsViewStore();
  512. useTagsStore.delVisitedView(router.currentRoute.value);
  513. router.replace({ path: "/sell/draft-design/draft-design-management" });
  514. });
  515. };
  516. </script>
  517. <style lang="scss" scoped>
  518. :deep(.el-table__cell) {
  519. vertical-align: top;
  520. }
  521. ::v-deep(.image-slot) {
  522. display: flex;
  523. justify-content: center;
  524. align-items: center;
  525. width: 100%;
  526. height: 100%;
  527. background: var(--el-scale-down-color-light);
  528. color: var(--el-text-color-secondary);
  529. font-size: 30px;
  530. }
  531. ::v-deep(.image-slot .el-icon) {
  532. font-size: 30px;
  533. }
  534. ::v-deep(.tableHeader th) {
  535. .cell {
  536. line-height: 35px !important;
  537. }
  538. }
  539. :deep(.el-dialog) {
  540. margin-top: 10px !important;
  541. margin-bottom: 10px !important;
  542. }
  543. ::v-deep(.el-dialog__body) {
  544. padding: 10px !important;
  545. }
  546. </style>