Your ROOT_URL in app.ini is http://git.zky.com/ but you are visiting http://61.178.84.89:8998/luoluo/ry_zhky/commit/862b585f0426b8eff0a5fbb676e067123ed5f108?style=unified&whitespace=show-all
You should set ROOT_URL correctly, otherwise the web may not work correctly.
7 changed files with
299 additions and
26 deletions
@ -0,0 +1,16 @@
function getCity ( datas , value ) {
if ( $ . common . isEmpty ( datas ) || $ . common . isEmpty ( value ) ) {
return '' ;
}
var actions = [ ]
$ . each ( datas , function ( index , city ) {
if ( city . id === ( '' + value ) ) {
actions . push ( $ . common . sprintf ( "<span>%s</span>" , city . name ) ) ;
return false ;
}
} ) ;
if ( actions . length === 0 ) {
actions . push ( $ . common . sprintf ( "<span>%s</span>" , value ) )
}
return actions . join ( '' ) ;
}
@ -39,6 +39,7 @@
< script th:src = "@{/ruoyi/js/common.js?v=4.7.7}" > < / script >
< script th:src = "@{/ruoyi/js/ry-ui.js?v=4.7.7}" > < / script >
< script th:src = "@{/ruoyi/js/vue.js?v=4.7.7}" > < / script >
< script th:src = "@{/ruoyi/js/getCity.js?v=4.7.7}" > < / script >
< / div >
<!-- ztree树插件 -->
@ -7,18 +7,28 @@
< th:block th:include = "include :: datetimepicker-css" / >
< / head >
< body class = "white-bg" >
< div class = "wrapper wrapper-content animated fadeInRight ibox-content" >
< div class = "wrapper wrapper-content animated fadeInRight ibox-content" id = "app" >
< form class = "form-horizontal m" id = "form-fileprovide-add" >
< div class = "form-group" >
< label class = "col-sm-3 control-label is-required" > 所属市州 : < / label >
< label class = "col-sm-3 control-label is-required" > 所属地 市:< / label >
< div class = "col-sm-8" >
< input name = "frameworkId" required class = "form-control" type = "text" >
< select id = "City" name = "frameworkId" required @ change = "getAreaList()" v-model = "City" class = "form-control m-b" >
< option value = "" > 请选择< / option >
< option v-for = "option in CityList" :value = "option.id" :key = "option.id" >
{{ option.name }}
< / option >
< / select >
< / div >
< / div >
< div class = "form-group" >
< label class = "col-sm-3 control-label is-required" > 所属区县:< / label >
< div class = "col-sm-8" >
< input name = "areaid" required class = "form-control" type = "text" >
< select id = "Area" name = "areaid" v-model = "Area" class = "form-control m-b" >
< option value = "" > 请选择< / option >
< option v-for = "option in AreaList" :value = "option.id" :key = "option.id" >
{{ option.name }}
< / option >
< / select >
< / div >
< / div >
< div class = "form-group" >
@ -115,7 +125,48 @@
$("#form-fileprovide-add").validate({
focusCleanup: true
});
var app = new Vue({
el: '#app',
data: {
CityList: [],
AreaList:[],
City:'',
Area:'',
params:{
parentId:'',
}
},
mounted(){
// 初始化地市列表
this.getCityList();
if (this.City){
this.getAreaList()
}
},
methods:{
getCityList(){
$.ajax({
url: ctx + "system/area/getSysAreaList",
type: 'GET',
data:this.params ,
success:((res)=>{
this.CityList = res.data
}) ,
});
},
getAreaList(){
this.params.parentId = this.City
$.ajax({
url: ctx + "system/area/getSysAreaList",
type: 'GET',
data:this.params,
success:((res)=>{
this.AreaList = res.data
}) ,
});
}
}
})
function submitHandler() {
if ($.validate.form()) {
$.operate.save(prefix + "/add", $('#form-fileprovide-add').serialize());
@ -4,7 +4,7 @@
< th:block th:include = "include :: header('文件下发列表')" / >
< / head >
< body class = "gray-bg" >
< div class = "container-div" >
< div class = "container-div" id = "app" >
< div class = "row" >
< div class = "col-sm-12 search-collapse" >
< form id = "formId" >
@ -23,7 +23,12 @@
< / li >
< li >
< label > 所属地区:< / label >
< input type = "text" name = "frameworkId" / >
< select id = "City" name = "frameworkId" @ change = "getAreaList()" v-model = "City" >
< option value = "" > 请选择< / option >
< option v-for = "option in CityList" :value = "option.id" :key = "option.id" >
{{ option.name }}
< / option >
< / select >
< / li >
< li >
< label > 文件标题:< / label >
@ -58,7 +63,15 @@
var instancyExtentDatas = [[${@dict.getType('sys_file_jinjichengdu')}]];
var fileSecretDatas = [[${@dict.getType('sys_file_miji')}]];
var prefix = ctx + "system/fileprovide";
let datas = []
$.ajax({
url: ctx + "system/area/getAllList",
type: 'GET',
data:{parentId:''} ,
success:((res)=>{
datas = res.data
}) ,
});
$(function() {
var options = {
url: prefix + "/list",
@ -103,7 +116,10 @@
},
{
field: 'frameworkId',
title: '所属地区'
title: '所属地区',
formatter: function(value, row, index) {
return getCity(datas, value)
}
},
{
field: 'fileSecret',
@ -125,6 +141,32 @@
};
$.table.init(options);
});
var app = new Vue({
el: '#app',
data: {
CityList: [],
City:'',
params:{
parentId:'',
}
},
mounted(){
// 初始化地市列表
this.getCityList();
},
methods:{
getCityList(){
$.ajax({
url: ctx + "system/area/getSysAreaList",
type: 'GET',
data:this.params ,
success:((res)=>{
this.CityList = res.data
}) ,
});
},
}
})
< / script >
< / body >
< / html >
@ -5,18 +5,28 @@
< th:block th:include = "include :: datetimepicker-css" / >
< / head >
< body class = "white-bg" >
< div class = "wrapper wrapper-content animated fadeInRight ibox-content" >
< div class = "wrapper wrapper-content animated fadeInRight ibox-content" id = "app" >
< form class = "form-horizontal m" id = "form-property-add" >
< div class = "form-group" >
< label class = "col-sm-3 control-label is-required" > 所属市州 : < / label >
< label class = "col-sm-3 control-label is-required" > 所属地 市:< / label >
< div class = "col-sm-8" >
< input name = "part" class = "form-control" type = "text" required >
< select id = "City" name = "part" required @ change = "getAreaList()" v-model = "City" class = "form-control m-b" >
< option value = "" > 请选择< / option >
< option v-for = "option in CityList" :value = "option.id" :key = "option.id" >
{{ option.name }}
< / option >
< / select >
< / div >
< / div >
< div class = "form-group" >
< label class = "col-sm-3 control-label is-required" > 所属区县:< / label >
< div class = "col-sm-8" >
< input name = "areaId" class = "form-control" type = "text" required >
< select id = "Area" name = "areaId" required v-model = "Area" class = "form-control m-b" >
< option value = "" > 请选择< / option >
< option v-for = "option in AreaList" :value = "option.id" :key = "option.id" >
{{ option.name }}
< / option >
< / select >
< / div >
< / div >
< div class = "form-group" >
@ -82,7 +92,48 @@
$("#form-property-add").validate({
focusCleanup: true
});
var app = new Vue({
el: '#app',
data: {
CityList: [],
AreaList:[],
City:'',
Area:'',
params:{
parentId:'',
}
},
mounted(){
// 初始化地市列表
this.getCityList();
if (this.City){
this.getAreaList()
}
},
methods:{
getCityList(){
$.ajax({
url: ctx + "system/area/getSysAreaList",
type: 'GET',
data:this.params ,
success:((res)=>{
this.CityList = res.data
}) ,
});
},
getAreaList(){
this.params.parentId = this.City
$.ajax({
url: ctx + "system/area/getSysAreaList",
type: 'GET',
data:this.params,
success:((res)=>{
this.AreaList = res.data
}) ,
});
}
}
})
function submitHandler() {
if ($.validate.form()) {
$.operate.save(prefix + "/add", $('#form-property-add').serialize());
@ -5,7 +5,7 @@
< th:block th:include = "include :: datetimepicker-css" / >
< / head >
< body class = "white-bg" >
< div class = "wrapper wrapper-content animated fadeInRight ibox-content" >
< div class = "wrapper wrapper-content animated fadeInRight ibox-content" id = "app" >
< form class = "form-horizontal m" id = "form-property-edit" th:object = "${tdPropertyManager}" >
< input name = "useId" th:field = "*{useId}" type = "hidden" >
< div class = "form-group" >
@ -63,15 +63,25 @@
< / div >
< / div >
< div class = "form-group" >
< label class = "col-sm-3 control-label is-required" > 所属市州 : < / label >
< label class = "col-sm-3 control-label is-required" > 所属地 市:< / label >
< div class = "col-sm-8" >
< input name = "part" required th:field = "*{part}" class = "form-control" type = "text" >
< select id = "City" name = "part" required @ change = "getAreaList()" v-model = "City" class = "form-control m-b" >
< option value = "" > 请选择< / option >
< option v-for = "option in CityList" :value = "option.id" :key = "option.id" >
{{ option.name }}
< / option >
< / select >
< / div >
< / div >
< div class = "form-group" >
< label class = "col-sm-3 control-label is-required" > 所属区县:< / label >
< div class = "col-sm-8" >
< input name = "areaId" required th:field = "*{areaId}" class = "form-control" type = "text" >
< select id = "Area" name = "areaId" required v-model = "Area" class = "form-control m-b" >
< option value = "" > 请选择< / option >
< option v-for = "option in AreaList" :value = "option.id" :key = "option.id" >
{{ option.name }}
< / option >
< / select >
< / div >
< / div >
< div class = "form-group" >
@ -89,7 +99,48 @@
$("#form-property-edit").validate({
focusCleanup: true
});
var app = new Vue({
el: '#app',
data: {
CityList: [],
AreaList:[],
City:[[${tdPropertyManager.part}]],
Area:[[${tdPropertyManager.areaId}]],
params:{
parentId:'',
}
},
mounted(){
// 初始化地市列表
this.getCityList();
if (this.City){
this.getAreaList()
}
},
methods:{
getCityList(){
$.ajax({
url: ctx + "system/area/getSysAreaList",
type: 'GET',
data:this.params ,
success:((res)=>{
this.CityList = res.data
}) ,
});
},
getAreaList(){
this.params.parentId = this.City
$.ajax({
url: ctx + "system/area/getSysAreaList",
type: 'GET',
data:this.params,
success:((res)=>{
this.AreaList = res.data
}) ,
});
}
}
})
function submitHandler() {
if ($.validate.form()) {
$.operate.save(prefix + "/edit", $('#form-property-edit').serialize());
@ -4,7 +4,7 @@
< th:block th:include = "include :: header('资产登记列表')" / >
< / head >
< body class = "gray-bg" >
< div class = "container-div" >
< div class = "container-div" id = "app" >
< div class = "row" >
< div class = "col-sm-12 search-collapse" >
< form id = "formId" >
@ -19,8 +19,13 @@
< input type = "text" name = "useId" / >
< / li >
< li >
< label > 所在市州:< / label >
< input type = "text" name = "part" / >
< label > 所属市州:< / label >
< select id = "City" name = "part" @ change = "getAreaList()" v-model = "City" >
< option value = "" > 请选择< / option >
< option v-for = "option in CityList" :value = "option.id" :key = "option.id" >
{{ option.name }}
< / option >
< / select >
< / li >
< li >
< a class = "btn btn-primary btn-rounded btn-sm" onclick = "$.table.search()" > < i class = "fa fa-search" > < / i > 搜索< / a >
@ -56,7 +61,15 @@
var removeFlag = [[${@permission.hasPermi('system:property:remove')}]];
var listFlag = [[${@permission.hasPermi('system:property:list')}]];
var prefix = ctx + "system/property";
let datas = []
$.ajax({
url: ctx + "system/area/getAllList",
type: 'GET',
data:{parentId:''} ,
success:((res)=>{
datas = res.data
}) ,
});
$(function() {
var options = {
url: prefix + "/list",
@ -74,11 +87,17 @@
},
{
field: 'part',
title: '所属市州'
title: '所属市州',
formatter: function(value, row, index) {
return getCity(datas, value)
}
},
{
field: 'areaId',
title: '所属区县'
title: '所属区县',
formatter: function(value, row, index) {
return getCity(datas, value)
}
},
{
field: 'useDepart',
@ -110,6 +129,48 @@
};
$.table.init(options);
});
var app = new Vue({
el: '#app',
data: {
CityList: [],
AreaList:[],
City:'',
Area:'',
params:{
parentId:'',
}
},
mounted(){
// 初始化地市列表
this.getCityList();
if (this.City){
this.getAreaList()
}
},
methods:{
getCityList(){
$.ajax({
url: ctx + "system/area/getSysAreaList",
type: 'GET',
data:this.params ,
success:((res)=>{
this.CityList = res.data
}) ,
});
},
getAreaList(){
this.params.parentId = this.City
$.ajax({
url: ctx + "system/area/getSysAreaList",
type: 'GET',
data:this.params,
success:((res)=>{
this.AreaList = res.data
}) ,
});
}
}
})
/*资产列表-详细*/
function detail(useId) {
var url = prefix + '/detail/' + useId;
@ -117,4 +178,4 @@
}
< / script >
< / body >
< / html >
< / html >