diff --git a/ruoyi-admin/src/main/resources/templates/login.html b/ruoyi-admin/src/main/resources/templates/login.html index 4ff34ca4..08167f9d 100644 --- a/ruoyi-admin/src/main/resources/templates/login.html +++ b/ruoyi-admin/src/main/resources/templates/login.html @@ -27,11 +27,6 @@ height: 80px; position: relative; } - .top .mi{ - position: absolute; - left: 50px; - top: 6px; - } .signinpanel { width: 488px; margin: 0; @@ -72,16 +67,13 @@ - - - - - - +
+ +
diff --git a/ruoyi-admin/src/main/resources/templates/system/carrier/add.html b/ruoyi-admin/src/main/resources/templates/system/carrier/add.html index af10a3a1..34dca965 100644 --- a/ruoyi-admin/src/main/resources/templates/system/carrier/add.html +++ b/ruoyi-admin/src/main/resources/templates/system/carrier/add.html @@ -13,7 +13,7 @@
- +
diff --git a/ruoyi-admin/src/main/resources/templates/system/carrier/edit.html b/ruoyi-admin/src/main/resources/templates/system/carrier/edit.html index 1dc68335..e35440a9 100644 --- a/ruoyi-admin/src/main/resources/templates/system/carrier/edit.html +++ b/ruoyi-admin/src/main/resources/templates/system/carrier/edit.html @@ -13,7 +13,7 @@
- +
diff --git a/ruoyi-admin/src/main/resources/templates/system/carrierIssued/detail.html b/ruoyi-admin/src/main/resources/templates/system/carrierIssued/detail.html index 5abfe8c8..5bb024de 100644 --- a/ruoyi-admin/src/main/resources/templates/system/carrierIssued/detail.html +++ b/ruoyi-admin/src/main/resources/templates/system/carrierIssued/detail.html @@ -15,7 +15,7 @@
- +
diff --git a/ruoyi-admin/src/main/resources/templates/system/carrierIssued/edit.html b/ruoyi-admin/src/main/resources/templates/system/carrierIssued/edit.html index ba186eec..be62d641 100644 --- a/ruoyi-admin/src/main/resources/templates/system/carrierIssued/edit.html +++ b/ruoyi-admin/src/main/resources/templates/system/carrierIssued/edit.html @@ -13,7 +13,7 @@
- +
diff --git a/ruoyi-admin/src/main/resources/templates/system/check/detail.html b/ruoyi-admin/src/main/resources/templates/system/check/detail.html index 90fae7a4..7b6beb44 100644 --- a/ruoyi-admin/src/main/resources/templates/system/check/detail.html +++ b/ruoyi-admin/src/main/resources/templates/system/check/detail.html @@ -42,7 +42,7 @@
- +
diff --git a/ruoyi-admin/src/main/resources/templates/system/checkReport/add.html b/ruoyi-admin/src/main/resources/templates/system/checkReport/add.html index e98c6ffe..c56058a4 100644 --- a/ruoyi-admin/src/main/resources/templates/system/checkReport/add.html +++ b/ruoyi-admin/src/main/resources/templates/system/checkReport/add.html @@ -2,9 +2,9 @@ - + - + -
-
- - - - - - - - - - - - - - - - - - - - - +
+
+ + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - + + + +
+
+
+ 保存 + 返回
- +
+ - + - + } + }) + diff --git a/ruoyi-admin/src/main/resources/templates/system/checkReport/detail.html b/ruoyi-admin/src/main/resources/templates/system/checkReport/detail.html index 7c1fe5e9..fc07be21 100644 --- a/ruoyi-admin/src/main/resources/templates/system/checkReport/detail.html +++ b/ruoyi-admin/src/main/resources/templates/system/checkReport/detail.html @@ -50,7 +50,7 @@ - +
- + 返回
@@ -326,7 +326,7 @@ return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`; }, handleUploadSuccess(row) { - return (response, file) => { + return function (response, file) { if (response.code == web_status.SUCCESS) { row.fileName = response.originalFilename; row.fileUrl = response.url; @@ -335,7 +335,7 @@ }; }, handleRemove(row){ - return () => { + return function () { row.fileName = ''; row.fileUrl = ''; $.modal.msgSuccess("删除成功"); @@ -348,7 +348,34 @@ $.modal.msgWarning('超出个数限制,最多只能上传一个文件!'); }, handlePreview(file){ - window.location.href = ctx + "common/download/resource?resource=" + encodeURI(file.url) ; + $.ajax({ + url: '/common/download/resource?resource=' + file.url, + type: 'GET', + xhrFields: { + responseType: 'blob' + }, + success: function (data, status, xhr) { + let contentType = xhr.getResponseHeader('Content-Type'); + let filename = file.name; + if (navigator.msSaveBlob) { + // 兼容 IE + navigator.msSaveBlob(data, filename); + } else { + let blob = new Blob([data], { type: contentType }); + let url = URL.createObjectURL(blob); + let a = document.createElement('a'); + a.href = url; + a.download = filename; + document.body.appendChild(a); + a.click(); + document.body.removeChild(a); + URL.revokeObjectURL(url); + } + }, + error: function (xhr, status, error) { + console.error('下载文件失败:', error); + } + }); }, validateEndTime(rule, value, callback) { // if (value && this.postForm.checkStartTime && new Date(value).getTime() < new Date(this.postForm.checkStartTime).getTime()) { @@ -359,12 +386,20 @@ }, handleChange(row, expandedRows){ this.loading = true; + var _this = this; if (expandedRows.length > 0) { // 检查缓存中是否已经存在对应的数据 - const cachedRow = this.cachedData.find((item) => item.checkType === row.checkType); + var cachedRow; + for (var i = 0; i < _this.cachedData.length; i++) { + var item = _this.cachedData[i]; + if (item.checkType === row.checkType) { + cachedRow = item; + break; + } + } if (cachedRow) { row.children = cachedRow.children; - this.loading = false; + _this.loading = false; } else { // $.ajax({ // url: '/system/checkReport/checkView/' + row.checkType + '/' + row.typeName, @@ -382,12 +417,22 @@ // }), // }); row.children = [] - this.editcheckTypeDTOS.forEach(item => { + _this.editcheckTypeDTOS.forEach(function (item) { if (item.checkType === row.checkType) { row.children.push(item); } + + // 在ES5中没有Object.assign方法,这里通过遍历属性来模拟其功能 + for (var key in { ifstarts: true }) { + item[key] = { ifstarts: true }[key]; + } + }); + + _this.updateCachedData(_this.cachedData, { + // 在ES5中没有扩展运算符,这里手动合并对象属性 + row: row, + children: row.children }); - this.updateCachedData(this.cachedData, {...row, children: row.children }); this.loading = false } } @@ -395,7 +440,14 @@ handleCheckChange(row, expandedRows){ // console.log(this.editcheckTypeDTOS) // console.log(row) - let existingData = this.editcheckTypeDTOS.find(item => row.itemsType === item.itemsType); + var existingData; + for (var i = 0; i < this.editcheckTypeDTOS.length; i++) { + var item = this.editcheckTypeDTOS[i]; + if (row.itemsType === item.itemsType) { + existingData = item; + break; + } + } if (!this.startsArry){ this.startsArry = [] } @@ -414,7 +466,7 @@ let score = parseFloat(row.score) let realScore = parseFloat(this.postForm.realScore) this.postForm.totalScore = totalScore - score - this.postForm.realScore = realScore - parseFloat(row.realScore) + this.postForm.realScore = realScore - parseFloat(row.realScore == null ? 0 : row.realScore) // let index = this.startsArry.indexOf(row); // if (index > -1) { // this.startsArry.splice(index, 1); @@ -435,7 +487,7 @@ } let realScore = parseFloat(this.postForm.realScore) this.postForm.realScore = realScore + parseFloat(row.realScore) - this.postForm.percentageScore = this.postForm.realScore / this.postForm.totalScore * 100; + this.postForm.percentageScore = (this.postForm.realScore / this.postForm.totalScore * 100).toFixed(2); }, handleInput(row, props) { row.realScore = row.realScore.replace(/[^0-9.]/g, ''); @@ -451,48 +503,75 @@ }, //获取外层数据 getCheckView() { + var _this = this; $.ajax({ url: '/system/checkReport/checkViewParent/sys_check_type_report', type: 'GET', - success: ((res) => { - res.data.forEach(item => { - Object.assign(item, { children: [] }); + success: function(res) { + res.data.forEach(function(item) { + // 在ES5中没有Object.assign方法,通过遍历属性来模拟其功能 + var assignObj = { children: [] }; + for (var key in assignObj) { + item[key] = assignObj[key]; + } }); - this.postForm.checkTypeDTOS = res.data; - }) + _this.postForm.checkTypeDTOS = res.data; + } }); }, getCityList(){ + var _this = this; $.ajax({ url: ctx + "system/area/getSysAreaList", type: 'GET', - data:this.params , - success:((res)=>{ - this.CityList = res.data - }) , + data: this.params, + success: function(res) { + _this.CityList = res.data.filter(function(obj) { + return obj.id === '36625'; + }); + } }); }, - getAreaList(){ - this.params.parentId = this.postForm.framework - // this.postForm.area = '' - $.ajax({ - url: ctx + "system/area/getSysAreaList", - type: 'GET', - data:this.params, - success:((res)=>{ - this.AreaList = res.data - }) , - }); + getAreaList(type){ + if (type === 'mounted'){ + this.params.parentId = this.postForm.framework + // this.postForm.area = '' + var _this = this; + $.ajax({ + url: ctx + "system/area/getSysAreaList", + type: 'GET', + data: this.params, + success: function(res) { + _this.AreaList = res.data; + } + }); + }else{ + this.params.parentId = this.postForm.framework + this.postForm.area = '' + $.ajax({ + url: ctx + "system/area/getSysAreaList", + type: 'GET', + data: this.params, + success: function(res) { + _this.AreaList = res.data; + } + }); + } + }, submitForm() { this.$refs.postForm.validate((valid) => { - const hasEmptyRealScore = this.cachedData.some(item => { - return item.children.some(child => { - return child.starts && !child.realScore; + var hasEmptyRealScore; + var _this = this; + + hasEmptyRealScore = _this.cachedData.some(function (item) { + return item.children.some(function (child) { + return child.starts &&!child.realScore; }); }); if (hasEmptyRealScore){ $.modal.alertWarning("所选自查项内有未评分项,请检查"); + return false } // console.log(hasEmptyRealScore); // console.log(this.cachedData) @@ -502,13 +581,31 @@ // this.postForm.checkTypeDTOS = this.cachedData.reduce((acc, item) => { // return acc.concat(item.children); // }, []); - this.postForm.checkTypeDTOS = this.editcheckTypeDTOS.map(editItem => { - let cachedItem = this.cachedData.find(cachedItem => cachedItem.itemsType === editItem.itemsType); + _this.postForm.checkTypeDTOS = _this.editcheckTypeDTOS.map(function (editItem) { + var cachedItem; + for (var i = 0; i < _this.cachedData.length; i++) { + cachedItem = _this.cachedData[i]; + if (cachedItem.itemsType === editItem.itemsType) { + break; + } else { + cachedItem = null; + } + } + if (cachedItem) { - return {...editItem, ...cachedItem}; + // 在ES5中没有扩展运算符,这里手动合并对象属性 + var mergedItem = {}; + for (var key in editItem) { + mergedItem[key] = editItem[key]; + } + for (var key in cachedItem) { + mergedItem[key] = cachedItem[key]; + } + return mergedItem; } + return editItem; - }) + }); this.postForm.checkStartTime = this.formatISO8601ToDateTime(this.postForm.checkStartTime) this.postForm.checkEndTime = this.formatISO8601ToDateTime(this.postForm.checkEndTime) this.postForm.createTime = this.formatISO8601ToDateTime(this.postForm.createTime) @@ -516,8 +613,8 @@ .then(function (response) { if (response.data.code === 0) { $.operate.successTabCallback(response.data); - }else{ - $.modal.alertError(response.data.msg) + } else { + $.modal.alertError(response.data.msg); } }) .catch(function (error) { diff --git a/ruoyi-admin/src/main/resources/templates/system/checkReport/edit.html b/ruoyi-admin/src/main/resources/templates/system/checkReport/edit.html index 106756d5..df5517e2 100644 --- a/ruoyi-admin/src/main/resources/templates/system/checkReport/edit.html +++ b/ruoyi-admin/src/main/resources/templates/system/checkReport/edit.html @@ -2,9 +2,9 @@ - + - + - -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - -
-
- 保存 - 返回 -
-
-
-
- - - - - - - diff --git a/ruoyi-admin/src/main/resources/templates/system/checkresult/checkresultprint.html b/ruoyi-admin/src/main/resources/templates/system/checkresult/checkresultprint.html index bb732ceb..b304b4aa 100644 --- a/ruoyi-admin/src/main/resources/templates/system/checkresult/checkresultprint.html +++ b/ruoyi-admin/src/main/resources/templates/system/checkresult/checkresultprint.html @@ -1508,7 +1508,7 @@ 检查开始日期:[[${tdCheckReportDTO.checkEndTime}]] - 所属地市 + 所属市州 [[${tdCheckReportDTO.framework}]] 所属区县 [[${tdCheckReportDTO.area}]] diff --git a/ruoyi-admin/src/main/resources/templates/system/checkresult/docheck.html b/ruoyi-admin/src/main/resources/templates/system/checkresult/docheck.html index cc7b587f..159cd89e 100644 --- a/ruoyi-admin/src/main/resources/templates/system/checkresult/docheck.html +++ b/ruoyi-admin/src/main/resources/templates/system/checkresult/docheck.html @@ -22,7 +22,7 @@ - +
- +
diff --git a/ruoyi-admin/src/main/resources/templates/system/destoryCarrier/edit.html b/ruoyi-admin/src/main/resources/templates/system/destoryCarrier/edit.html index fe9c54ad..1cce9ce2 100644 --- a/ruoyi-admin/src/main/resources/templates/system/destoryCarrier/edit.html +++ b/ruoyi-admin/src/main/resources/templates/system/destoryCarrier/edit.html @@ -15,7 +15,7 @@
- +
diff --git a/ruoyi-admin/src/main/resources/templates/system/fileprovide/add.html b/ruoyi-admin/src/main/resources/templates/system/fileprovide/add.html index e028d2d7..3b2c7373 100644 --- a/ruoyi-admin/src/main/resources/templates/system/fileprovide/add.html +++ b/ruoyi-admin/src/main/resources/templates/system/fileprovide/add.html @@ -12,7 +12,7 @@
- +
diff --git a/ruoyi-admin/src/main/resources/templates/system/fileprovide/filenum/print.html b/ruoyi-admin/src/main/resources/templates/system/fileprovide/filenum/print.html index 14321f57..a9cd6eb4 100644 --- a/ruoyi-admin/src/main/resources/templates/system/fileprovide/filenum/print.html +++ b/ruoyi-admin/src/main/resources/templates/system/fileprovide/filenum/print.html @@ -706,7 +706,7 @@ - 所属地市 + 所属市州 接收单位 使用时间 保存地点 diff --git a/ruoyi-admin/src/main/resources/templates/system/fileprovide/filenum/printIssued.html b/ruoyi-admin/src/main/resources/templates/system/fileprovide/filenum/printIssued.html index 27738f63..cdcd069c 100644 --- a/ruoyi-admin/src/main/resources/templates/system/fileprovide/filenum/printIssued.html +++ b/ruoyi-admin/src/main/resources/templates/system/fileprovide/filenum/printIssued.html @@ -1208,7 +1208,7 @@ - 所属地市 + 所属市州 使用人员 保存地点 维护部门 diff --git a/ruoyi-admin/src/main/resources/templates/system/fileprovide/fileprovide.html b/ruoyi-admin/src/main/resources/templates/system/fileprovide/fileprovide.html index d0c20c94..efec7930 100644 --- a/ruoyi-admin/src/main/resources/templates/system/fileprovide/fileprovide.html +++ b/ruoyi-admin/src/main/resources/templates/system/fileprovide/fileprovide.html @@ -23,7 +23,7 @@
  • - + diff --git a/ruoyi-admin/src/main/resources/templates/system/network/network/add.html b/ruoyi-admin/src/main/resources/templates/system/network/network/add.html index 5a53bfd0..3e9102d4 100644 --- a/ruoyi-admin/src/main/resources/templates/system/network/network/add.html +++ b/ruoyi-admin/src/main/resources/templates/system/network/network/add.html @@ -9,7 +9,7 @@
    - +
    - +
    diff --git a/ruoyi-admin/src/main/resources/templates/system/notify/edit.html b/ruoyi-admin/src/main/resources/templates/system/notify/edit.html index 79a48fa4..fdf63c8b 100644 --- a/ruoyi-admin/src/main/resources/templates/system/notify/edit.html +++ b/ruoyi-admin/src/main/resources/templates/system/notify/edit.html @@ -9,7 +9,7 @@
    - +
    - +
    diff --git a/ruoyi-admin/src/main/resources/templates/system/recCarrier/edit.html b/ruoyi-admin/src/main/resources/templates/system/recCarrier/edit.html index 64bedff3..c4cf5fd5 100644 --- a/ruoyi-admin/src/main/resources/templates/system/recCarrier/edit.html +++ b/ruoyi-admin/src/main/resources/templates/system/recCarrier/edit.html @@ -15,7 +15,7 @@
    - +
    diff --git a/ruoyi-admin/src/main/resources/templates/system/train/add.html b/ruoyi-admin/src/main/resources/templates/system/train/add.html index bbd1d442..2d34a126 100644 --- a/ruoyi-admin/src/main/resources/templates/system/train/add.html +++ b/ruoyi-admin/src/main/resources/templates/system/train/add.html @@ -12,7 +12,7 @@
    - +
    diff --git a/ruoyi-admin/src/main/resources/templates/system/train/edit.html b/ruoyi-admin/src/main/resources/templates/system/train/edit.html index fa9d15b5..173aefe1 100644 --- a/ruoyi-admin/src/main/resources/templates/system/train/edit.html +++ b/ruoyi-admin/src/main/resources/templates/system/train/edit.html @@ -13,7 +13,7 @@
    - +
    diff --git a/ruoyi-admin/src/main/resources/templates/system/train/train.html b/ruoyi-admin/src/main/resources/templates/system/train/train.html index 0b932251..6ac540c4 100644 --- a/ruoyi-admin/src/main/resources/templates/system/train/train.html +++ b/ruoyi-admin/src/main/resources/templates/system/train/train.html @@ -15,7 +15,7 @@
  • - + diff --git a/ruoyi-admin/src/main/resources/templates/system/trainnum/trainnum.html b/ruoyi-admin/src/main/resources/templates/system/trainnum/trainnum.html index 64597594..e8004057 100644 --- a/ruoyi-admin/src/main/resources/templates/system/trainnum/trainnum.html +++ b/ruoyi-admin/src/main/resources/templates/system/trainnum/trainnum.html @@ -164,7 +164,7 @@
  • - +
  • @@ -226,7 +226,7 @@ }, { field: 'AREAID', - title: '所属地市', + title: '所属市州', visible: false }, diff --git a/ruoyi-admin/src/main/resources/templates/system/useCarrier/edit.html b/ruoyi-admin/src/main/resources/templates/system/useCarrier/edit.html index 1e1a50d7..2193d5a9 100644 --- a/ruoyi-admin/src/main/resources/templates/system/useCarrier/edit.html +++ b/ruoyi-admin/src/main/resources/templates/system/useCarrier/edit.html @@ -15,7 +15,7 @@
    - +
    +
    @@ -277,7 +277,31 @@ } }); } + document.addEventListener('DOMContentLoaded', function () { + // 获取所有name为role的radio按钮 + var radios = document.querySelectorAll('input[type="radio"]'); + // 遍历所有radio按钮,找到初始选中的按钮并将其设置为可操作状态 + radios.forEach(function (radio) { + if (radio.checked) { + radio.disabled = false; + } + + // 为每个radio按钮添加点击事件监听器 + radio.addEventListener('click', function () { + // 遍历所有radio按钮 + radios.forEach(function (otherRadio) { + // 如果不是当前点击的按钮且未被选中,则设置为禁用状态 + if (otherRadio!== this &&!otherRadio.checked) { + otherRadio.disabled = true; + } else { + // 确保当前选中的按钮及未选中但之前被操作过的按钮为可用状态 + otherRadio.disabled = false; + } + }); + }); + }); + }); $("input[name='birthday']").datetimepicker({ format: "yyyy-mm-dd", minView: "month", diff --git a/ruoyi-admin/src/main/resources/templates/system/user/userApply/userApply.html b/ruoyi-admin/src/main/resources/templates/system/user/userApply/userApply.html index 534e5225..9824998e 100644 --- a/ruoyi-admin/src/main/resources/templates/system/user/userApply/userApply.html +++ b/ruoyi-admin/src/main/resources/templates/system/user/userApply/userApply.html @@ -29,7 +29,7 @@