Authored by zhichao

fix:修改巡检报表数据源管理access_token为accessToken

... ... @@ -153,7 +153,7 @@ layui.define(['table', 'form', 'laydate', 'common', 'sessions', 'xmSelect', 'lay
form.render();
if (pollName) {
var url = common.domainName + '/inspection-report/dataSource/findByPollName';
$.get(url, {'pollName': pollName, 'access_token': accessToken}, function (res) {
$.get(url, {'pollName': pollName, 'accessToken': accessToken}, function (res) {
if (res.object) {
let data = res.object;
var $form = $("#datasourceAddForm");
... ... @@ -223,12 +223,12 @@ layui.define(['table', 'form', 'laydate', 'common', 'sessions', 'xmSelect', 'lay
form.on('submit(datasource-add-submit)', function (data) {
var bean = data.field;
var loading = layer.load(2);
$.ajax({
admin.req({
type: 'post',
url: common.domainName + '/inspection-report/dataSource/saveOrUpdate',
contentType: "application/json; charset=utf-8",
data: JSON.stringify(bean),
success: function (res) {
data: JSON.stringify(bean)
}).done(function (res) {
layer.close(loading);
if (res.success) {
layer.msg('保存成功', {
... ... @@ -243,7 +243,6 @@ layui.define(['table', 'form', 'laydate', 'common', 'sessions', 'xmSelect', 'lay
layer.msg(res.msg, {offset: '15px', icon: 7, time: 1500});
return false
}
}
});
})
... ... @@ -252,8 +251,8 @@ layui.define(['table', 'form', 'laydate', 'common', 'sessions', 'xmSelect', 'lay
admin.req({
url: `${common.domainName}/inspection-report/dataSource/findAllDatabase`,
method: 'GET',
async: false,
success: function (res) {
async: false
}).done(function (res) {
data = res.data;
if (res && res.data) {
var options = "<option value=''>=请选择=</option>";
... ... @@ -263,7 +262,6 @@ layui.define(['table', 'form', 'laydate', 'common', 'sessions', 'xmSelect', 'lay
$('#instance').html($(options));
}
form.render('select');
}
});
}
... ...