This commit is contained in:
yaosen 2024-07-03 17:19:22 +08:00
parent 7f9c223c9a
commit c38589715e
14 changed files with 16 additions and 12 deletions

View File

@ -90,13 +90,18 @@ export default {
return val.replace(replaceReg, replaceString);
},
handleprantHtml(val) {
if (!val) return ''; // undefined
if (!val) return '';
let p =this.dataForm.keyword;
let p = this.dataForm.keyword;
let regexp = new RegExp(p, "g");
return val.replace(/(?<=>)[^>]+(?=<[/]?\w+.*>)/g, (v) => {
return v.replace(regexp, "<span style='color: #fca104'>" + p + "</span>")
let replacedHtml = val.replace(/(?<=>)[^>]+(?=<[/]?\w+.*>)/g, (v) => {
return v.replace(regexp, `<span style='color: #fca104'>${p}</span>`);
});
//
if (replacedHtml === val) {
return this.handleprant(val);
}
return replacedHtml;
},
onSubmit() {
getQaList(this.dataForm).then(res => {

View File

@ -50,7 +50,6 @@ class QaController extends base
{
$title = $request->get('title');
$status = $request->get('status');
Log::warning('======',['aa'=>$status]);
$list = Qas::with(['qaCitys','qaQuestions'=>function ($query) {
$query->order('sort desc');

File diff suppressed because one or more lines are too long

View File

@ -1 +0,0 @@
.pagination-container[data-v-28fdfbeb]{padding:32px 16px;position:fixed;bottom:0;left:0;width:100%;background:#fff;padding:40px 280px;-webkit-box-shadow:0 -2px 10px rgba(0,0,0,.1);box-shadow:0 -2px 10px rgba(0,0,0,.1);z-index:100}.pagination-container.hidden[data-v-28fdfbeb]{display:none}.disable-layer[data-v-69d1f452]{width:100%;height:100%;background:#f5f7fa;position:absolute;top:0;left:0;z-index:99;opacity:.5}.img-box[data-v-0414682f]{position:relative}.el-icon-folder[data-v-0414682f]{color:#409eff!important;font-size:100px}.close[data-v-0414682f]{position:absolute;top:-10px;right:-8px;font-size:18px;color:#409eff}.mistake-content[data-v-0414682f],.qa-desc[data-v-0414682f]{display:-webkit-box;display:-ms-flexbox;display:flex}.mistake-left[data-v-0414682f]{width:90%}.mistake-right[data-v-0414682f]{padding-left:20px;height:auto;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.app-container[data-v-0414682f]{position:relative;padding-bottom:60px}[data-v-0414682f].el-table--fit{padding-bottom:0!important}.el-table[data-v-0414682f],.filter-container[data-v-0414682f]{padding-bottom:52px}.mistake-btn[data-v-0414682f]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:reverse;-ms-flex-direction:row-reverse;flex-direction:row-reverse;margin-top:10px}.search[data-v-0414682f]{margin-left:10px}.avatar-uploader .el-upload[data-v-0414682f]{border:1px solid #131313;border-radius:6px;cursor:pointer;position:relative;overflow:hidden}.avatar-uploader .el-upload[data-v-0414682f]:hover{border-color:#409eff}.avatar-uploader-icon[data-v-0414682f]{border:1px solid #979797;border-radius:15px;font-size:28px;color:#8c939d;width:100px;height:100px;line-height:100px;text-align:center;position:relative}

View File

@ -1 +1 @@
@font-face{font-family:PingFang;src:url(../../static/fonts/PingFang\ SC.212ada59.ttf);font-weight:400;font-style:normal}body[data-v-917e63ce]{font-family:PingFang!important}.infinite-list[data-v-917e63ce]{list-style-type:none;height:calc(100vh - 154px);padding:0;margin:0}.desc_container+.desc_container[data-v-917e63ce]{margin-top:10px;padding-top:10px}.desc_container .desc_title[data-v-917e63ce]{font-size:18px;font-weight:500;color:#333;line-height:25px;margin-bottom:10px}.desc_container .desc_content[data-v-917e63ce]{font-size:14px;font-weight:300}.problem .problem_form[data-v-917e63ce]{margin-top:10px;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.problem .problem_container[data-v-917e63ce],.problem .problem_form[data-v-917e63ce]{display:-webkit-box;display:-ms-flexbox;display:flex}.problem .problem_container .problem_left[data-v-917e63ce]{font-family:PingFang,sans-serif;font-weight:300;width:18%;background:#fff;padding:0 20px;border-right:2px solid #46a6ff;height:calc(100vh - 154px)}.problem .problem_container .problem_left .btn[data-v-917e63ce]{color:#fff;padding:10px 20px;cursor:pointer;text-align:center;background:#46a6ff;border-radius:10px}.problem .problem_container .problem_left .btn+.btn[data-v-917e63ce]{margin-top:10px}.problem .problem_container .problem_right[data-v-917e63ce]{width:100%;background:#fff;padding:0 20px}.problem .problem_container .problem_right .problem_right_container+.problem_right_container[data-v-917e63ce]{margin-top:20px}.problem .problem_container .problem_right .problem_right_container .title[data-v-917e63ce]{font-size:20px;font-weight:600;margin-bottom:10px;color:#46a6ff}.problem .problem_container .problem_right .problem_right_container .title[data-v-917e63ce]>:first-child{margin-right:40px}.problem .problem_container .problem_right .problem_right_container .desc[data-v-917e63ce]{font-size:14px;color:#666;line-height:24px}
@font-face{font-family:PingFang;src:url(../../static/fonts/PingFang\ SC.212ada59.ttf);font-weight:400;font-style:normal}body[data-v-1e0c4d6f]{font-family:PingFang!important}.infinite-list[data-v-1e0c4d6f]{list-style-type:none;height:calc(100vh - 154px);padding:0;margin:0}.desc_container+.desc_container[data-v-1e0c4d6f]{margin-top:10px;padding-top:10px}.desc_container .desc_title[data-v-1e0c4d6f]{font-size:18px;font-weight:500;color:#333;line-height:25px;margin-bottom:10px}.desc_container .desc_content[data-v-1e0c4d6f]{font-size:14px;font-weight:300}.problem .problem_form[data-v-1e0c4d6f]{margin-top:10px;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.problem .problem_container[data-v-1e0c4d6f],.problem .problem_form[data-v-1e0c4d6f]{display:-webkit-box;display:-ms-flexbox;display:flex}.problem .problem_container .problem_left[data-v-1e0c4d6f]{font-family:PingFang,sans-serif;font-weight:300;width:18%;background:#fff;padding:0 20px;border-right:2px solid #46a6ff;height:calc(100vh - 154px)}.problem .problem_container .problem_left .btn[data-v-1e0c4d6f]{color:#fff;padding:10px 20px;cursor:pointer;text-align:center;background:#46a6ff;border-radius:10px}.problem .problem_container .problem_left .btn+.btn[data-v-1e0c4d6f]{margin-top:10px}.problem .problem_container .problem_right[data-v-1e0c4d6f]{width:100%;background:#fff;padding:0 20px}.problem .problem_container .problem_right .problem_right_container+.problem_right_container[data-v-1e0c4d6f]{margin-top:20px}.problem .problem_container .problem_right .problem_right_container .title[data-v-1e0c4d6f]{font-size:20px;font-weight:600;margin-bottom:10px;color:#46a6ff}.problem .problem_container .problem_right .problem_right_container .title[data-v-1e0c4d6f]>:first-child{margin-right:40px}.problem .problem_container .problem_right .problem_right_container .desc[data-v-1e0c4d6f]{font-size:14px;color:#666;line-height:24px}

View File

@ -0,0 +1 @@
.pagination-container[data-v-28fdfbeb]{padding:32px 16px;position:fixed;bottom:0;left:0;width:100%;background:#fff;padding:40px 280px;-webkit-box-shadow:0 -2px 10px rgba(0,0,0,.1);box-shadow:0 -2px 10px rgba(0,0,0,.1);z-index:100}.pagination-container.hidden[data-v-28fdfbeb]{display:none}.disable-layer[data-v-69d1f452]{width:100%;height:100%;background:#f5f7fa;position:absolute;top:0;left:0;z-index:99;opacity:.5}.img-box[data-v-39e04288]{position:relative}.el-icon-folder[data-v-39e04288]{color:#409eff!important;font-size:100px}.close[data-v-39e04288]{position:absolute;top:-10px;right:-8px;font-size:18px;color:#409eff}.mistake-content[data-v-39e04288],.qa-desc[data-v-39e04288]{display:-webkit-box;display:-ms-flexbox;display:flex}.mistake-left[data-v-39e04288]{width:90%}.mistake-right[data-v-39e04288]{padding-left:20px;height:auto;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.app-container[data-v-39e04288]{position:relative;padding-bottom:60px}[data-v-39e04288].el-table--fit{padding-bottom:0!important}.el-table[data-v-39e04288],.filter-container[data-v-39e04288]{padding-bottom:52px}.mistake-btn[data-v-39e04288]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:reverse;-ms-flex-direction:row-reverse;flex-direction:row-reverse;margin-top:10px}.search[data-v-39e04288]{margin-left:10px}.avatar-uploader .el-upload[data-v-39e04288]{border:1px solid #131313;border-radius:6px;cursor:pointer;position:relative;overflow:hidden}.avatar-uploader .el-upload[data-v-39e04288]:hover{border-color:#409eff}.avatar-uploader-icon[data-v-39e04288]{border:1px solid #979797;border-radius:15px;font-size:28px;color:#8c939d;width:100px;height:100px;line-height:100px;text-align:center;position:relative}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1 +0,0 @@
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-34e4074b"],{"564a":function(t,a,e){},cfa6:function(t,a,e){"use strict";e("564a")},e132:function(t,a,e){"use strict";e.r(a);var i=function(){var t=this,a=t.$createElement,e=t._self._c||a;return e("div",{staticClass:"problem"},[e("el-row",[e("el-col",{attrs:{span:24}},[e("div",{staticClass:"problem_form"},[e("el-form",{ref:"form",attrs:{inline:!0,model:t.dataForm,"label-width":"60px"}},[e("el-form-item",{attrs:{label:"关键字:"}},[e("el-input",{staticClass:"filter-item",staticStyle:{width:"400px"},attrs:{placeholder:"请输入搜索关键字"},model:{value:t.dataForm.keyword,callback:function(a){t.$set(t.dataForm,"keyword",a)},expression:"dataForm.keyword"}})],1),e("el-form-item",[e("el-button",{attrs:{type:"success"},on:{click:t.onSubmit}},[t._v("查询")])],1)],1)],1)])],1),e("div",{staticClass:"problem_container"},[e("div",{staticClass:"problem_left"},t._l(t.getQaCityList,(function(a){return e("div",{staticClass:"btn",on:{click:function(e){return t.handleQacityl(a.city_id)}}},[t._v(t._s(a.city_name))])})),0),e("div",{staticClass:"problem_right"},[e("ul",{directives:[{name:"infinite-scroll",rawName:"v-infinite-scroll",value:t.load,expression:"load"}],staticClass:"infinite-list",staticStyle:{overflow:"auto"},attrs:{"infinite-scroll-immediate":!1}},t._l(t.getQaLists,(function(a){return e("li",{staticClass:"problem_right_container"},[e("div",{staticClass:"title"},[e("span",{domProps:{innerHTML:t._s(t.handleprant(a.title))}}),e("el-button",{attrs:{type:"primary"},on:{click:function(e){return t.handleZip(a.img_zip)}}},[t._v("下载图片")]),e("el-button",{attrs:{type:"primary"},on:{click:function(e){return t.handleZip(a.trip_zip)}}},[t._v("下载行程")])],1),t._l(a.qaQuestions,(function(a){return e("div",{staticClass:"desc_container"},[e("div",{staticClass:"desc",staticStyle:{"font-weight":"700",color:"#46a6ff"},domProps:{innerHTML:t._s(t.handleprant(a.title))}}),e("div",{staticClass:"desc",domProps:{innerHTML:t._s(t.handleprantHtml(a.content))}})])}))],2)})),0)])])],1)},n=[],s=(e("4d63"),e("ac1f"),e("2c3e"),e("25f0"),e("5319"),e("85a8")),r={data:function(){return{getQaCityList:[],getQaLists:[],dataForm:{keyword:"",city_id:""}}},created:function(){var t=this;Object(s["a"])().then((function(a){t.getQaCityList=a.data}))},watch:{"dataForm.keyword":function(t){t&&this.onSubmit()}},methods:{handleQacityl:function(t){var a=this;Object(s["b"])({city_id:t}).then((function(t){a.getQaLists=t.data.data}))},handleZip:function(t){t?window.open(t):this.$message({showClose:!0,message:"暂无下载链接"})},load:function(){console.log("load")},handleprant:function(t){if(!t)return"";var a=new RegExp(this.dataForm.keyword,"ig"),e='<span style="color: #fca104">'.concat(this.dataForm.keyword,"</span>");return t.replace(a,e)},handleprantHtml:function(t){if(!t)return"";var a=this.dataForm.keyword,e=new RegExp(a,"g");return t.replace(/(?<=>)[^>]+(?=<[/]?\w+.*>)/g,(function(t){return t.replace(e,"<span style='color: #fca104'>"+a+"</span>")}))},onSubmit:function(){var t=this;Object(s["b"])(this.dataForm).then((function(a){t.getQaLists=a.data.data}))}}},o=r,l=(e("cfa6"),e("2877")),c=Object(l["a"])(o,i,n,!1,null,"917e63ce",null);a["default"]=c.exports}}]);

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1 @@
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-7157a291"],{"5cf3":function(t,e,a){},e132:function(t,e,a){"use strict";a.r(e);var i=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"problem"},[a("el-row",[a("el-col",{attrs:{span:24}},[a("div",{staticClass:"problem_form"},[a("el-form",{ref:"form",attrs:{inline:!0,model:t.dataForm,"label-width":"60px"}},[a("el-form-item",{attrs:{label:"关键字:"}},[a("el-input",{staticClass:"filter-item",staticStyle:{width:"400px"},attrs:{placeholder:"请输入搜索关键字"},model:{value:t.dataForm.keyword,callback:function(e){t.$set(t.dataForm,"keyword",e)},expression:"dataForm.keyword"}})],1),a("el-form-item",[a("el-button",{attrs:{type:"success"},on:{click:t.onSubmit}},[t._v("查询")])],1)],1)],1)])],1),a("div",{staticClass:"problem_container"},[a("div",{staticClass:"problem_left"},t._l(t.getQaCityList,(function(e){return a("div",{staticClass:"btn",on:{click:function(a){return t.handleQacityl(e.city_id)}}},[t._v(t._s(e.city_name))])})),0),a("div",{staticClass:"problem_right"},[a("ul",{directives:[{name:"infinite-scroll",rawName:"v-infinite-scroll",value:t.load,expression:"load"}],staticClass:"infinite-list",staticStyle:{overflow:"auto"},attrs:{"infinite-scroll-immediate":!1}},t._l(t.getQaLists,(function(e){return a("li",{staticClass:"problem_right_container"},[a("div",{staticClass:"title"},[a("span",{domProps:{innerHTML:t._s(t.handleprant(e.title))}}),a("el-button",{attrs:{type:"primary"},on:{click:function(a){return t.handleZip(e.img_zip)}}},[t._v("下载图片")]),a("el-button",{attrs:{type:"primary"},on:{click:function(a){return t.handleZip(e.trip_zip)}}},[t._v("下载行程")])],1),t._l(e.qaQuestions,(function(e){return a("div",{staticClass:"desc_container"},[a("div",{staticClass:"desc",staticStyle:{"font-weight":"700",color:"#46a6ff"},domProps:{innerHTML:t._s(t.handleprant(e.title))}}),a("div",{staticClass:"desc",domProps:{innerHTML:t._s(t.handleprantHtml(e.content))}})])}))],2)})),0)])])],1)},n=[],s=(a("4d63"),a("ac1f"),a("2c3e"),a("25f0"),a("5319"),a("85a8")),r={data:function(){return{getQaCityList:[],getQaLists:[],dataForm:{keyword:"",city_id:""}}},created:function(){var t=this;Object(s["a"])().then((function(e){t.getQaCityList=e.data}))},watch:{"dataForm.keyword":function(t){t&&this.onSubmit()}},methods:{handleQacityl:function(t){var e=this;Object(s["b"])({city_id:t}).then((function(t){e.getQaLists=t.data.data}))},handleZip:function(t){t?window.open(t):this.$message({showClose:!0,message:"暂无下载链接"})},load:function(){console.log("load")},handleprant:function(t){if(!t)return"";var e=new RegExp(this.dataForm.keyword,"ig"),a='<span style="color: #fca104">'.concat(this.dataForm.keyword,"</span>");return t.replace(e,a)},handleprantHtml:function(t){if(!t)return"";var e=this.dataForm.keyword,a=new RegExp(e,"g"),i=t.replace(/(?<=>)[^>]+(?=<[/]?\w+.*>)/g,(function(t){return t.replace(a,"<span style='color: #fca104'>".concat(e,"</span>"))}));return i===t?this.handleprant(t):i},onSubmit:function(){var t=this;Object(s["b"])(this.dataForm).then((function(e){t.getQaLists=e.data.data}))}}},o=r,l=(a("e550"),a("2877")),c=Object(l["a"])(o,i,n,!1,null,"1e0c4d6f",null);e["default"]=c.exports},e550:function(t,e,a){"use strict";a("5cf3")}}]);

File diff suppressed because one or more lines are too long