.
This commit is contained in:
9
root/api/dict.js
Normal file
9
root/api/dict.js
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
/**
|
||||||
|
* 字典管理
|
||||||
|
* @type {{}}
|
||||||
|
*/
|
||||||
|
const dict = {
|
||||||
|
list({type}) {
|
||||||
|
return red.postX('/dict/list', {type})
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -4,9 +4,9 @@
|
|||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
<title>MetaKit</title>
|
<title>MetaKit</title>
|
||||||
<link rel="stylesheet" href="./res/zui/css/zui.min.css">
|
<link rel="stylesheet" href="/res/zui/css/zui.min.css">
|
||||||
<link rel="stylesheet" href="./res/css/zui-theme.css">
|
<link rel="stylesheet" href="/res/css/zui-theme.css">
|
||||||
<link rel="stylesheet" href="./res/css/red-kit.css">
|
<link rel="stylesheet" href="/res/css/red-kit.css">
|
||||||
</head>
|
</head>
|
||||||
<body id="home">
|
<body id="home">
|
||||||
<div class="container-fluid">
|
<div class="container-fluid">
|
||||||
@@ -71,18 +71,19 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!--<script src="https://cdn.jsdelivr.net/npm/vue"></script>-->
|
<!--<script src="https://cdn.jsdelivr.net/npm/vue"></script>-->
|
||||||
<script src="./res/libs/vue.min.js"></script>
|
<script src="/res/libs/vue.min.js"></script>
|
||||||
<script src="./res/zui/lib/jquery/jquery.js"></script>
|
<script src="/res/zui/lib/jquery/jquery.js"></script>
|
||||||
<script src="./res/libs/axios.min.js"></script>
|
<script src="/res/libs/axios.min.js"></script>
|
||||||
<script src="./res/zui/js/zui.js"></script>
|
<script src="/res/zui/js/zui.js"></script>
|
||||||
<script src="./res/js/red.js"></script>
|
<script src="/res/js/red.js"></script>
|
||||||
<script src="./api/meta.js"></script>
|
<script src="/api/meta.js"></script>
|
||||||
<script src="./api/plat.js"></script>
|
<script src="/api/plat.js"></script>
|
||||||
<script src="./api/qtask.js"></script>
|
<script src="/api/qtask.js"></script>
|
||||||
<script src="./api/db.js"></script>
|
<script src="/api/db.js"></script>
|
||||||
<script src="./api/table.js"></script>
|
<script src="/api/table.js"></script>
|
||||||
<script src="./res/zui/lib/sortable/zui.sortable.js"></script>
|
<script src="/api/dict.js"></script>
|
||||||
<script src="./res/zui/lib/uploader/zui.uploader.min.js"></script>
|
<script src="/res/zui/lib/sortable/zui.sortable.js"></script>
|
||||||
|
<script src="/res/zui/lib/uploader/zui.uploader.min.js"></script>
|
||||||
<script type="module">
|
<script type="module">
|
||||||
import { logout } from './api/user.js'
|
import { logout } from './api/user.js'
|
||||||
let { refresh } = meta
|
let { refresh } = meta
|
||||||
|
|||||||
@@ -191,8 +191,12 @@
|
|||||||
</select>
|
</select>
|
||||||
</td>
|
</td>
|
||||||
<td style="padding: 1px;" title="格式化类型为:funs或qtask的时候需要填写附加参数">
|
<td style="padding: 1px;" title="格式化类型为:funs或qtask的时候需要填写附加参数">
|
||||||
<input v-show="item.inType == 'FUNC' || item.inType == 'QTASK' || item.inType == 'DICT'" v-model="item.inExt" class="form-control" style="width: 130px;padding: 0px">
|
<input v-show="item.inType == 'FUNC' || item.inType == 'QTASK'" v-model="item.inExt" class="form-control" style="width: 130px;padding: 0px">
|
||||||
<input disabled v-show="item.inType != 'FUNC' && item.inType != 'QTASK' && item.inType != 'DICT'" v-model="item.inExt" class="form-control" style="width: 130px;padding: 0px">
|
<input disabled v-show="item.inType != 'FUNC' && item.inType != 'QTASK' && item.inType != 'DICT'" v-model="item.inExt" class="form-control" style="width: 130px;padding: 0px">
|
||||||
|
<select v-show="item.inType == 'DICT'" v-model="item.inExt" class="form-control" style="width: 130px">
|
||||||
|
<option></option>
|
||||||
|
<option v-for="x in dictType" :value="x.value">{{x.label}}</option>
|
||||||
|
</select>
|
||||||
</td>
|
</td>
|
||||||
<!--
|
<!--
|
||||||
<td style="padding: 1px;"><input v-model="item.fmt" class="form-control" style="width: 130px;padding: 0px"></td>
|
<td style="padding: 1px;"><input v-model="item.fmt" class="form-control" style="width: 130px;padding: 0px"></td>
|
||||||
@@ -510,10 +514,13 @@
|
|||||||
<script>
|
<script>
|
||||||
let {getServiceInfo, getServiceDetail, getServiceList, tableLinkList, serviceSave, showSave, filterSave, exportSave, detailSave, editSave, delSave} = meta;
|
let {getServiceInfo, getServiceDetail, getServiceList, tableLinkList, serviceSave, showSave, filterSave, exportSave, detailSave, editSave, delSave} = meta;
|
||||||
let {showOk} = red
|
let {showOk} = red
|
||||||
|
let {list:dictList} = dict
|
||||||
|
|
||||||
var vm = new Vue({
|
var vm = new Vue({
|
||||||
el: ".meta-service",
|
el: ".meta-service",
|
||||||
data: {
|
data: {
|
||||||
|
dictType: [], //字典类型
|
||||||
|
|
||||||
//new
|
//new
|
||||||
sheetArr: ["a"],//别名
|
sheetArr: ["a"],//别名
|
||||||
sheet: "a",//别名
|
sheet: "a",//别名
|
||||||
@@ -1087,7 +1094,12 @@
|
|||||||
|
|
||||||
},
|
},
|
||||||
mounted: function () {
|
mounted: function () {
|
||||||
this.serviceList();
|
this.serviceList()
|
||||||
|
|
||||||
|
dictList({type:"dict"}).then(res => {
|
||||||
|
this.dictType = res
|
||||||
|
console.log(res)
|
||||||
|
})
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ import java.util.Map;
|
|||||||
@RestService(name = "dict", automapping = true, comment = "字典服务")
|
@RestService(name = "dict", automapping = true, comment = "字典服务")
|
||||||
public class DictService extends BaseService {
|
public class DictService extends BaseService {
|
||||||
|
|
||||||
@RestMapping(name = "list")
|
@RestMapping(name = "list", comment = "根据type 加载对应的字典列表")
|
||||||
public JBean list(@RestParam(name = "platToken") String token, String type) {
|
public JBean list(@RestParam(name = "platToken") String token, String type) {
|
||||||
JBean jBean = new JBean();
|
JBean jBean = new JBean();
|
||||||
DictKit dictKit = DictKit.use(token);
|
DictKit dictKit = DictKit.use(token);
|
||||||
|
|||||||
Reference in New Issue
Block a user