提交 e81e36f1 authored 作者: 钟是志's avatar 钟是志

26863 单位信息添加--就业处自行后台添加单位信息,,,密码没有限制

上级 20026e83
...@@ -75,7 +75,7 @@ export function requestFileInfo(url, datas) { ...@@ -75,7 +75,7 @@ export function requestFileInfo(url, datas) {
for (let key in datas) { for (let key in datas) {
formData.append(key, datas[key]); formData.append(key, datas[key]);
} }
return fetch(queryApiActionPath() + url, { return fetch(url && url.indexOf('http') > -1 ? url : queryApiActionPath() + url, {
headers: { headers: {
Accept: 'application/json', Accept: 'application/json',
// Authorization: `bearer ${getToken()}`, // Authorization: `bearer ${getToken()}`,
...@@ -129,10 +129,10 @@ export function giveFilePostDataInfoForTrue(datas, url){ ...@@ -129,10 +129,10 @@ export function giveFilePostDataInfoForTrue(datas, url){
url = url.replace(url, `/safe/${roleGroup}/` + url); url = url.replace(url, `/safe/${roleGroup}/` + url);
url = url.replaceAll('//', '/'); url = url.replaceAll('//', '/');
} }
console.table({ // console.table({
datas, // datas,
url, // url,
}); // });
let file = new File([JSON.stringify(datas)], 'fileParams.jpeg', { let file = new File([JSON.stringify(datas)], 'fileParams.jpeg', {
type: 'image/jpeg', type: 'image/jpeg',
}); });
...@@ -159,15 +159,15 @@ function giveFilePostData(datas, url) { ...@@ -159,15 +159,15 @@ function giveFilePostData(datas, url) {
if (url.indexOf(item.api) > -1) { if (url.indexOf(item.api) > -1) {
const roleGroup = getUserInfo().groupsId; const roleGroup = getUserInfo().groupsId;
if (url.indexOf('http') > -1) { if (url.indexOf('http') > -1) {
url = url.replace('/onestop/', `/onestop/safe/${roleGroup}/` + url); url = url.replace('/onestop/', `/onestop/safe/${roleGroup}/`);
} else { } else {
url = url.replace(url, `/safe/${roleGroup}/` + url); url = url.replace(url, `/safe/${roleGroup}/` + url);
url = url.replaceAll('//', '/'); url = url.replaceAll('//', '/');
} }
console.table({ // console.table({
datas, // datas,
url, // url,
}); // });
let file = new File([JSON.stringify(datas)], 'fileParams.jpeg', { let file = new File([JSON.stringify(datas)], 'fileParams.jpeg', {
type: 'image/jpeg', type: 'image/jpeg',
}); });
......
return {
onClick: () => {
/*
name 字段名称;code obj.字段编码(取值);
required 是否必填;
type:数据处理 0 不处理、1 时间类型、2 json类型
*/
let isAdd = true; //true 新增;false 编辑;
let tips1 = '添加成功';
let tips2 = '添加失败';
let t1 = obj.KUFmMsSaUIE$KUFmTUYkyAg;
if (!isAdd) {
//d.push({name:'row_id',code:obj.KTOyGAfiEWJ,required:0}); // row_id字段编码
tips1 = '编辑成功';
} else {
tips2 = '编辑成功';
}
// 第一步
let d = [{ name: 'zppc', code: obj.KUFivNcDDCo, required: 1, type: 0 },
{ name: 'jbkssj', code: t1[0], required: 0, type: 1 },
{ name: 'jbjssj', code: t1[1], required: 0, type: 1 },
{ name: 'zpsm', code: obj.LdEBsnQIQGJ, required: 1, type: 0 },
{ name: 'jbdw', code: obj.KUFmZSdymPU, required: 1, type: 0 },
{ name: 'host_address', code: obj.LdTHUFeGtPl, required: 1, type: 0 },
{ name: 'enclosure', code: obj.LdglNTQkWTE, required: 1, type: 2 },
{ name: 'is_open', code: '0', required: 1, type: 0 }];
let json = {}, state = true;
for (var j = 0, len = d.length; j < len; j++) {
if (d[j].type === 0) {
json[d[j].name] = d[j].code ? d[j].code : '';
} else if (d[j].type === 1) {
json[d[j].name] = d[j].code ? utils.moment(d[j].code).format('YYYY-MM-DD HH:mm:ss') : null;
} else if (d[j].type === 2) {
json[d[j].name] = d[j].code ? JSON.stringify(d[j].code) : null;
} else {
json[d[j].name] = d[j].code ? d[j].code : null;
}
}
utils.form.validateFields().then((values) => {
// console.log(json)
utils.req('/SnowflakeUtilApi/decode', 'POST', { code: 'KUFlhnvfnfE' }, (res) => { //转码 第二步
utils.req('/DataObjApi/addFormData', 'POST', {
objId: res,
isAdd: isAdd,
data: JSON.stringify(json),
}, (datas) => { // 操作
if (datas) {
utils.message.success(tips1);
//刷新列表 第三步
// let sq = obj.id_2e9a743624357245e12a0882ea6999de5cdb
let xs = obj.id_649873f1230722403e2aa4022a6faa4ceec7; // 初始化渲染的单元格id
xs.time = new Date().valueOf();
utils.setValues({ id_649873f1230722403e2aa4022a6faa4ceec7: xs });
//关闭弹框 第四步
utils.closeModal('a05771be-44c9-4fd6-b579-f8d7b2133206');
} else {
utils.message.error(tips2);
}
});
});
}).catch(errorInfo => {
console.log('errorInfo------------->', errorInfo);
utils.message.error('请填写必填项!');
});
},
};
...@@ -62,7 +62,7 @@ import PictureSignature, { ...@@ -62,7 +62,7 @@ import PictureSignature, {
SignArray, SignArray,
} from '@/webPublic/one_stop_public/libs/PictureSignature/PictureSignature'; } from '@/webPublic/one_stop_public/libs/PictureSignature/PictureSignature';
import WangEditor from '@/webPublic/zyd_public/WangEditor/OnstopWang'; import WangEditor from '@/webPublic/zyd_public/WangEditor/OnstopWang';
import { uaaRequest } from '@/webPublic/one_stop_public/utils/request'; import { noPrefix, noPrefixRequest, uaaRequest } from '@/webPublic/one_stop_public/utils/request';
import { giveFilePostDataInfoForTrue } from '@/webPublic/one_stop_public/Base16'; import { giveFilePostDataInfoForTrue } from '@/webPublic/one_stop_public/Base16';
const { TextArea } = Input; const { TextArea } = Input;
...@@ -767,29 +767,8 @@ export default class tableCom extends Component { ...@@ -767,29 +767,8 @@ export default class tableCom extends Component {
} }
} }
const newData = giveFilePostDataInfoForTrue(url, params); // const newData = giveFilePostDataInfoForTrue(params,url);
params = newData.datas; noPrefixRequest(url, params).then(data => {
url = newData.url;
if (getToken() != null) {
params.token = getToken();
}
const requestParams = params;
const umiRequest = extend({
errorHandler, // 默认错误处理
credentials: 'omit', // 默认请求是否带上cookie
mode: 'cors',
...options,
});
if (url.indexOf('localhost') > -1) {
url = url.replace(window.location.origin, window.specialImportantSystemConfig?.gateWayPort);
}
umiRequest(url, {
data: requestParams,
method: method,
requestType: 'form',
})
.then(data => {
// if (!data || !Array.isArray(data)) { // if (!data || !Array.isArray(data)) {
// data = []; // data = [];
// } // }
...@@ -2235,7 +2214,7 @@ ${obj[dataColumn.base52] && obj[dataColumn.base52] !== 'null' ? ...@@ -2235,7 +2214,7 @@ ${obj[dataColumn.base52] && obj[dataColumn.base52] !== 'null' ?
title = title ? title : '起止时间'; title = title ? title : '起止时间';
break; break;
case 'DatePicker': case 'DatePicker':
if (obj[dataColumn.base52] && obj[dataColumn.base52].indexOf('-') === -1) { if (obj[dataColumn.base52] && typeof obj[dataColumn.base52] === 'string' && typeof obj[dataColumn.base52].indexOf('-') <= -1) {
cm = ( cm = (
<span> <span>
{moment(parseInt(obj[dataColumn.base52])) {moment(parseInt(obj[dataColumn.base52]))
......
...@@ -334,6 +334,12 @@ export const dynamicRequest = createServerRequest({ ...@@ -334,6 +334,12 @@ export const dynamicRequest = createServerRequest({
prefix: queryDynamicActionPath(), prefix: queryDynamicActionPath(),
}); });
export const noPrefixRequest = createServerRequest({
method: 'POST',
prefix: '',
});
export const uaaRequest = createServerRequest({ export const uaaRequest = createServerRequest({
method: 'POST', method: 'POST',
prefix: queryOauthActionPath(), prefix: queryOauthActionPath(),
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论