mirror of https://gitee.com/stylefeng/guns
parent
c666b24710
commit
cc15723acb
@ -0,0 +1,11 @@
|
||||
INSERT INTO `guns_beetl_dev`.`sys_dict` (`dict_id`, `dict_code`, `dict_name`, `dict_name_pinyin`, `dict_encode`, `dict_type_code`, `dict_short_name`, `dict_short_code`, `dict_parent_id`, `status_flag`, `dict_sort`, `dict_pids`, `del_flag`, `create_time`, `create_user`, `update_time`, `update_user`) VALUES (1353998066804658177, 'chinese', '中文', 'zw', NULL, 'languages', '', '', -1, 1, 1.00, '-1', 'N', '2021-01-26 17:27:50', 1339550467939639299, NULL, NULL);
|
||||
INSERT INTO `guns_beetl_dev`.`sys_dict` (`dict_id`, `dict_code`, `dict_name`, `dict_name_pinyin`, `dict_encode`, `dict_type_code`, `dict_short_name`, `dict_short_code`, `dict_parent_id`, `status_flag`, `dict_sort`, `dict_pids`, `del_flag`, `create_time`, `create_user`, `update_time`, `update_user`) VALUES (1353998106784763906, 'english', '英文', 'yw', NULL, 'languages', '', '', -1, 1, 2.00, '-1', 'N', '2021-01-26 17:27:59', 1339550467939639299, NULL, NULL);
|
||||
INSERT INTO `guns_beetl_dev`.`sys_dict_type` (`dict_type_id`, `dict_type_class`, `dict_type_bus_code`, `dict_type_code`, `dict_type_name`, `dict_type_name_pinyin`, `dict_type_desc`, `status_flag`, `dict_type_sort`, `del_flag`, `create_time`, `create_user`, `update_time`, `update_user`) VALUES (1353997993299480577, 2, '', 'languages', '语种', 'yz', 'i18n 多语言', 1, 7.00, 'N', '2021-01-26 17:27:32', 1339550467939639299, NULL, NULL);
|
||||
|
||||
|
||||
ALTER TABLE `sys_translation` CHANGE COLUMN `language` `tran_language_code` varchar(255) NOT NULL COMMENT '语种字典';
|
||||
|
||||
update sys_translation set tran_language_code='chinese' where tran_language_code='1';
|
||||
update sys_translation set tran_language_code='english' where tran_language_code='2';
|
||||
|
||||
|
@ -0,0 +1,25 @@
|
||||
layui.use(['form', 'admin', 'HttpRequest'], function () {
|
||||
var $ = layui.jquery;
|
||||
var form = layui.form;
|
||||
var admin = layui.admin;
|
||||
var HttpRequest = layui.HttpRequest;
|
||||
|
||||
//获取信息详情填充表单
|
||||
var request = new HttpRequest(Feng.ctxPath + '/dictType/getTranslationDetail', 'get');
|
||||
var result = request.start();
|
||||
form.val('dictForm', result.data);
|
||||
|
||||
//表单提交事件
|
||||
form.on('submit(btnSubmit)', function (data) {
|
||||
var request = new HttpRequest(Feng.ctxPath + "/dict/addDict", 'post', function (data) {
|
||||
admin.closeThisDialog();
|
||||
Feng.success("添加成功!");
|
||||
admin.putTempData('formOk', true);
|
||||
}, function (data) {
|
||||
admin.closeThisDialog();
|
||||
Feng.error("添加失败!" + data.message);
|
||||
});
|
||||
request.set(data.field);
|
||||
request.start(true);
|
||||
});
|
||||
});
|
@ -1,4 +1,4 @@
|
||||
@layout("/layout/_form.html",{js:["/assets/modular/system/config/config_add.js"]}){
|
||||
@layout("/layout/_form.html",{js:["/assets/modular/system/dict/dict_add_config.js"]}){
|
||||
|
||||
<form class="layui-form" id="dictForm" lay-filter="dictForm">
|
||||
<div class="layui-fluid" style="padding-bottom: 75px;">
|
@ -0,0 +1,57 @@
|
||||
@layout("/layout/_form.html",{js:["/assets/modular/system/dict/dict_add_translation.js"]}){
|
||||
|
||||
<form class="layui-form" id="dictForm" lay-filter="dictForm">
|
||||
<div class="layui-fluid" style="padding-bottom: 75px;">
|
||||
<div class="layui-card">
|
||||
<div class="layui-card-body">
|
||||
<div class="layui-form-item layui-row">
|
||||
<input id="dictTypeId" name="dictTypeId" type="hidden"/>
|
||||
<input id="dictTypeCode" name="dictTypeCode" type="hidden"/>
|
||||
<div class="layui-inline layui-col-md12">
|
||||
<label class="layui-form-label layui-form-required">字典类型</label>
|
||||
<div class="layui-input-block">
|
||||
<input id="dictTypeName" name="dictTypeName" placeholder="" type="text" class="layui-input" lay-verify="required" readonly/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-inline layui-col-md6">
|
||||
<label class="layui-form-label layui-form-required">字典名称</label>
|
||||
<div class="layui-input-block">
|
||||
<input id="dictName" name="dictName" placeholder="请输入字典名称" type="text" class="layui-input" lay-verify="required" required/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-inline layui-col-md6">
|
||||
<label class="layui-form-label">字典简称</label>
|
||||
<div class="layui-input-block">
|
||||
<input id="dictShortName" name="dictShortName" placeholder="请输入简称" type="text" class="layui-input"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-inline layui-col-md6">
|
||||
<label class="layui-form-label layui-form-required">字典编码</label>
|
||||
<div class="layui-input-block">
|
||||
<input id="dictCode" name="dictCode" placeholder="请输入字典编码" type="text" class="layui-input" lay-verify="required" required/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-inline layui-col-md6">
|
||||
<label class="layui-form-label">编码简写</label>
|
||||
<div class="layui-input-block">
|
||||
<input id="dictShortCode" name="dictShortCode" placeholder="请输入编码简写" type="text" class="layui-input"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-inline layui-col-md12">
|
||||
<label class="layui-form-label">排序</label>
|
||||
<div class="layui-input-block">
|
||||
<input id="dictSort" name="dictSort" placeholder="请输入字典排序" type="text" class="layui-input" lay-verify="required" required>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group-bottom text-center">
|
||||
<button class="layui-btn" lay-filter="btnSubmit" lay-submit> 提交 </button>
|
||||
<button type="reset" class="layui-btn layui-btn-primary" ew-event="closeDialog"> 取消 </button>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
@}
|
Loading…
Reference in new issue