|  | @@ -0,0 +1,247 @@
 | 
	
		
			
				|  |  | +<template>
 | 
	
		
			
				|  |  | +  <div class="app-container">
 | 
	
		
			
				|  |  | +      <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
 | 
	
		
			
				|  |  | +        <el-form-item>
 | 
	
		
			
				|  |  | +          <el-input
 | 
	
		
			
				|  |  | +            v-model="queryParams.problemName"
 | 
	
		
			
				|  |  | +            placeholder="请输入问题关键字"
 | 
	
		
			
				|  |  | +            clearable
 | 
	
		
			
				|  |  | +            size="small"
 | 
	
		
			
				|  |  | +            style="width: 240px"
 | 
	
		
			
				|  |  | +            @keyup.enter.native="handleQuery"
 | 
	
		
			
				|  |  | +          />
 | 
	
		
			
				|  |  | +        </el-form-item>
 | 
	
		
			
				|  |  | +        <el-form-item>
 | 
	
		
			
				|  |  | +          <el-select v-model="queryParams.state" placeholder="问题状态">
 | 
	
		
			
				|  |  | +              <el-option v-for="(item,index) in issuesSate" :label="item.label" :value="item.id" ></el-option>
 | 
	
		
			
				|  |  | +            </el-select>
 | 
	
		
			
				|  |  | +          </el-form-item>
 | 
	
		
			
				|  |  | +        </el-form-item>
 | 
	
		
			
				|  |  | +        <el-form-item>
 | 
	
		
			
				|  |  | +          <el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
 | 
	
		
			
				|  |  | +          <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
 | 
	
		
			
				|  |  | +        </el-form-item>
 | 
	
		
			
				|  |  | +      </el-form>
 | 
	
		
			
				|  |  | +      <el-row :gutter="10" class="mb8">
 | 
	
		
			
				|  |  | +        <el-col :span="1.5">
 | 
	
		
			
				|  |  | +          <el-button
 | 
	
		
			
				|  |  | +            type="primary"
 | 
	
		
			
				|  |  | +            icon="el-icon-plus"
 | 
	
		
			
				|  |  | +            size="mini"
 | 
	
		
			
				|  |  | +            @click="handleAdd"
 | 
	
		
			
				|  |  | +            v-hasPermi="['baseManage:companyType:add']"
 | 
	
		
			
				|  |  | +          >新增问题</el-button>
 | 
	
		
			
				|  |  | +        </el-col>
 | 
	
		
			
				|  |  | +        <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
 | 
	
		
			
				|  |  | +      </el-row>
 | 
	
		
			
				|  |  | +      <el-table v-loading="loading" :data="list">
 | 
	
		
			
				|  |  | +        <el-table-column label="序号" type="index" width="50" align="center" />
 | 
	
		
			
				|  |  | +        <el-table-column label="问题名称" align="center" prop="problemName" />
 | 
	
		
			
				|  |  | +        <el-table-column label="问题状态" align="center" prop="createTime">
 | 
	
		
			
				|  |  | +          <template slot-scope="scope">
 | 
	
		
			
				|  |  | +              <el-switch
 | 
	
		
			
				|  |  | +                v-model="scope.row.state"
 | 
	
		
			
				|  |  | +                style="display: block"
 | 
	
		
			
				|  |  | +                @change="handelUserStatus($event,scope.row)"
 | 
	
		
			
				|  |  | +                :active-value="0"
 | 
	
		
			
				|  |  | +                :inactive-value="1"
 | 
	
		
			
				|  |  | +                v-hasPermi="['customerManage:customers:uStatus']"
 | 
	
		
			
				|  |  | +                active-text="启用"
 | 
	
		
			
				|  |  | +                inactive-text="禁用">
 | 
	
		
			
				|  |  | +              </el-switch>
 | 
	
		
			
				|  |  | +          </template>
 | 
	
		
			
				|  |  | +        </el-table-column>
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +        <el-table-column label="创建时间" align="center" prop="createTime" width="160">
 | 
	
		
			
				|  |  | +          <template slot-scope="scope">
 | 
	
		
			
				|  |  | +            <span>{{ parseTime(scope.row.createTime) }}</span>
 | 
	
		
			
				|  |  | +          </template>
 | 
	
		
			
				|  |  | +        </el-table-column>
 | 
	
		
			
				|  |  | +        <el-table-column
 | 
	
		
			
				|  |  | +          label="操作"
 | 
	
		
			
				|  |  | +          align="center"
 | 
	
		
			
				|  |  | +          width="280"
 | 
	
		
			
				|  |  | +          class-name="small-padding fixed-width"
 | 
	
		
			
				|  |  | +        >
 | 
	
		
			
				|  |  | +          <template slot-scope="scope">
 | 
	
		
			
				|  |  | +            <el-button
 | 
	
		
			
				|  |  | +              size="mini"
 | 
	
		
			
				|  |  | +              type="primary"
 | 
	
		
			
				|  |  | +              icon="el-icon-view"
 | 
	
		
			
				|  |  | +              @click="handleView(scope.row)"
 | 
	
		
			
				|  |  | +              v-hasPermi="['baseManage:companyType:view']"
 | 
	
		
			
				|  |  | +            >查看</el-button>
 | 
	
		
			
				|  |  | +            <el-button
 | 
	
		
			
				|  |  | +              size="mini"
 | 
	
		
			
				|  |  | +              type="success"
 | 
	
		
			
				|  |  | +              icon="el-icon-edit"
 | 
	
		
			
				|  |  | +              @click="handleEdit(scope.row)"
 | 
	
		
			
				|  |  | +              v-hasPermi="['baseManage:companyType:edit']"
 | 
	
		
			
				|  |  | +            >编辑</el-button>
 | 
	
		
			
				|  |  | +            <el-button
 | 
	
		
			
				|  |  | +              size="mini"
 | 
	
		
			
				|  |  | +              type="danger"
 | 
	
		
			
				|  |  | +              @click="handleDelete(scope.row)"
 | 
	
		
			
				|  |  | +              v-hasPermi="['baseManage:companyType:del']"
 | 
	
		
			
				|  |  | +              icon="el-icon-delete"
 | 
	
		
			
				|  |  | +            >删除</el-button>
 | 
	
		
			
				|  |  | +          </template>
 | 
	
		
			
				|  |  | +        </el-table-column>
 | 
	
		
			
				|  |  | +      </el-table>
 | 
	
		
			
				|  |  | +      <pagination
 | 
	
		
			
				|  |  | +        v-show="total>0"
 | 
	
		
			
				|  |  | +        :total="total"
 | 
	
		
			
				|  |  | +        :page.sync="queryParams.pageNo"
 | 
	
		
			
				|  |  | +        :limit.sync="queryParams.pageSize"
 | 
	
		
			
				|  |  | +        @pagination="getList"
 | 
	
		
			
				|  |  | +      />
 | 
	
		
			
				|  |  | +      <add-mobiel
 | 
	
		
			
				|  |  | +      			v-if="modal.visibleModal"
 | 
	
		
			
				|  |  | +      			:title="modal.title"
 | 
	
		
			
				|  |  | +      			:action="modal.action"
 | 
	
		
			
				|  |  | +      			:visible="modal.visibleModal"
 | 
	
		
			
				|  |  | +      			:selectRow="modal.selectRow"
 | 
	
		
			
				|  |  | +      			@closeModal="closeModal">
 | 
	
		
			
				|  |  | +      		</add-mobiel>
 | 
	
		
			
				|  |  | +  </div>
 | 
	
		
			
				|  |  | +</template>
 | 
	
		
			
				|  |  | +<script>
 | 
	
		
			
				|  |  | +import { listInssues , delInssues , issuesStatus } from "@/api/baseManage/issues";
 | 
	
		
			
				|  |  | +import addMobiel from './modal/addMobiel'
 | 
	
		
			
				|  |  | +export default {
 | 
	
		
			
				|  |  | +  name: "issues",
 | 
	
		
			
				|  |  | +  components: {
 | 
	
		
			
				|  |  | +    addMobiel
 | 
	
		
			
				|  |  | +  },
 | 
	
		
			
				|  |  | +  data() {
 | 
	
		
			
				|  |  | +    return {
 | 
	
		
			
				|  |  | +      // 遮罩层
 | 
	
		
			
				|  |  | +      loading: false,
 | 
	
		
			
				|  |  | +      // 显示搜索条件
 | 
	
		
			
				|  |  | +      showSearch: true,
 | 
	
		
			
				|  |  | +      // 总条数
 | 
	
		
			
				|  |  | +      total: 0,
 | 
	
		
			
				|  |  | +      // 表格数据
 | 
	
		
			
				|  |  | +      list: null,
 | 
	
		
			
				|  |  | +      // 状态数据字典
 | 
	
		
			
				|  |  | +      statusOptions: [],
 | 
	
		
			
				|  |  | +      // 表单参数
 | 
	
		
			
				|  |  | +      form: {},
 | 
	
		
			
				|  |  | +      issuesSate:[
 | 
	
		
			
				|  |  | +        {
 | 
	
		
			
				|  |  | +          id:0,
 | 
	
		
			
				|  |  | +          label:'启用'
 | 
	
		
			
				|  |  | +        },
 | 
	
		
			
				|  |  | +        {
 | 
	
		
			
				|  |  | +          id:1,
 | 
	
		
			
				|  |  | +          label:'禁用'
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +      ],
 | 
	
		
			
				|  |  | +      //弹出层
 | 
	
		
			
				|  |  | +      modal:{
 | 
	
		
			
				|  |  | +        action:'',
 | 
	
		
			
				|  |  | +        title:'',
 | 
	
		
			
				|  |  | +        visibleModal:false,
 | 
	
		
			
				|  |  | +        selectRow:null
 | 
	
		
			
				|  |  | +      },
 | 
	
		
			
				|  |  | +      // 查询参数
 | 
	
		
			
				|  |  | +      queryParams: {
 | 
	
		
			
				|  |  | +        pageNo: 1,
 | 
	
		
			
				|  |  | +        pageSize: 10
 | 
	
		
			
				|  |  | +      }
 | 
	
		
			
				|  |  | +    };
 | 
	
		
			
				|  |  | +  },
 | 
	
		
			
				|  |  | +  created() {
 | 
	
		
			
				|  |  | +    this.getList();
 | 
	
		
			
				|  |  | +  },
 | 
	
		
			
				|  |  | +  methods: {
 | 
	
		
			
				|  |  | +    /** 查询产婆类别列表 */
 | 
	
		
			
				|  |  | +    getList() {
 | 
	
		
			
				|  |  | +      this.loading = true;
 | 
	
		
			
				|  |  | +      listInssues(this.queryParams).then(res => {
 | 
	
		
			
				|  |  | +          if(res.retHead.errCode == 0){
 | 
	
		
			
				|  |  | +            this.list = res.retBody
 | 
	
		
			
				|  |  | +            this.total = res.retHead.total;
 | 
	
		
			
				|  |  | +          }
 | 
	
		
			
				|  |  | +          this.loading = false;
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +      );
 | 
	
		
			
				|  |  | +    },
 | 
	
		
			
				|  |  | +    /** 搜索按钮操作 */
 | 
	
		
			
				|  |  | +    handleQuery() {
 | 
	
		
			
				|  |  | +      this.queryParams.pageNo = 1;
 | 
	
		
			
				|  |  | +      this.getList();
 | 
	
		
			
				|  |  | +    },
 | 
	
		
			
				|  |  | +    /** 重置按钮操作 */
 | 
	
		
			
				|  |  | +    resetQuery() {
 | 
	
		
			
				|  |  | +      this.queryParams = {
 | 
	
		
			
				|  |  | +        pageNo:1,
 | 
	
		
			
				|  |  | +        pageSize:10,
 | 
	
		
			
				|  |  | +      }
 | 
	
		
			
				|  |  | +      this.handleQuery();
 | 
	
		
			
				|  |  | +    },
 | 
	
		
			
				|  |  | +    /** 新增按钮操作 */
 | 
	
		
			
				|  |  | +    handleAdd() {
 | 
	
		
			
				|  |  | +        this.modal.visibleModal = true
 | 
	
		
			
				|  |  | +        this.modal.title = '新增问题'
 | 
	
		
			
				|  |  | +        this.modal.action = 'add'
 | 
	
		
			
				|  |  | +    },
 | 
	
		
			
				|  |  | +    /** 查看按钮操作 */
 | 
	
		
			
				|  |  | +    handleView(item){
 | 
	
		
			
				|  |  | +        this.modal.visibleModal = true
 | 
	
		
			
				|  |  | +        this.modal.title = '问题详情'
 | 
	
		
			
				|  |  | +        this.modal.action = 'view'
 | 
	
		
			
				|  |  | +        this.modal.selectRow = item
 | 
	
		
			
				|  |  | +    },
 | 
	
		
			
				|  |  | +    /** 查看按钮操作 */
 | 
	
		
			
				|  |  | +    handleEdit(item){
 | 
	
		
			
				|  |  | +        this.modal.visibleModal = true
 | 
	
		
			
				|  |  | +        this.modal.title = '编辑问题'
 | 
	
		
			
				|  |  | +        this.modal.action = 'edit'
 | 
	
		
			
				|  |  | +        this.modal.selectRow = item
 | 
	
		
			
				|  |  | +    },
 | 
	
		
			
				|  |  | +    /** 删除按钮操作 */
 | 
	
		
			
				|  |  | +    handleDelete(item) {
 | 
	
		
			
				|  |  | +      console.log(item)
 | 
	
		
			
				|  |  | +      let params = {
 | 
	
		
			
				|  |  | +        guid:item.guid
 | 
	
		
			
				|  |  | +      }
 | 
	
		
			
				|  |  | +      this.$confirm('是否确认删除该数据项?', "警告", {
 | 
	
		
			
				|  |  | +          confirmButtonText: "确定",
 | 
	
		
			
				|  |  | +          cancelButtonText: "取消",
 | 
	
		
			
				|  |  | +          type: "warning"
 | 
	
		
			
				|  |  | +        }).then(function() {
 | 
	
		
			
				|  |  | +          return delInssues(params);
 | 
	
		
			
				|  |  | +        }).then(() => {
 | 
	
		
			
				|  |  | +          this.getList();
 | 
	
		
			
				|  |  | +          this.msgSuccess("删除成功");
 | 
	
		
			
				|  |  | +        }).catch(function() {});
 | 
	
		
			
				|  |  | +    },
 | 
	
		
			
				|  |  | +    //更改文章状态
 | 
	
		
			
				|  |  | +    handelUserStatus(val,row){
 | 
	
		
			
				|  |  | +      let params = {
 | 
	
		
			
				|  |  | +        guid:row.guid,
 | 
	
		
			
				|  |  | +        state:val
 | 
	
		
			
				|  |  | +      }
 | 
	
		
			
				|  |  | +      let _this = this;
 | 
	
		
			
				|  |  | +      this.$confirm('你确定是否改变改客户的账号状态?', "警告", {
 | 
	
		
			
				|  |  | +          confirmButtonText: "确定",
 | 
	
		
			
				|  |  | +          cancelButtonText: "取消",
 | 
	
		
			
				|  |  | +          type: "warning"
 | 
	
		
			
				|  |  | +        }).then(function() {
 | 
	
		
			
				|  |  | +            return issuesStatus(params);
 | 
	
		
			
				|  |  | +        }).then(() => {
 | 
	
		
			
				|  |  | +            _this.getList();
 | 
	
		
			
				|  |  | +            _this.msgSuccess("操作成功");
 | 
	
		
			
				|  |  | +        }).catch(function() {
 | 
	
		
			
				|  |  | +            _this.getList()
 | 
	
		
			
				|  |  | +        });
 | 
	
		
			
				|  |  | +    },
 | 
	
		
			
				|  |  | +    //窗口关闭
 | 
	
		
			
				|  |  | +    closeModal(flag = false){
 | 
	
		
			
				|  |  | +      this.modal.visibleModal = false
 | 
	
		
			
				|  |  | +      flag && this.getList()
 | 
	
		
			
				|  |  | +    }
 | 
	
		
			
				|  |  | +  }
 | 
	
		
			
				|  |  | +};
 | 
	
		
			
				|  |  | +</script>
 |