123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198 |
- @{
- ViewBag.Title = "Search";
- Layout = "~/Views/Shared/SearchVue.cshtml";
- }
- <style>
- .w-100 {
- width: 100% !important;
- }
- .h-100 {
- height: 100% !important;
- }
- .from {
- display: flex;
- justify-content: center;
- }
- .center {
- display: flex;
- justify-content: space-evenly;
- }
- .align-center {
- display: flex;
- align-items: center;
- }
- .k-sdisplay-none {
- display: none !important;
- }
- .ml-20 {
- margin-top: 20px !important;
- }
- .text {
- width: 90%;
- height: 50px;
- line-height: 50px;
- }
- .el-input__inner {
- height: 100% !important;
- border-top-left-radius: 8px !important;
- border-bottom-left-radius: 8px !important;
- border-top-right-radius: 0px !important;
- border-bottom-right-radius: 0px !important;
- }
- .el-button {
- height: 50px !important;
- border-top-left-radius: 0px !important;
- border-bottom-left-radius: 0px !important;
- border-top-right-radius: 8px !important;
- border-bottom-right-radius: 8px !important;
- }
- </style>
- <div id="toolbar" style="padding: 3px; margin-top: 300px; overflow: hidden;" class="h-100">
- <div id="ff" class="w-100 h-100 from">
- <div style="width: 50%">
- @*<div class="w-100 mb-10">
- <div class="align-center">
- <label class="el-dropdown">标签:</label>
- <el-checkbox-group v-model="checkTags" class="ml-10">
- <el-checkbox-button v-for="tag in tags" :label="tag.显示名" :key="tag.ID">{{tag.显示名}}</el-checkbox-button>
- </el-checkbox-group>
- </div>
- </div>*@
- <div class="w-100" style="display:flex;">
- <el-input class="text" type="text" v-model="keyword" @@keyup.enter.native="submitSearch"></el-input>
- <el-button type="primary" @@click="submitSearch"><i class="fa fa-search"></i> 搜索</el-button>
- </div>
- <label class="el-dropdown ml-20 mb-10" v-show="tableData.length > 0">搜索结果:</label>
- <div style="height: 40vh; overflow-y: auto; position: relative;">
- <el-collapse v-show="tableData.length > 0" class="h-100">
- <el-collapse-item v-for="data in tableData" :key="data.id" :title="data.title" :name="data.id" class="w-100">
- <div v-html="data.description"></div>
- <el-button type="text" @@click="openDetails(data.id)">查看详情</el-button>
- </el-collapse-item>
- </el-collapse>
- </div>
- </div>
- </div>
- </div>
- <script>
- $(function () {
- new Vue({
- el: '#toolbar',
- data() {
- return {
- keyword: "",
- tableData: [],
- tags: [],
- checkTags: [],
- tableData: [],
- RYXZ: "@ViewBag.RYXZ",
- };
- },
- methods: {
- submitSearch() {
- this.tableData = [];
- let textValue = this.keyword;
- if (textValue) {
- $.ajax({
- url: "/search/titlePrecision",
- method: "GET",
- data: { keyword: textValue },
- success: function (data) {
- if (data && data.list.length > 0) {
- this.tableData = data.list;
- }
- }.bind(this)
- });
- }
- },
- GetBaseCode() {
- $.ajax({
- url: "/BaseCode/GetBaseCode",
- method: "GET",
- data: { id: "00632C0D-2826-4792-B028-7DA6809B1FAA" },
- success: (data) =>{
- if (data) {
- this.tags = data
- }
- }
- });
- },
- openDetails(id) {
- top.ZLPMS.OpenNewWindow("查看问题", "/Problem/CheckProblemWindow/" + id, '880px', '600px', () => {
- this.dealProblem(0, 0, id);
- });
- },
- dealProblem(showAtt, IsSupport, ProblemId) {
- //是否为技术支持处理
- IsSupport = IsSupport || 0;
- $.post('/Problem/GetProblemById/' + ProblemId, (data) =>{
- var row = data[0];
- if (row) {
- /*已关闭的问题,已解决的问题,已受理的问题, 不需要处理*/
- if (row.是否终止 == 1) {
- top.ZLPMS.Msg('已终止的问题不需要再处理!');
- return;
- }
- if (row.是否解决 == 1) {
- top.ZLPMS.Msg('已解决的问题不需要再处理!');
- return;
- }
- if (row.环节ID > 3 && this.RYXZ != '1') {
- top.ZLPMS.Msg('非本部人员不能处理技术支持与研发处理环节问题,仅能查阅!');
- return;
- }
- if (row.环节ID == 3 && (this.RYXZ == '3' || this.RYXZ == '4' || this.RYXZ == '5')) {//客户,机构管理员,卫计委人员无法处理项目问题
- top.ZLPMS.Msg('客户,机构管理员,卫计委人员无法处理项目问题,仅能查阅!');
- return;
- }
- //打开处理窗口
- this.receiveProblem(row.编号, row.环节ID, showAtt, ProblemId, IsSupport);
- } else {//提醒用户没有选择问题记录
- top.ZLPMS.Msg('没有选择需要处理的问题记录,请选择后再处理!');
- }
- })
- },
- receiveProblem(title, HJID, showAtt, ProblemId, IsSupport) {
- var index = top.ZLPMS.Loading3(2);
- //受理问题
- $.ajax({
- url: '/Support/ReceiveProblem',
- data: { id: ProblemId },
- method: 'post',
- success: function (data) {
- top.ZLPMS.UnLoading(index);
- var url = "/Problem/ProductionPdeal?id=" + ProblemId + "&showAtt=" + showAtt + '&workflowid=' + HJID + '&IsSupport=' + IsSupport;
- //成功后调用
- if (data.code == 200) {
- top.ZLPMS.OpenNewWindow("处理问题:" + title, url, '1000px', '640px', function () {
- //回调用刷新(只有确定后才刷新)
- });
- } else {//显示具体原因,并提示是否强制处理
- top.ZLPMS.Confirm('该问题已被他人受理,您确定要继续处理吗?', 3, function (idx) {
- top.ZLPMS.CloseWindow(idx);
- top.ZLPMS.OpenNewWindow("处理问题", url, '1000px', '640px');
- })
- }
- }
- });
- },
- },
- created() {
- this.GetBaseCode();
- },
- });
- })
- </script>
|