chengkun
2025-06-05 4080b5997b38ca84b3b203c7101dcadb97b76925
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
<!DOCTYPE html>
<html lang="zh-cn">
 
  <head>
    <meta charset="utf-8">
    <include file="common:title" />
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <include file="common:header" />
    <include file="common:element-plus" />
    <link rel="stylesheet" href="/static/admin/css/image_viewer.css" media="all">
    <style>
      .previewImage {
        width: 100%;
      }
    </style>
  </head>
 
  <body>
    <div id="vue_item" v-cloak>
      <el-container>
        <el-aside class="el-menu-container" :width="el_aside_width">
          <!-- 侧边菜单 -->
          <include file="common:side_menu" />
        </el-aside>
        <el-container>
          <el-header>
            <include file="common:guide" one_word="基础信息配置" two_word="{$other['title']}" />
          </el-header>
          <el-main>
            <el-card style="width: 100%">
              <template #header>
                <div class="card-header"><span data-i18n="logisticsProduct_management">{$other['title']}</span>
                  &emsp;
                </div>
              </template>
              <el-form label-width="auto">
                <!-- <el-select v-model="searchdata.platform_type" style="width: 180px;margin-right: 10px;" @change="index">
                  <el-option v-for="item in platformTypeList" :key="item.id" :label="item.name" :value="item.id" />
                </el-select> -->
                <el-input v-model="searchdata.type" placeholder="请输入类型" style="width: 180px;margin-right: 10px;" clearable></el-input>
                <el-input v-model="searchdata.name" placeholder="请输入名称" style="width: 180px;margin-right: 10px;" clearable></el-input>
                <el-input v-model="searchdata.value" placeholder="请输入值" style="width: 180px;" clearable></el-input>
                &ensp;<el-button type="success" icon="Search" @click="index()">搜索</el-button> <el-button type="warning" @click="createJson()">生成json文件</el-button>
              </el-form>
              <br />
              <el-tabs v-model="langs.symbol" @tab-change="handChange">
                <el-tab-pane v-for="(item, index) in langs.list" :key="index" :label="item.name" :name="item.symbol" lazy></el-tab-pane>
              </el-tabs>
              <el-button type="primary" icon="Plus" @click="handleAdd" v-if="active==0">新增</el-button>
              <el-button @click="handleSync" v-if="active!=0">
                同步
              </el-button>
              <el-button @click="handleTrans" v-if="active!=0">
                翻译
              </el-button>
              <el-table :data="list" v-loading="loading.list" border style="width: 100%;margin-top: 10px;" :stripe="true" ref="tableRef">
                <el-table-column prop="id" label="编号" width="80"></el-table-column>
                <el-table-column prop="type" label="类型" width="150">
                  <template #default="scope">
                    <div @click="copyToClipboard(scope.row,1)">
                      {{scope.row.type}}
                    </div>
                  </template>
                </el-table-column>
                <el-table-column prop="name" label="名称" width="300">
                  <template #default="scope">
                    <div @click="copyToClipboard(scope.row,2)">
                      {{scope.row.name}}
                    </div>
                  </template>
                </el-table-column>
                <el-table-column prop="symbol" label="引用方式">
                  <template #default="scope">
                    <div @click="copyToClipboard(scope.row,3)">
                      t('{{scope.row.type}}.{{scope.row.name}}','{{scope.row.from_value}}')
                    </div>
                  </template>
                </el-table-column>
                <el-table-column prop="from_value" label="源语言" v-if="active!=0">
                  <template #default="scope">
                    <div @click="copyToClipboard(scope.row,4)">
                      {{scope.row.from_value}}
                    </div>
                  </template>
                </el-table-column>
                <el-table-column prop="value" label="值">
                  <template #default="scope">
                    <div @click="copyToClipboard(scope.row,4)">
                      {{scope.row.value}}
                    </div>
                  </template>
                </el-table-column>
                <el-table-column label="操作选项" fixed="right" min-width="150" :align="alignValue(200)">
                  <template #default="scope">
                    <el-button icon="edit" type="primary" @click="Add(scope.$index)"></el-button>
                    <el-button icon="delete" type="danger" @click="del(scope.$index)"></el-button>
                    <el-button type="warning" @click="clearValue(scope.$index)">清空值</el-button>
                  </template>
                </el-table-column>
              </el-table>
              <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="searchdata.p" :page-sizes="[20, 30, 40, 50]"
                             :page-size="searchdata.page_size" layout="total, sizes, prev, pager, next" :total="other.count">
              </el-pagination>
            </el-card>
          </el-main>
          <!-- <el-footer>Footer</el-footer> -->
        </el-container>
      </el-container>
 
      <el-dialog :title="Add_title" v-model="dialog.addDialogStatus" :show-close="true" width="800px">
        <el-form ref="Add_form" :rules="rules" :model="Add_form" label-width="120px">
          <!-- <el-form-item label="平台类型" prop="platform_type">
            <el-select v-model="Add_form.platform_type" style="width: 180px;margin-right: 10px;" @change="index">
              <el-option v-for="item in platformTypeList" :key="item.id" :label="item.name" :value="item.id" />
            </el-select>
          </el-form-item> -->
          <el-form-item label="类型" prop="type">
            <el-input v-model="Add_form.type" clearable placeholder="请输入类型" style="width:260px;"></el-input>
          </el-form-item>
          <el-form-item label="名称" prop="name">
            <el-input v-model="Add_form.name" clearable placeholder="请输入名称" style="width:260px;"></el-input>
          </el-form-item>
          <el-form-item label="值" prop="value">
            <el-input v-model="Add_form.value" clearable placeholder="请输入值" style="width:260px;"></el-input>
            <div class="form-tips" v-if="mode == 'edit'" style="margin-left: 10px;">源语言:{{Add_form.from_value}}</div>
          </el-form-item>
          <el-form-item>
            <el-button :loading="loading.add" type="primary" @click="submit">
              <span v-if="!loading.add">保 存</span>
              <span v-else>提 交 中...</span>
            </el-button>
            <el-button @click="dialog.addDialogStatus=false">取消</el-button>
 
          </el-form-item>
        </el-form>
 
 
 
      </el-dialog>
    </div>
  </body>
  <!-- 共用的方法 -->
  <script src="/static/vue/mixin_admin.js"></script>
  <script language="JavaScript">
    const viewPath = '{$viewPath}';
  </script>
  <script src="/static/admin/js/language_pag/index.js?v=<?php echo rand(1000,9999)?>"></script>
 
</html>