|
|
@@ -74,7 +74,6 @@
|
|
|
id="saveAndCommit"
|
|
|
text="${saveAndCommitButtonValue}"
|
|
|
onclick='ss.form.submit({url:"<ss:serv name='${saveAndCommit}' dest='${saveAndCommitDest}' parm='${saveAndCommitParam}'/>",width:${saveAndCommitwidth},height:${saveAndCommitheight},minHeight:${saveAndCommitminheight},maxHeight:${saveAndCommitmaxheight},targetWin:null});'<%-- 最后一个参数原来为targetWin:parent导致刷新了顶层窗口,改为null Ben(20251215) --%>
|
|
|
-<%-- onclick='ss.display.reset("dialog",this,"<ss:serv name='${saveAndCommit}' dest='${saveAndCommitDest}' parm='${saveAndCommitParam}'/>",${saveAndCommitwidth},${saveAndCommitheight},${saveAndCommitminheight},${saveAndCommitmaxheight});'--%>
|
|
|
icon-class="bottom-div-save"
|
|
|
></ss-bottom-button>
|
|
|
<!-- 保存并提交按钮 start -->
|
|
|
@@ -88,7 +87,6 @@
|
|
|
<%--只有一个变动--%>
|
|
|
<!-- 只有一个变动时的 停用按钮 start -->
|
|
|
<ss:equal val='${changeNoSize}' val2='1'>
|
|
|
-
|
|
|
<ss-bottom-button
|
|
|
text="${changeNoFunctions[0].desc}"
|
|
|
onclick='ss.form.submit({url:"<ss:serv name='${changeNoFunctions[0].servName}' dest='${changeNoFunctions[0].dest}' parm='{ssObjId:"${ssObjId}",ssObjName:"${ssObjName}","${ssObjIdName}":"${ssObjId}",dataType:"${empty dataType?1:dataType}",requestParentViewObject:"${requestParentViewObject}"}'/>",width:${changeNoFunctions[0].width},height:${changeNoFunctions[0].height},minHeight:${changeNoFunctions[0].minHeight},maxHeight:${changeNoFunctions[0].maxHeight},targetWin:parent});'
|
|
|
@@ -218,177 +216,7 @@
|
|
|
</html>
|
|
|
|
|
|
<script type="module">
|
|
|
- // function objectPickMockAjax(url) {
|
|
|
- // // return null;
|
|
|
- // return new Promise((resolve) => {
|
|
|
- // setTimeout(() => {
|
|
|
- // resolve([
|
|
|
- // // { label: '男', value: '1' },
|
|
|
- // // { label: '女', value: '2' }
|
|
|
- // ]);
|
|
|
- // }, 1);
|
|
|
- // });
|
|
|
- // }
|
|
|
- // // 模拟 Ajax 请求的工具函数
|
|
|
- // const mockAjax = {
|
|
|
- // // 缓存数据,避免重复请求
|
|
|
- // _cache: null,
|
|
|
- //
|
|
|
- // // 获取完整数据
|
|
|
- // async getData() {
|
|
|
- // if (this._cache) return this._cache;
|
|
|
- // const response = await fetch("/newUI/ss/js/level.json");
|
|
|
- // this._cache = await response.json();
|
|
|
- // return this._cache;
|
|
|
- // },
|
|
|
- //
|
|
|
- // // 获取所有省份
|
|
|
- // async getProvinces() {
|
|
|
- // const data = await this.getData();
|
|
|
- // return data.map((item) => ({
|
|
|
- // label: item.name,
|
|
|
- // value: item.code,
|
|
|
- // }));
|
|
|
- // },
|
|
|
- //
|
|
|
- // // 根据省份代码获取城市
|
|
|
- // async getCities(provinceCode) {
|
|
|
- // const data = await this.getData();
|
|
|
- // const province = data.find((p) => p.code === provinceCode);
|
|
|
- // if (!province || !province.children) return [];
|
|
|
- //
|
|
|
- // return province.children
|
|
|
- // .filter((item) => item.city) // 确保是市级数据
|
|
|
- // .map((item) => ({
|
|
|
- // label: item.name,
|
|
|
- // value: item.code,
|
|
|
- // }));
|
|
|
- // },
|
|
|
- //
|
|
|
- // // 根据城市代码获取区县
|
|
|
- // async getDistricts(cityCode) {
|
|
|
- // const data = await this.getData();
|
|
|
- // for (const province of data) {
|
|
|
- // if (!province.children) continue;
|
|
|
- // const city = province.children.find((c) => c.code === cityCode);
|
|
|
- // if (city && city.children) {
|
|
|
- // return city.children.map((item) => ({
|
|
|
- // label: item.name,
|
|
|
- // value: item.code,
|
|
|
- // }));
|
|
|
- // }
|
|
|
- // }
|
|
|
- // return [];
|
|
|
- // },
|
|
|
- // // 模拟专业数据
|
|
|
- // getMajors() {
|
|
|
- // return new Promise((resolve) => {
|
|
|
- // setTimeout(() => {
|
|
|
- // resolve([
|
|
|
- // { label: '计算机科学与技术', value: '08010000' }, // 补齐8位
|
|
|
- // { label: '软件工程', value: '08020000' },
|
|
|
- // { label: '网络工程', value: '08030000' }
|
|
|
- // ]);
|
|
|
- // }, 1000);
|
|
|
- // });
|
|
|
- // },
|
|
|
- // // 模拟班级数据
|
|
|
- // getClasses(majorCode) {
|
|
|
- // // majorCode 会是 '08010000' 这样的格式
|
|
|
- //
|
|
|
- // const classData = {
|
|
|
- // '08010000': [
|
|
|
- // { label: '计科1班', value: '08010001' },
|
|
|
- // { label: '计科2班', value: '08010002' }
|
|
|
- // ],
|
|
|
- // '08020000': [
|
|
|
- // { label: '软件1班', value: '08020001' },
|
|
|
- // { label: '软件2班', value: '08020002' }
|
|
|
- // ],
|
|
|
- // '08030000': [
|
|
|
- // { label: '网络1班', value: '08030001' },
|
|
|
- // { label: '网络2班', value: '08030002' }
|
|
|
- // ]
|
|
|
- // };
|
|
|
- //
|
|
|
- // return new Promise((resolve) => {
|
|
|
- // setTimeout(() => {
|
|
|
- // resolve(classData[majorCode] || []);
|
|
|
- // }, 1000);
|
|
|
- // });
|
|
|
- // }
|
|
|
- // };
|
|
|
- // const doCascade = async function({
|
|
|
- // children = [],
|
|
|
- // url,
|
|
|
- // vm,
|
|
|
- // prefix = 'Option',
|
|
|
- // loadData = () => {},
|
|
|
- // value, // 添加 value 参数用于测试阶段
|
|
|
- // mode = 1
|
|
|
- // }) {
|
|
|
- // try {
|
|
|
- // // 清空所有子级的值和选项
|
|
|
- // children.forEach(child => {
|
|
|
- // vm[child] = '';
|
|
|
- //
|
|
|
- // vm[child+'Option'] = [];
|
|
|
- // });
|
|
|
- //
|
|
|
- // // 测试阶段:使用 loadData 加载模拟数据
|
|
|
- // if (loadData && value) {
|
|
|
- // const data = await loadData(value);
|
|
|
- //
|
|
|
- // // mode=2 时,所有 children 都是同级的,都使用相同的数据
|
|
|
- // if (mode == '2') {
|
|
|
- //
|
|
|
- // children.forEach(child => {
|
|
|
- // vm[child+'Option'] = data;
|
|
|
- // });
|
|
|
- // } else {
|
|
|
- // // 原有的处理方式,只设置第一个子级的数据
|
|
|
- // if (children.length > 0) {
|
|
|
- // vm[children[0]+'Option'] = data;
|
|
|
- // }
|
|
|
- // }
|
|
|
- // return;
|
|
|
- // }
|
|
|
- //
|
|
|
- // // 正式环境:使用 url 加载数据(暂时不用)
|
|
|
- // if (url) {
|
|
|
- // const response = await fetch(url);
|
|
|
- // const data = await response.json();
|
|
|
- // if (children.length > 0) {
|
|
|
- // vm[children[0]+'Option'] = data;
|
|
|
- // }
|
|
|
- // }
|
|
|
- // } catch (error) {
|
|
|
- // console.log('级联数据加载失败:', error);
|
|
|
- // if (children.length > 0) {
|
|
|
- // vm[children[0]+'Option'] = [];
|
|
|
- // }
|
|
|
- // }
|
|
|
- // };
|
|
|
- // // 定义 objPickerLoad 函数
|
|
|
- // async function objPickerLoad(url, optName) {
|
|
|
- // const result = await objectPickMockAjax(url);
|
|
|
- // return result;
|
|
|
- // }
|
|
|
- //
|
|
|
- // // 省市区
|
|
|
- // async function ccpsingleFirstLoad(url) {
|
|
|
- // const provinces = await mockAjax.getProvinces();
|
|
|
- // return provinces;
|
|
|
- // }
|
|
|
- // async function getCcpsingleValue(children,value) {
|
|
|
- // if (children.length == 2) {
|
|
|
- // const result = await mockAjax.getCities(value);
|
|
|
- // return result;
|
|
|
- // }else if (children.length == 1) {
|
|
|
- // const result = await mockAjax.getDistricts(value);
|
|
|
- // return result;
|
|
|
- // }
|
|
|
- // }
|
|
|
+
|
|
|
|
|
|
const data = {};
|
|
|
if (window.SS.dom.formElemConfig) {
|
|
|
@@ -400,47 +228,7 @@
|
|
|
data[key + "Option"] = [];
|
|
|
data[key + "Url"] = config.url;
|
|
|
}
|
|
|
- // 处理级联选择器(hidden)
|
|
|
- // if (config.type === window.SS.dom.TYPE.CCPSINGLE) {
|
|
|
- // config.objP.forEach(function (item, index) {
|
|
|
- // data[item] = "";
|
|
|
- // data[item + "Option"] = [];
|
|
|
- // data[item + "CCPSINGLE"] = true;
|
|
|
- // data[item + "objP"] = config.objP;
|
|
|
- // // 第一个字段需要加载
|
|
|
- // if (index === 0) {
|
|
|
- // data[item + "InitLoad"] = true;
|
|
|
- // }
|
|
|
- // })
|
|
|
- // // 处理级联选择器的url
|
|
|
- // for(let key in config.param) {
|
|
|
- // if(config.param[key].url) {
|
|
|
- // data[key + "Url"] = config.param[key].url;
|
|
|
- // }
|
|
|
- // }
|
|
|
- // }
|
|
|
- // 处理级联,多个
|
|
|
- // if (config.type === window.SS.dom.TYPE.CCPMUTIPLE) {
|
|
|
- // config.objP.forEach(function (item, index) {
|
|
|
- // data[item] = "1";
|
|
|
- //
|
|
|
- // data[item + "Option"] = [];
|
|
|
- // data[item + "CCPMUTIPLE"] = true;
|
|
|
- // data[item + "objP"] = config.objP;
|
|
|
- // // 第一个字段需要加载
|
|
|
- // if (index === 0) {
|
|
|
- // data[item + "InitLoad"] = true;
|
|
|
- //
|
|
|
- // }
|
|
|
- // })
|
|
|
- // // 处理级联选择器的url
|
|
|
- // for(let key in config.param) {
|
|
|
- // if(config.param[key].url) {
|
|
|
- // data[key + "Url"] = config.param[key].url;
|
|
|
- // data[key] = config.param[key].value;
|
|
|
- // }
|
|
|
- // }
|
|
|
- // }
|
|
|
+
|
|
|
// 处理datepicker
|
|
|
if (config.type === window.SS.dom.TYPE.DATE) {
|
|
|
|
|
|
@@ -482,41 +270,7 @@
|
|
|
|
|
|
}
|
|
|
|
|
|
- // //下面是写死的
|
|
|
- // ssVm.add("ss.commonValidator.notNull", ["xm"], {
|
|
|
- // msgPrfx: "姓名",
|
|
|
- // });
|
|
|
- // ssVm.add("ss.commonValidator.notNull", ["ywm"], {
|
|
|
- // msgPrfx: "英文名",
|
|
|
- // });
|
|
|
- // ssVm.add("ss.commonValidator.notNull", ["zh"], {
|
|
|
- // msgPrfx: "帐号",
|
|
|
- // });
|
|
|
- // ssVm.add("ss.commonValidator.notNull", ["ryh"], {
|
|
|
- // msgPrfx: "人员号",
|
|
|
- // });
|
|
|
- // ssVm.add("ss.commonValidator.notNull", ["xbm"], {
|
|
|
- // msgPrfx: "性别",
|
|
|
- // });
|
|
|
- // ssVm.add("ss.commonValidator.notNull", ["zzmmm"], {
|
|
|
- // msgPrfx: "政治面貌",
|
|
|
- // });
|
|
|
- // ssVm.add("ss.commonValidator.notNull", ["rylbm"], {
|
|
|
- // msgPrfx: "人员类别",
|
|
|
- // });
|
|
|
- // ssVm.add("ss.commonValidator.notNull", ["gwid"], {
|
|
|
- // msgPrfx: "岗位",
|
|
|
- // });
|
|
|
- // ssVm.add("ss.commonValidator.notNull", ["csrq"], {
|
|
|
- // msgPrfx: "出生日期",
|
|
|
- // });
|
|
|
- // ssVm.add("ss.commonValidator.notNull", ["csrq"], {
|
|
|
- // msgPrfx: "出生日期",
|
|
|
- // });
|
|
|
- //
|
|
|
- // ssVm.add("ss.commonValidator.notNull", ["mswj"], {
|
|
|
- // msgPrfx: "描述",
|
|
|
- // });
|
|
|
+
|
|
|
|
|
|
|
|
|
// 在这里直接初始化,不需要等待 load 事件
|
|
|
@@ -536,7 +290,7 @@
|
|
|
save(){
|
|
|
$('form').attr('action','<ss:serv name='${save}' dest='${saveDest}' parm='${saveParam}'/>');//name:${save},dest='${saveDest}',parm='${saveParam}'
|
|
|
$('form').submit();
|
|
|
- // wd.display.changeFormAction("<ss:serv name='${save}' dest='${saveDest}' parm='${saveParam}'/>",this,${savewidth},${saveheight},${saveminheight},${savemaxheight});
|
|
|
+
|
|
|
}
|
|
|
},
|
|
|
mounted() {
|
|
|
@@ -544,15 +298,7 @@
|
|
|
const self = this;
|
|
|
// 在这里可以使用 Vue 实例
|
|
|
Object.entries(this.$data).forEach(([key, value]) => {
|
|
|
- // 处理 objPicker
|
|
|
- if (key.includes('ObjPicker')) {
|
|
|
- // const originalKey = key.replace('ObjPicker', '');
|
|
|
- // if (value) {
|
|
|
- // objPickerLoad(value, key).then(result => {
|
|
|
- // this[originalKey+'Option'] = result;
|
|
|
- // });
|
|
|
- // }
|
|
|
- }
|
|
|
+
|
|
|
// 处理 CCPSINGLE
|
|
|
if (key.includes('CCPSINGLE')) {
|
|
|
const originalKey = key.replace('CCPSINGLE', '');
|
|
|
@@ -599,21 +345,7 @@
|
|
|
});
|
|
|
};
|
|
|
}
|
|
|
- // 加载editor
|
|
|
- // if (key.includes('editor')) {
|
|
|
- // const originalKey = key.replace('editor', '');
|
|
|
- // if (this[key]) {
|
|
|
- // fetch(this[key])
|
|
|
- // .then(res => res.text()) // 使用 text() 而不是 data
|
|
|
- // .then(html => {
|
|
|
- // this[originalKey] = html;
|
|
|
- // console.log(this[originalKey])
|
|
|
- // })
|
|
|
- // .catch(error => {
|
|
|
- // console.error("获取HTML文件失败:", error);
|
|
|
- // });
|
|
|
- // }
|
|
|
- // }
|
|
|
+
|
|
|
|
|
|
});
|
|
|
}
|