You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

684 lines
22 KiB

2 years ago
​
2 years ago
​
​
​
​
​
​
1 year ago
2 years ago
1 year ago
2 years ago
​
​
​
​
​
​
​
​
​
​
3 months ago
​
​
3 months ago
​
​
​
3 months ago
​
2 years ago
2 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
2 years ago
​
​
​
​
​
​
​
3 months ago
2 years ago
​
3 months ago
2 years ago
​
​
1 year ago
2 years ago
​
​
2 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
2 years ago
​
​
​
​
​
​
​
1 year ago
2 years ago
​
​
​
​
​
​
2 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
3 months ago
2 years ago
​
​
3 months ago
2 years ago
​
​
​
​
​
​
​
​
​
​
​
​
3 months ago
2 years ago
​
​
3 months ago
​
​
​
​
​
​
​
​
​
​
​
3 months ago
​
​
3 months ago
2 years ago
​
​
​
​
​
​
​
​
​
​
​
3 months ago
2 years ago
​
​
3 months ago
2 years ago
​
​
​
​
​
​
2 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
3 months ago
​
​
​
​
2 years ago
​
​
​
​
​
​
3 months ago
​
​
​
​
​
​
​
​
​
​
​
​
​
2 years ago
​
​
​
​
​
​
​
​
​
​
2 years ago
​
​
​
​
​
​
​
​
2 years ago
​
​
​
​
​
​
​
​
​
​
​
2 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
2 years ago
​
​
​
​
1 year ago
​
2 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
2 years ago
​
​
​
2 years ago
​
​
​
​
1 year ago
​
1 year ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
1 year ago
1 year ago
​
​
​
​
1 year ago
​
​
2 years ago
​
​
​
​
​
​
​
​
​
​
​
1 year ago
2 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
1 year ago
​
3 months ago
1 year ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
1 year ago
1 year ago
​
3 months ago
1 year ago
3 months ago
1 year ago
​
​
​
3 months ago
1 year ago
​
​
2 years ago
1 year ago
2 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
1 year ago
2 years ago
​
​
​
​
​
​
​
​
​
1 year ago
2 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
2 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. <template>
  2. <div class="customer-css">
  3. <!-- 查询时间和产品 -->
  4. <el-form :inline="true" label-position="top" label-width="100px" style="margin-top: 5px;">
  5. <el-form-item :label=labels.labelNo>
  6. <el-input v-model="pageData.labelNo" style="width: 120px"></el-input>
  7. </el-form-item>
  8. <el-form-item :label=labels.labelType>
  9. <el-input v-model="pageData.labelType" style="width: 120px"></el-input>
  10. </el-form-item>
  11. <!-- <el-form-item :label=labels.labelName>
  12. <el-input v-model="pageData.labelName" style="width: 120px" ></el-input>
  13. </el-form-item>-->
  14. <el-form-item style="margin-top: 16px;">
  15. <el-button type="primary" @click="refreshPageTables()" class="customer-bun-mid"
  16. style="margin-left: 10px; margin-bottom: 5px;">{{ buttons.searchButton }}
  17. </el-button>
  18. </el-form-item>
  19. <el-form-item style="margin-top: 16px;">
  20. <el-button type="primary" @click="addLabelSettingModal()" :disabled="authAdd" class="customer-bun-mid"
  21. style="margin-left: 10px; margin-bottom: 5px;">{{ buttons.addButton }}
  22. </el-button>
  23. </el-form-item>
  24. <el-form-item style="margin-top: 16px;">
  25. <el-button type="success" @click="openPaperManagement()" class="customer-bun-mid2"
  26. style="margin-left: 10px; width: 140px; margin-bottom: 5px;">{{ buttons.paperManagementButton }}
  27. </el-button>
  28. </el-form-item>
  29. <el-form-item style="margin-top: 16px;">
  30. <el-button type="success" @click="openDataSourceManagement()"
  31. style="margin-left: 10px; margin-bottom: 5px; width: 160px; padding: 5px 5px;">{{ buttons.dataSourceManagementButton }}
  32. </el-button>
  33. </el-form-item>
  34. <el-form-item style="margin-top: 16px;">
  35. <el-button type="success" @click="openLabelTypeManagement()"
  36. style="margin-left: 10px; margin-bottom: 5px; width: 150px; padding: 5px 5px;">{{ buttons.labelTypeManagementButton }}
  37. </el-button>
  38. </el-form-item>
  39. </el-form>
  40. <!-- 标签列表数据 -->
  41. <el-table @row-click="setCurrentRow"
  42. :height="height"
  43. highlight-current-row
  44. :data="labelArrays"
  45. border
  46. v-loading="dataListLoading"
  47. style="width: 100%;">
  48. <el-table-column
  49. v-for="(item,index) in columnList" :key="index"
  50. :sortable="item.columnSortable"
  51. :prop="item.columnProp"
  52. :header-align="item.headerAlign"
  53. :show-overflow-tooltip="item.showOverflowTooltip"
  54. :align="item.align"
  55. :fixed="item.fixed==''?false:item.fixed"
  56. :width="item.columnWidth"
  57. :label="item.columnLabel">
  58. <template slot-scope="scope">
  59. <span v-if="!item.columnHidden"> {{ displayColumnValue(item.columnProp, scope.row[item.columnProp]) }}</span>
  60. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]"
  61. style="width: 100px; height: 80px"/></span>
  62. </template>
  63. </el-table-column>
  64. <el-table-column
  65. fixed="left"
  66. header-align="center"
  67. align="center"
  68. width="210"
  69. :label=labels.operationLabel>
  70. <template slot-scope="scope">
  71. <a class="customer-a" v-if="!authEdit" @click="copyLabelConfirm(scope.row)">{{ $t('labelSetting.list.oneClickCopy') }}</a>
  72. <a class="customer-a" v-if="!authEdit" @click="editLabelSettingModal(scope.row)">{{ labels.editLabel }}</a>
  73. <a class="customer-a" v-if="!authDelete" @click="deleteLabelSettingConfirm(scope.row)">{{ labels.deleteLabel }}</a>
  74. <!-- <a class="customer-a" v-if="!authEdit" @click="labelParameterModal(scope.row)">{{ labels.printParameterLabel }}</a>
  75. <a class="customer-a" v-if="!authEdit" @click="labelContentModal(scope.row)">{{ labels.printContentLabel }}</a>-->
  76. <a class="customer-a" v-if="!authEdit" @click="labelDrawModal(scope.row)">{{ labels.printDrawLabel }}</a>
  77. </template>
  78. </el-table-column>
  79. </el-table>
  80. <!-- 新增或者修改的modal -->
  81. <comAddUpdateLabel ref="comAddUpdateLabel" @refreshPageTables="refreshPageTables" v-drag></comAddUpdateLabel>
  82. <!-- 新增或者修改的modal -->
  83. <comShowLabelParameter ref="comShowLabelParameter" @refreshPageTables="refreshPageTables" v-drag></comShowLabelParameter>
  84. <!-- 新增或者修改的modal -->
  85. <comShowLabelContent ref="comShowLabelContent" @refreshPageTables="refreshPageTables" v-drag></comShowLabelContent>
  86. <!-- 纸张管理对话框 -->
  87. <PaperManagementDialog
  88. :visible.sync="paperManagementVisible"
  89. @paper-updated="handlePaperUpdated"
  90. />
  91. <!-- 数据源管理对话框 -->
  92. <DataSourceManagementDialog
  93. :visible.sync="dataSourceManagementVisible"
  94. @data-source-updated="handleDataSourceUpdated"
  95. />
  96. <!-- 标签类型管理对话框 -->
  97. <LabelTypeManagementDialog
  98. :visible.sync="labelTypeManagementVisible"
  99. @label-type-updated="handleLabelTypeUpdated"
  100. />
  101. </div>
  102. </template>
  103. <script>
  104. import {
  105. getLabelSettingList,
  106. deleteLabelSetting,
  107. copyLabelSetting,
  108. } from '@/api/labelSetting/label_setting.js';
  109. /*引入組件*/
  110. import comAddUpdateLabel from "./com_add_update_label";/*新增或者修改的組件*/
  111. import comShowLabelParameter from "./com_show_label_parameter";/*打印参数维护的組件*/
  112. import comShowLabelContent from "./com_show_label_content";/*打印内容定义数维护的組件*/
  113. import PaperManagementDialog from "./components/PaperManagementDialog.vue";/*纸张管理对话框*/
  114. import DataSourceManagementDialog from "./components/DataSourceManagementDialog.vue";/*数据源管理对话框*/
  115. import LabelTypeManagementDialog from "./components/LabelTypeManagementDialog.vue";/*标签类型管理对话框*/
  116. import { labelSettingColumnText } from "./labelTypeDisplay";
  117. /* 动态表头 */
  118. import {
  119. saveTableDefaultList,
  120. getTableDefaultListLanguage,
  121. getTableUserListLanguage,
  122. removerDefault,
  123. removerUser
  124. } from '@/api/table.js'
  125. import {
  126. searchSysLanguagePackList,
  127. searchSysLanguageParam,
  128. searchFunctionButtonList,
  129. saveButtonList,
  130. searchSysLanguage,
  131. searchLanguageListByLanguageCode,
  132. saveSysLanguageOne,
  133. searchPageLanguageData,
  134. removerLanguage,
  135. saveSysLanguageList
  136. } from "@/api/sysLanguage.js";
  137. var functionId = '100008001';
  138. export default {
  139. data() {
  140. return {
  141. height: 800,
  142. authEdit: false,
  143. authAdd: false,
  144. authDelete: false,
  145. menuId: this.$route.meta.menuId,
  146. menuShow: false,
  147. showDefault: false,
  148. pageData: {
  149. site: this.$store.state.user.site,
  150. username: this.$store.state.user.name,
  151. labelNo: '',
  152. labelName: '',
  153. labelType: '',
  154. searchFlag: 'Y'
  155. },
  156. currentRow: {},
  157. labelArrays: [],
  158. dataListLoading: false,
  159. columnList: [
  160. {
  161. userId: this.$store.state.user.name,
  162. functionId: '100008001',
  163. serialNumber: '100008001LabelLabelNo',
  164. tableId: '100008001Label',
  165. tableName: this.$t('labelSetting.list.customLabelList'),
  166. columnProp: 'labelNo',
  167. headerAlign: 'center',
  168. align: 'center',
  169. columnLabel: this.$t('labelSetting.fields.labelNo'),
  170. columnWidth: 100,
  171. columnHidden: false,
  172. columnImage: false,
  173. columnSortable: true,
  174. sortLv: 0,
  175. status: true,
  176. fixed: ''
  177. },
  178. {
  179. userId: this.$store.state.user.name,
  180. functionId: '100008001',
  181. serialNumber: '100008001LabelLabelType',
  182. tableId: '100008001Label',
  183. tableName: this.$t('labelSetting.list.customLabelList'),
  184. columnProp: 'labelType',
  185. headerAlign: 'center',
  186. align: 'center',
  187. columnLabel: this.$t('labelSetting.fields.labelType'),
  188. columnHidden: false,
  189. columnImage: false,
  190. columnSortable: true,
  191. sortLv: 0,
  192. status: true,
  193. fixed: ''
  194. },
  195. {
  196. userId: this.$store.state.user.name,
  197. functionId: '100008001',
  198. serialNumber: '100008001LabelLabelType',
  199. tableId: '100008001Label',
  200. tableName: this.$t('labelSetting.list.customLabelList'),
  201. columnProp: 'rfidFlag',
  202. headerAlign: 'center',
  203. align: 'center',
  204. columnLabel: this.$t('labelSetting.fields.rfidLabel'),
  205. columnHidden: false,
  206. columnImage: false,
  207. columnSortable: true,
  208. sortLv: 0,
  209. status: true,
  210. fixed: ''
  211. },
  212. {
  213. userId: this.$store.state.user.name,
  214. functionId: '100008001',
  215. serialNumber: '100008001LabelRemark',
  216. tableId: '100008001Label',
  217. tableName: this.$t('labelSetting.list.customLabelList'),
  218. columnProp: 'remark',
  219. headerAlign: 'center',
  220. align: 'left',
  221. columnLabel: this.$t('labelSetting.fields.remark'),
  222. columnHidden: false,
  223. columnImage: false,
  224. columnSortable: false,
  225. sortLv: 0,
  226. status: true,
  227. fixed: ''
  228. },
  229. ],
  230. queryTable: {
  231. userId: this.$store.state.user.name,
  232. functionId: this.$route.meta.menuId,
  233. tableId: '100008001Label',
  234. languageCode: this.$i18n.locale
  235. },
  236. // 用户table 查询参数
  237. queryTableUser: {
  238. userId: this.$store.state.user.name,
  239. functionId: this.$route.meta.menuId,
  240. tableId: '100008001Label',
  241. status: true,
  242. languageCode: this.$i18n.locale
  243. },
  244. // 用户table 配置集合
  245. userColumnList: [],
  246. buttons: {
  247. searchButton: this.$t('labelSetting.common.search'),
  248. addButton: this.$t('labelSetting.common.add'),
  249. paperManagementButton: this.$t('labelSetting.paper.managementTitle'),
  250. dataSourceManagementButton: this.$t('labelSetting.dataSource.managementTitle'),
  251. labelTypeManagementButton: this.$t('labelSetting.labelType.managementTitle'),
  252. },
  253. queryButton: {
  254. functionId: functionId,
  255. table_id: '*',
  256. languageCode: this.$i18n.locale,
  257. objectType: 'button'
  258. },
  259. labels: {
  260. labelNo: this.$t('labelSetting.fields.labelNoColon'),
  261. labelType: this.$t('labelSetting.fields.labelTypeColon'),
  262. labelName: this.$t('labelSetting.fields.reportFileNameColon'),
  263. operationLabel: this.$t('labelSetting.common.operation'),
  264. editLabel: this.$t('labelSetting.common.edit'),
  265. deleteLabel: this.$t('labelSetting.common.delete'),
  266. printParameterLabel: this.$t('labelSetting.list.printParameters'),
  267. printContentLabel: this.$t('labelSetting.list.printContentDefinition'),
  268. printDrawLabel: this.$t('labelSetting.list.printDraw'),
  269. sureDeleteThisRecord: this.$t('labelSetting.list.sureDeleteRecord'),
  270. sureCopyThisRecord: this.$t('labelSetting.list.sureCopyLabel', { labelNo: '' }),
  271. tipsLabel: this.$t('labelSetting.common.tip'),
  272. confirmLabel: this.$t('labelSetting.common.confirm'),
  273. cancelLabel: this.$t('labelSetting.common.cancel'),
  274. },
  275. queryLabel: {
  276. functionId: functionId,
  277. table_id: '*',
  278. languageCode: this.$i18n.locale,
  279. objectType: 'label'
  280. },
  281. // 纸张管理对话框状态
  282. paperManagementVisible: false,
  283. // 数据源管理对话框状态
  284. dataSourceManagementVisible: false,
  285. // 标签类型管理对话框状态
  286. labelTypeManagementVisible: false,
  287. }
  288. },
  289. /*组件*/
  290. components: {
  291. comAddUpdateLabel,/*标签新增或者修改的组件*/
  292. comShowLabelParameter,/*打印参数维护的组件*/
  293. comShowLabelContent,/*标签打印内容定义*/
  294. PaperManagementDialog,/*纸张管理对话框*/
  295. DataSourceManagementDialog,/*数据源管理对话框*/
  296. LabelTypeManagementDialog,/*标签类型管理对话框*/
  297. },
  298. mounted() {
  299. this.$nextTick(() => {
  300. this.height = window.innerHeight - 165;
  301. })
  302. },
  303. methods: {
  304. /* 列表展示走语言包,不改行数据里的中文原值 */
  305. displayColumnValue(columnProp, storedValue) {
  306. return labelSettingColumnText(this.$i18n, columnProp, storedValue)
  307. },
  308. /* 刷新页面table */
  309. refreshPageTables() {
  310. this.currentRow = {};
  311. //重置是否查询
  312. this.pageData.searchFlag = 'Y';
  313. this.refreshLabelSettingList();
  314. },
  315. // 获取当前列表的信息
  316. refreshLabelSettingList() {
  317. // 查询当前页面的参数
  318. getLabelSettingList(this.pageData).then(({data}) => {
  319. // 设置查询数据
  320. this.labelArrays = data.rows;
  321. })
  322. },
  323. /*新增标签定义的modal*/
  324. addLabelSettingModal(){
  325. let currentData = {
  326. site: this.$store.state.user.site,
  327. username: this.$store.state.user.name,
  328. labelNo: '*',
  329. labelName: '',
  330. labelType: '外箱标签',
  331. labelClass: '打印软件',
  332. printDirection : '纵向设计',
  333. remark: '',
  334. addFlag: 'Y'
  335. };
  336. //打开组件 去做新增业务
  337. this.$nextTick(() => {
  338. this.$refs.comAddUpdateLabel.init(currentData);
  339. })
  340. },
  341. /*修改标签定义的modal*/
  342. editLabelSettingModal(row){
  343. let currentData = row;
  344. currentData.addFlag = 'N';
  345. //打开组件 去做修改业务
  346. this.$nextTick(() => {
  347. this.$refs.comAddUpdateLabel.init(currentData);
  348. })
  349. },
  350. /*删除标签*/
  351. deleteLabelSettingConfirm(row){
  352. this.$confirm(this.labels.sureDeleteThisRecord, this.labels.tipsLabel, {
  353. confirmButtonText: this.labels.confirmLabel,
  354. cancelButtonText: this.labels.cancelLabel,
  355. type: 'warning'
  356. }).then(() => {
  357. deleteLabelSetting(row).then(({data}) => {
  358. if (data && data.code == 200) {
  359. this.refreshPageTables();
  360. this.$message.success(data.msg);
  361. } else {
  362. this.$message.error(data.msg);
  363. }
  364. });
  365. });
  366. },
  367. /*打印参数modal设置*/
  368. labelParameterModal(row){
  369. let currentData = row;
  370. //打开组件 去做修改业务
  371. this.$nextTick(() => {
  372. this.$refs.comShowLabelParameter.init(currentData);
  373. })
  374. },
  375. /*标签打印定义功能*/
  376. labelContentModal(row){
  377. let currentData = row;
  378. //打开组件 去做修改业务
  379. this.$nextTick(() => {
  380. this.$refs.comShowLabelContent.init(currentData);
  381. })
  382. },
  383. labelDrawModal(row){
  384. let currentData = row;
  385. // 调试信息:显示当前标签的打印方向
  386. console.log('标签绘制跳转:', {
  387. labelNo: currentData.labelNo,
  388. printDirection: currentData.printDirection,
  389. paperOrientation: currentData.paperOrientation
  390. });
  391. // 判断是否为横向打印
  392. const isLandscape = currentData.printDirection === '横向打印' ||
  393. currentData.printDirection === '横向设计' ||
  394. currentData.paperOrientation === 'landscape';
  395. if (isLandscape) {
  396. localStorage.setItem('paperId',currentData.paperId);
  397. console.log('跳转到横向标签绘制页面');
  398. this.$router.push({
  399. name: 'labelSetting-label_draw2',
  400. params: {labelSetting: currentData}
  401. });
  402. } else {
  403. console.log('跳转到纵向标签绘制页面');
  404. this.$router.push({
  405. name: 'labelSetting-label_draw',
  406. params: {labelSetting: currentData}
  407. });
  408. }
  409. },
  410. /* 设置选中行的参数 */
  411. setCurrentRow(row, column, event) {
  412. this.currentRow = JSON.parse(JSON.stringify(row))
  413. },
  414. // 获取 用户保存的 格式列
  415. getTableUserColumn() {
  416. getTableUserListLanguage(this.queryTableUser).then(({data}) => {
  417. if (data && data.code == 0 && data.rows.length > 0) {
  418. // this.columnList = []
  419. this.columnList = data.rows
  420. } else {
  421. //this.getColumnList()
  422. }
  423. })
  424. },
  425. // 获取 tableDefault 列
  426. getColumnList() {
  427. getTableDefaultListLanguage(this.queryTable).then(({data}) => {
  428. if (data && data.code == 0 && data.rows.length > 0) {
  429. // this.showDefault = false
  430. this.columnList = data.rows
  431. } else {
  432. // this.showDefault = true
  433. }
  434. })
  435. },
  436. //获取按钮的权限数据
  437. getButtonAuthData(){
  438. let updateFlag = this.isAuth(this.menuId+":revise");
  439. let fullControFlag = this.isAuth(this.menuId+":fullContro");
  440. let deleteFlag = this.isAuth(this.menuId+":remove");
  441. //处理页面的权限数据
  442. this.authEdit = !updateFlag && !fullControFlag;
  443. this.authAdd = !fullControFlag;
  444. this.authDelete = !deleteFlag;
  445. },
  446. /*打开纸张管理对话框*/
  447. openPaperManagement() {
  448. this.paperManagementVisible = true;
  449. },
  450. /*处理纸张更新事件*/
  451. handlePaperUpdated(event) {
  452. console.log('纸张数据已更新:', event);
  453. // 这里可以添加纸张更新后的处理逻辑
  454. // 比如刷新相关的选择器组件等
  455. },
  456. /*打开数据源管理对话框*/
  457. openDataSourceManagement() {
  458. this.dataSourceManagementVisible = true;
  459. },
  460. /*处理数据源更新事件*/
  461. handleDataSourceUpdated(event) {
  462. console.log('数据源数据已更新:', event);
  463. // 这里可以添加数据源更新后的处理逻辑
  464. },
  465. /*打开标签类型管理对话框*/
  466. openLabelTypeManagement() {
  467. this.labelTypeManagementVisible = true;
  468. },
  469. /*处理标签类型更新事件*/
  470. handleLabelTypeUpdated(event) {
  471. console.log('标签类型数据已更新:', event);
  472. // 这里可以添加标签类型更新后的处理逻辑
  473. // 比如刷新标签类型下拉列表等
  474. },
  475. /*一键复制标签确认*/
  476. copyLabelConfirm(row) {
  477. this.$confirm(this.$t('labelSetting.list.sureCopyLabel', { labelNo: row.labelNo }), this.labels.tipsLabel, {
  478. confirmButtonText: this.labels.confirmLabel,
  479. cancelButtonText: this.labels.cancelLabel,
  480. type: 'info'
  481. }).then(() => {
  482. this.copyLabel(row);
  483. });
  484. },
  485. /*复制标签功能*/
  486. async copyLabel(originalLabel) {
  487. try {
  488. // 调用后台接口,一次性完成标签复制(包括基本信息和绘制内容)
  489. const copyData = {
  490. site: this.$store.state.user.site,
  491. username: this.$store.state.user.name,
  492. originalLabelNo: originalLabel.labelNo,
  493. // 传递原标签的所有信息给后台
  494. originalLabel: originalLabel
  495. };
  496. const result = await copyLabelSetting(copyData);
  497. if (result.data.code === 200) {
  498. this.refreshPageTables();
  499. this.$message.success(this.$t('labelSetting.list.copySuccess', { labelNo: result.data.data.newLabelNo }));
  500. } else {
  501. this.$message.error(this.$t('labelSetting.list.copyFailed') + ': ' + result.data.msg);
  502. }
  503. } catch (error) {
  504. console.error('复制标签失败:', error);
  505. this.$message.error(this.$t('labelSetting.list.copyRetry'));
  506. }
  507. },
  508. /*//获取多语言的信息
  509. getMultiLanguageList() {
  510. //首先查询当前按钮的多语言
  511. searchFunctionButtonList(this.queryButton).then(({data}) => {
  512. if (data && data.code == 0 ) {
  513. this.buttons = data.data
  514. } else {
  515. // saveButtonList(this.buttonList).then(({data}) => {
  516. // })
  517. }
  518. });
  519. //其次查询当前标签的多语言
  520. searchFunctionButtonList(this.queryLabel).then(({data}) => {
  521. if (data && data.code == 0 ) {
  522. this.labels = data.data
  523. } else {
  524. // saveButtonList(this.buttonList).then(({data}) => {
  525. // })
  526. }
  527. });
  528. },*/
  529. },
  530. created() {
  531. // 不查询
  532. this.refreshLabelSettingList();
  533. // 获取动态表头的信息
  534. this.getTableUserColumn()
  535. //获取按钮的权限
  536. this.getButtonAuthData();
  537. //刷新页面的多语言信息
  538. //this.getMultiLanguageList();
  539. }
  540. }
  541. </script>
  542. <style>
  543. .el-textarea__inner {
  544. padding: 5px 5px;
  545. }
  546. </style>
  547. <!--当前页面的标签样式-->
  548. <style scoped lang="scss">
  549. /*针对el-card*/
  550. .customer-card .el-form-item__content {
  551. margin-top: -15px;
  552. }
  553. .customer-card .el-form-item {
  554. height: 22px;
  555. }
  556. .customer-border .el-form-item__content {
  557. margin-top: -30px;
  558. }
  559. /*全局年与日类型 宽度*/
  560. div.el-time-width {
  561. width: 110px !important;
  562. }
  563. /* 全局时间右边框*/
  564. .customer-css input.el-input__inner {
  565. height: 22px !important;
  566. padding-right: 0px !important;
  567. }
  568. /* 控制el-card标签的数据*/
  569. div.customer-el-card {
  570. margin-left: 110px;
  571. margin-top: -15px;
  572. height: 20px;
  573. width: 60px;
  574. }
  575. /* 颜色控制 */
  576. div.customer-el-card-pink {
  577. background: #FF00FF;
  578. }
  579. div.customer-el-card-orange {
  580. background: #FFD700;
  581. }
  582. div.customer-el-card-blue {
  583. background: #0000CD;
  584. }
  585. /*清掉样式*/
  586. .el-radio + .el-radio {
  587. margin-left: 0px;
  588. }
  589. /*当前按钮的通用样式*/
  590. .customer-css .customer-bun-mid {
  591. width: 60px;
  592. text-align: center;
  593. }
  594. .customer-css .customer-bun-mid2 {
  595. width: 70px;
  596. text-align: center;
  597. }
  598. /*当前按钮的通用样式*/
  599. .customer-css .el-button--medium {
  600. padding: 5px 5px;
  601. }
  602. /*添加主菜单和明细菜单的样式*/
  603. .customer-css .customer-dropdown .el-button--primary {
  604. padding: 2px;
  605. font-size: 12px;
  606. }
  607. .el-dropdown-menu--medium .el-dropdown-menu__item {
  608. line-height: 18px;
  609. padding: 0 17px;
  610. font-size: 12px;
  611. }
  612. hr {
  613. margin-top: 0px;
  614. }
  615. /*控制上下间距*/
  616. </style>