diff --git a/public/web/ajax.js b/public/web/ajax.js new file mode 100644 index 0000000..2e30c9b --- /dev/null +++ b/public/web/ajax.js @@ -0,0 +1,202 @@ +function get(url, callback) { + var xhr + if (window.XMLHttpRequest) { + xhr = new XMLHttpRequest() + } else { + xhr = new ActiveXObject('Msxml2.XMLHTTP') + } + + console.log(111) + xhr.open('GET', url, true) + xhr.send('') + xhr.dataType = 'json' + xhr.onreadystatechange = function() { + if (xhr.readyState == 4 && xhr.status == 200) { + if (callback) { + callback(xhr.responseText) + } + } + } +} + +function post(url, data, callback) { + var xhr + if (window.XMLHttpRequest) { + xhr = new XMLHttpRequest() + } else { + xhr = new ActiveXObject('Msxml2.XMLHTTP') + } + xhr.open('POST', url, true) + xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded') + xhr.send(data) + xhr.onreadystatechange = function() { + if (xhr.readyState == 4 && xhr.status == 200) { + if (callback) { + callback(xhr.responseText) + } + } + } +} + +//promise +function promise_get(url) { + var promise = new Promise(function(success, error) { + //new一个promise进行函数 + get(url, function(str) { + //get 路径 + success(str) //吧进行时改成完成时 + }) + }) + return promise +} + +//josnp 服务器script +function jsonp(url) { + var script = document.createElement('script') //创建一个script + document.getElementsByTagName('head')[0].appendChild(script) //在页面上获取head在下面添加script + script.src = url //script的路径 +} +// +// function get(url, callback){ +// var xhr; +// if( window.XMLHttpRequest ){ +// xhr = new XMLHttpRequest(); +// }else{ +// xhr = new ActiveXObject("Msxml2.XMLHTTP"); +// } +// xhr.open("GET", url, true); +// xhr.send(); +// xhr.onreadystatechange = function(){ +// if( xhr.readyState==4 && xhr.status==200 ){ +// if( callback ){ +// callback( xhr.responseText ); +// } +// } +// } +// } +// +// function post(url, data, callback){ +// var xhr; +// if( window.XMLHttpRequest ){ +// xhr = new XMLHttpRequest(); +// }else{ +// xhr = new ActiveXObject("Msxml2.XMLHTTP"); +// } +// xhr.open("POST", url, true); +// xhr.setRequestHeader('Content-Type','application/x-www-form-urlencoded'); +// xhr.send(data); +// xhr.onreadystatechange = function(){ +// if( xhr.readyState==4 && xhr.status==200 ){ +// if( callback ){ +// callback( xhr.responseText ); +// } +// } +// } +// } +// +// +//promise +function promise_get(type, url) { + var promise = new Promise(function(success, error) { + //new一个promise进行函数 + type(url, function(str) { + //get 路径 + success(str) //吧进行时改成完成时 + }) + }) + return promise +} +// +// +// +//josnp 服务器script +// function jsonp(url,callback){ +// var script = document.createElement("script");//创建一个script +// document.getElementsByTagName("head")[0].appendChild(script);//在页面上获取head在下面添加script +// script.src = url;//script的路径 +// console.log(url.data); +// callback +// } +// cookie +// 创建、修改、删除cookie +function setCookie(_name, _value, _date) { + // 设置的值,无论是什么类型的数据,都给他转为json对象 + var json = { + value: _value + } + var str = JSON.stringify(json) // 将json对象转为字符串 '{"value":_value}' + str = encodeURIComponent(str) // 编码,解决中文乱码 + // 设置cookie + if (_date) { + var dt = new Date() + dt.setDate(dt.getDate() + _date) + document.cookie = + _name + '=' + str + ';expires=' + dt.toGMTString() + ';path=/' + } else { + document.cookie = _name + '=' + str + ';path=/' + } +} + +function addCookie(_name, _value, _date) { + setCookie(_name, _value, _date) +} + +// 根据cookie名称,删除该cookie +function removeCookie(_name) { + setCookie(_name, '', -1) +} + +// 根据cookie名称,获取该cookie的内容 +function getCookie(_name) { + var str = document.cookie + // str = "b={"value":_value}; bc=1; ac=1; dc=1; c=1"; + var arr = str.split('; ') + // arr = ["b={"value":_value}", "bc=1", "ac=1", "dc=1", "c=1"]; + for (var i = 0, l = arr.length; i < l; i++) { + var tmp = arr[i] // "b={"value":_value}" + var col = tmp.split('=') // ["b", "{"value":_value}"] + // if ( "b" == "b" ) + if (_name == col[0]) { + //如果找到了cookie,则跳出函数,并将其结果返回 + var decode = decodeURIComponent(col[1]) //解码 "{"value":_value}" + var obj = JSON.parse(decode) //将字符串转换为json对象 + return obj.value + } + } + return '' // 如果没有这一行,如果找不到cookie,则返回undefined +} + +// 手动遍历对象,生成查询字符串 +function objectToQueryString(obj) { + var str = '' + var first = true + + for (var key in obj) { + // 确保是自身属性,不是从原型链继承的 + if (obj.hasOwnProperty(key)) { + var value = obj[key] || '' // 防止 undefined + + // 使用 encodeURIComponent 防止特殊字符 + var part = encodeURIComponent(key) + '=' + encodeURIComponent(value) + + if (first) { + str += '?' + part + first = false + } else { + str += '&' + part + } + } + } + + return str +} + +// 获取URL参数的工具函数 +function getQueryParam(name) { + var url = window.location.href + var reg = new RegExp('[?&]' + name + '=([^&#]*)') + var results = reg.exec(url) + return results ? decodeURIComponent(results[1]) : null +} + +//获取当前日期 diff --git a/public/web/risk_history.html b/public/web/risk_history.html new file mode 100644 index 0000000..5b00aa2 --- /dev/null +++ b/public/web/risk_history.html @@ -0,0 +1,688 @@ + + + + + + + 历史风险记录 + + + + + + + + + + +
+
+ + +
+
+
+
+ 客户名称 + 时间 +
+

投保人

+
风险摘要信息将显示在这里
+
+
+
+
请选择左侧记录查看详细信息
+
+
+
+
+
+ + + + + diff --git a/src/api/riskCheck/record.js b/src/api/riskCheck/record.js index db2bafc..4df328f 100644 --- a/src/api/riskCheck/record.js +++ b/src/api/riskCheck/record.js @@ -30,9 +30,5 @@ export function queryResultDetail(params) { // 返回result.html内容 export function getResultHtml(params) { - return request({ - url: getUrl('/result.html'), - method: 'get', - params - }) -} \ No newline at end of file + return getUrl(`/result.html?taCode=${params.taCode}`) +} diff --git a/src/router/generatedRouter/applicationManagement.js b/src/router/generatedRouter/applicationManagement.js index ac6453e..dd6bcda 100644 --- a/src/router/generatedRouter/applicationManagement.js +++ b/src/router/generatedRouter/applicationManagement.js @@ -21,9 +21,17 @@ const applicationManagementRouter = [ component: () => import('@/views/applicationManagement/employRecord/index.vue'), meta: { title: '雇则风筛记录', icon: 'el-icon-document' } + }, + { + path: 'employRecord/detail', + name: 'EmployRecordDetail', + component: () => + import('@/views/applicationManagement/employRecord/detail.vue'), + meta: { title: '风筛记录详情' }, + hidden: true // 隐藏在菜单中显示 } ] } ] -export default applicationManagementRouter +export default applicationManagementRouter \ No newline at end of file diff --git a/src/views/applicationManagement/employRecord/index.vue b/src/views/applicationManagement/employRecord/index.vue index e486e07..03078e3 100644 --- a/src/views/applicationManagement/employRecord/index.vue +++ b/src/views/applicationManagement/employRecord/index.vue @@ -164,7 +164,6 @@ export default { getList() { this.loading = true const params = Object.assign({}, this.queryParams) - // 处理时间范围参数 if (params.submitTime && params.submitTime.length === 2) { params.submitTimeStart = params.submitTime[0] @@ -202,7 +201,12 @@ export default { }, // 查看详情按钮点击事件 handleView(row) { - this.$message.info('查看详情功能待实现') + // 打开新页面展示详情,使用iframe方式 + this.$router.push({ + path: '/applicationManagement/employRecord/detail', + query: { taCode: row.taCode } + }) + // window.open(routeData.href, '_blank') }, // 分页大小改变事件 handleSizeChange(val) { diff --git a/src/views/applicationManagement/employRule/index.vue b/src/views/applicationManagement/employRule/index.vue index a3f5b38..6695896 100644 --- a/src/views/applicationManagement/employRule/index.vue +++ b/src/views/applicationManagement/employRule/index.vue @@ -386,16 +386,12 @@ export default { this.queryParams.page = 1 // 创建查询参数的副本 const queryParams = Object.assign({}, this.queryParams) - console.log(queryParams, this.ruleTypeList) // 如果ruleType是中文,转换为编码值 if (queryParams.ruleType) { const ruleTypeItem = this.ruleTypeList.find( item => item.typeCode === queryParams.ruleType ) - - console.log(ruleTypeItem) if (ruleTypeItem) { - console.log(ruleTypeItem) queryParams.ruleType = ruleTypeItem.typeName } }