Merge branch 'master' of https://e.coding.net/ctcdevteam/cma_search
This commit is contained in:
		
						commit
						a87535616f
					
				| 
						 | 
				
			
			@ -120,6 +120,12 @@ export function getAbilityQuality(query) {
 | 
			
		|||
    params: query
 | 
			
		||||
  })
 | 
			
		||||
}
 | 
			
		||||
export function getQualityItem(id) {
 | 
			
		||||
  return request({
 | 
			
		||||
    url: `/ability/quali/${id}/`,
 | 
			
		||||
    method: 'get'
 | 
			
		||||
  })
 | 
			
		||||
}
 | 
			
		||||
export function getQualityMy(query) {
 | 
			
		||||
  return request({
 | 
			
		||||
    url: `/ability/quali/my/`,
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -64,28 +64,44 @@
 | 
			
		|||
            ref="filterTable"
 | 
			
		||||
          >
 | 
			
		||||
            <el-table-column type="index" width="45"/>
 | 
			
		||||
            <el-table-column label="名称" prop="name">
 | 
			
		||||
            <el-table-column label="名称">
 | 
			
		||||
              <template slot-scope="scope">
 | 
			
		||||
                <span v-html="showlight(scope.row.name)"></span>
 | 
			
		||||
              </template>
 | 
			
		||||
            </el-table-column>
 | 
			
		||||
            <el-table-column label="资质类型" prop="type">
 | 
			
		||||
            <el-table-column label="资质类型">
 | 
			
		||||
              <template slot-scope="scope">
 | 
			
		||||
                <span v-html="showlight(scope.row.name)"></span>
 | 
			
		||||
              </template>
 | 
			
		||||
            </el-table-column>
 | 
			
		||||
            <el-table-column label="等级">
 | 
			
		||||
              <template slot-scope="scope">
 | 
			
		||||
                <span v-if="scope.row.type==='OTHER'">{{scope.row.level}}</span>
 | 
			
		||||
                <span v-else>{{typeOptions[scope.row.grade]}}</span>
 | 
			
		||||
                <span v-if="scope.row.type==='OTHER'" v-html="showlight(scope.row.level)">{{scope.row.level}}</span>
 | 
			
		||||
                <span v-else v-html="showlight(typeOptions[scope.row.grade])">{{typeOptions[scope.row.grade]}}</span>
 | 
			
		||||
              </template>
 | 
			
		||||
            </el-table-column>
 | 
			
		||||
            <el-table-column label="备案城市" prop="citys">
 | 
			
		||||
              <!-- <template slot-scope="scope">
 | 
			
		||||
                 <span v-if="scope.row.grade">{{ scope.row.grade}}</span>
 | 
			
		||||
                 <span v-if="scope.row.level">、{{ scope.row.level}}</span>
 | 
			
		||||
               </template>-->
 | 
			
		||||
            <el-table-column label="备案城市">
 | 
			
		||||
              <template slot-scope="scope">
 | 
			
		||||
                <span v-if="scope.row.province_name" v-html="showlight(scope.row.province_name)"></span>
 | 
			
		||||
                <span  v-if="scope.row.city_name" v-html="showlight(scope.row.city_name)"></span>
 | 
			
		||||
              </template>
 | 
			
		||||
            </el-table-column>
 | 
			
		||||
            <el-table-column label="所属单位" prop="org"></el-table-column>
 | 
			
		||||
            <el-table-column label="主要服务" prop="service">
 | 
			
		||||
            <el-table-column label="所属单位">
 | 
			
		||||
              <template slot-scope="scope">
 | 
			
		||||
                <span v-if="scope.row.org_" v-html="showlight(scope.row.org_.name)"></span>
 | 
			
		||||
              </template>
 | 
			
		||||
            </el-table-column>
 | 
			
		||||
            <el-table-column label="资质范围" prop="scope">
 | 
			
		||||
           <!-- <el-table-column label="主要服务" prop="service">
 | 
			
		||||
            </el-table-column>-->
 | 
			
		||||
            <el-table-column label="资质范围">
 | 
			
		||||
              <template slot-scope="scope">
 | 
			
		||||
                <span v-html="showlight(scope.row.scope)"></span>
 | 
			
		||||
              </template>
 | 
			
		||||
            </el-table-column>
 | 
			
		||||
            <el-table-column label="描述" prop="description">
 | 
			
		||||
            <el-table-column label="描述">
 | 
			
		||||
              <template slot-scope="scope">
 | 
			
		||||
                <span v-html="showlight(scope.row.description)"></span>
 | 
			
		||||
              </template>
 | 
			
		||||
            </el-table-column>
 | 
			
		||||
            <el-table-column label="创建日期">
 | 
			
		||||
              <template slot-scope="scope">{{scope.row.create_time.substring(0, 10)}}</template>
 | 
			
		||||
| 
						 | 
				
			
			@ -152,6 +168,20 @@
 | 
			
		|||
      this.getGroup();
 | 
			
		||||
    },
 | 
			
		||||
    methods: {
 | 
			
		||||
      showlight(val) {
 | 
			
		||||
        val = val + "";
 | 
			
		||||
        if (this.listQuery.search !== "") {
 | 
			
		||||
          let searchList = this.listQuery.search.split(" ");
 | 
			
		||||
          let reg = null;
 | 
			
		||||
          for (let i = 0; i < searchList.length; i++) {
 | 
			
		||||
            reg=new RegExp(searchList[i],"g");
 | 
			
		||||
            val = val.replace(reg, '<span style="color:red;font-weight:bold">' + searchList[i] + '</span>');
 | 
			
		||||
          }
 | 
			
		||||
          return val;
 | 
			
		||||
        } else {
 | 
			
		||||
          return val;
 | 
			
		||||
        }
 | 
			
		||||
      },
 | 
			
		||||
      checkPermission,
 | 
			
		||||
      getList() {
 | 
			
		||||
        this.listLoading = true;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -47,7 +47,6 @@
 | 
			
		|||
      </el-col>
 | 
			
		||||
    </el-row>
 | 
			
		||||
    <div style="margin-top: 10px">
 | 
			
		||||
      <!-- <el-button type="primary" icon="el-icon-plus" @click="handleAdd" v-if="checkPermission(['cma_create'])">新增</el-button> -->
 | 
			
		||||
      <el-popover
 | 
			
		||||
        placement="top"
 | 
			
		||||
        width="160"
 | 
			
		||||
| 
						 | 
				
			
			@ -71,13 +70,9 @@
 | 
			
		|||
            >
 | 
			
		||||
          </el-upload>
 | 
			
		||||
        </div>
 | 
			
		||||
        
 | 
			
		||||
       
 | 
			
		||||
        <el-button slot="reference">导入分子公司能力</el-button>
 | 
			
		||||
         
 | 
			
		||||
      </el-popover>
 | 
			
		||||
       <el-button @click="delAll()"  v-if="checkPermission(['cma_deletes'])">批量删除</el-button>
 | 
			
		||||
      
 | 
			
		||||
    </div>
 | 
			
		||||
    </el-card>
 | 
			
		||||
    <el-card style="margin-top: 10px">
 | 
			
		||||
| 
						 | 
				
			
			@ -135,14 +130,10 @@
 | 
			
		|||
        ></template>
 | 
			
		||||
      </el-table-column>
 | 
			
		||||
      <el-table-column label="创建日期">
 | 
			
		||||
        <template slot-scope="scope">{{
 | 
			
		||||
          scope.row.create_time.substring(0, 10)
 | 
			
		||||
        }}</template>
 | 
			
		||||
        <template slot-scope="scope">{{scope.row.create_time.substring(0, 10)}}</template>
 | 
			
		||||
      </el-table-column>
 | 
			
		||||
      <el-table-column label="变更日期">
 | 
			
		||||
        <template slot-scope="scope">{{
 | 
			
		||||
          scope.row.update_time.substring(0, 10)
 | 
			
		||||
        }}</template>
 | 
			
		||||
        <template slot-scope="scope">{{scope.row.update_time.substring(0, 10)}}</template>
 | 
			
		||||
      </el-table-column>
 | 
			
		||||
      <el-table-column
 | 
			
		||||
        label="关联资质"
 | 
			
		||||
| 
						 | 
				
			
			@ -183,7 +174,6 @@
 | 
			
		|||
            </template>
 | 
			
		||||
          </el-table-column> -->
 | 
			
		||||
    </el-table>
 | 
			
		||||
 | 
			
		||||
    <pagination
 | 
			
		||||
      v-show="cmaList.count > 0"
 | 
			
		||||
      :total="cmaList.count"
 | 
			
		||||
| 
						 | 
				
			
			@ -281,13 +271,10 @@ export default {
 | 
			
		|||
      val = val + "";
 | 
			
		||||
      if (this.listQuery.search != "") {
 | 
			
		||||
        let searchList = this.listQuery.search.split(" ");
 | 
			
		||||
        for (var i = 0; i < searchList.length; i++) {
 | 
			
		||||
          val = val.replace(
 | 
			
		||||
            searchList[i],
 | 
			
		||||
            '<span style="color:red;font-weight:bold">' +
 | 
			
		||||
              searchList[i] +
 | 
			
		||||
              "</span>"
 | 
			
		||||
          );
 | 
			
		||||
        let reg = null;
 | 
			
		||||
        for (let i = 0; i < searchList.length; i++) {
 | 
			
		||||
         reg=new RegExp(searchList[i],"g");
 | 
			
		||||
          val = val.replace(reg, '<span style="color:red;font-weight:bold">' + searchList[i] + '</span>');
 | 
			
		||||
        }
 | 
			
		||||
        return val;
 | 
			
		||||
      } else {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -26,7 +26,7 @@
 | 
			
		|||
        fit
 | 
			
		||||
        stripe
 | 
			
		||||
        highlight-current-row
 | 
			
		||||
        max-height="300"
 | 
			
		||||
        :height="topHeight"
 | 
			
		||||
        @row-click="clickRow"
 | 
			
		||||
      >
 | 
			
		||||
        <el-table-column type="index" width="50"/>
 | 
			
		||||
| 
						 | 
				
			
			@ -66,7 +66,7 @@
 | 
			
		|||
          v-if="buttonsShow&&checkPermission(['qaction_create'])"
 | 
			
		||||
          type="primary"
 | 
			
		||||
          style="float: right"
 | 
			
		||||
          @click="serviceUpdate(scope)"
 | 
			
		||||
          @click="serviceUpdate()"
 | 
			
		||||
        >
 | 
			
		||||
          更新服务
 | 
			
		||||
        </el-button>
 | 
			
		||||
| 
						 | 
				
			
			@ -74,7 +74,7 @@
 | 
			
		|||
          v-if="buttonsShow&&checkPermission(['qaction_create'])"
 | 
			
		||||
          type="primary"
 | 
			
		||||
          style="float: right;margin-right: 10px"
 | 
			
		||||
          @click="qualiUpdate(scope)"
 | 
			
		||||
          @click="qualiUpdate()"
 | 
			
		||||
        >
 | 
			
		||||
          编辑资质
 | 
			
		||||
        </el-button>
 | 
			
		||||
| 
						 | 
				
			
			@ -82,7 +82,7 @@
 | 
			
		|||
          v-if="buttonsShow&&checkPermission(['qaction_create'])"
 | 
			
		||||
          type="primary"
 | 
			
		||||
          style="float: right;margin-right: 10px"
 | 
			
		||||
          @click="qualiCreate(scope)"
 | 
			
		||||
          @click="qualiCreate()"
 | 
			
		||||
        >
 | 
			
		||||
          新增资质
 | 
			
		||||
        </el-button>
 | 
			
		||||
| 
						 | 
				
			
			@ -90,7 +90,7 @@
 | 
			
		|||
          v-if="buttonsShow&&checkPermission(['qaction_create'])"
 | 
			
		||||
          type="primary"
 | 
			
		||||
          style="float: right;margin-right: 10px"
 | 
			
		||||
          @click="abilityCreate(scope)"
 | 
			
		||||
          @click="abilityCreate()"
 | 
			
		||||
        >
 | 
			
		||||
          新增能力
 | 
			
		||||
        </el-button>
 | 
			
		||||
| 
						 | 
				
			
			@ -103,9 +103,9 @@
 | 
			
		|||
        fit
 | 
			
		||||
        stripe
 | 
			
		||||
        highlight-current-row
 | 
			
		||||
        max-height="400"
 | 
			
		||||
        :height="bottomHeight"
 | 
			
		||||
      >
 | 
			
		||||
        <el-table-column type="index" width="50" />
 | 
			
		||||
        <el-table-column type="index" width="50"/>
 | 
			
		||||
 | 
			
		||||
        <el-table-column width="150px" label="任务标题">
 | 
			
		||||
          <template>{{qtaskName}}</template>
 | 
			
		||||
| 
						 | 
				
			
			@ -124,13 +124,6 @@
 | 
			
		|||
            <el-tag type="danger" effect="plain" v-else>未确认</el-tag>
 | 
			
		||||
          </template>
 | 
			
		||||
        </el-table-column>
 | 
			
		||||
        <el-table-column label="改动内容">
 | 
			
		||||
          <template #default="scope">
 | 
			
		||||
            <span v-if="scope.row.value2.name">{{ scope.row.value2.name }}</span>
 | 
			
		||||
            <span v-else>{{ scope.row.value2 }}</span>
 | 
			
		||||
          </template>
 | 
			
		||||
 | 
			
		||||
        </el-table-column>
 | 
			
		||||
        <el-table-column label="报送文件">
 | 
			
		||||
          <template slot-scope="scope" v-if="scope.row.files">
 | 
			
		||||
            <el-link
 | 
			
		||||
| 
						 | 
				
			
			@ -138,19 +131,23 @@
 | 
			
		|||
              @click="handleRecord({ action: 'view', record: scope.row })"
 | 
			
		||||
            >有
 | 
			
		||||
              <span style="color: red">{{ scope.row.files.length }}</span>
 | 
			
		||||
              个文件</el-link
 | 
			
		||||
              个文件
 | 
			
		||||
            </el-link
 | 
			
		||||
            >
 | 
			
		||||
            <div v-else v-for="item in scope.row.files_" v-bind:key="item.id">
 | 
			
		||||
              <el-link :href="item.path" target="_blank" type="primary">
 | 
			
		||||
                {{item.name }}</el-link>
 | 
			
		||||
                {{item.name }}
 | 
			
		||||
              </el-link>
 | 
			
		||||
            </div>
 | 
			
		||||
          </template>
 | 
			
		||||
        </el-table-column>
 | 
			
		||||
        <el-table-column label="操作人">
 | 
			
		||||
          <template slot-scope="scope">{{ scope.row.content_name }}</template>
 | 
			
		||||
          <template slot-scope="scope">
 | 
			
		||||
            <span v-if="scope.row.create_by_"> {{ scope.row.create_by_.name }}</span>
 | 
			
		||||
          </template>
 | 
			
		||||
        </el-table-column>
 | 
			
		||||
        <el-table-column label="操作时间">
 | 
			
		||||
          <template slot-scope="scope" >{{ scope.row.update_time.substring(0, 16) }}</template>
 | 
			
		||||
          <template slot-scope="scope">{{ scope.row.update_time.substring(0, 16) }}</template>
 | 
			
		||||
        </el-table-column>
 | 
			
		||||
 | 
			
		||||
        <el-table-column
 | 
			
		||||
| 
						 | 
				
			
			@ -165,7 +162,8 @@
 | 
			
		|||
              type="danger"
 | 
			
		||||
              size="small"
 | 
			
		||||
              @click="handleDelete( scope.row.id )"
 | 
			
		||||
            >删除</el-link>
 | 
			
		||||
            >删除
 | 
			
		||||
            </el-link>
 | 
			
		||||
          </template>
 | 
			
		||||
 | 
			
		||||
        </el-table-column>
 | 
			
		||||
| 
						 | 
				
			
			@ -319,21 +317,16 @@
 | 
			
		|||
        </el-form-item>
 | 
			
		||||
        <el-form-item label="备案城市" v-if="qualiForm.type==='OTHER'">
 | 
			
		||||
          <el-select
 | 
			
		||||
            v-model="qualiForm.province"
 | 
			
		||||
            placeholder="省份"
 | 
			
		||||
            clearable
 | 
			
		||||
            @change="getCites(qualiForm.province)"
 | 
			
		||||
          >
 | 
			
		||||
            <el-option
 | 
			
		||||
              v-for="item in proviceOptions"
 | 
			
		||||
              :key="item.id"
 | 
			
		||||
              :label="item.name"
 | 
			
		||||
              :value="item.id">
 | 
			
		||||
            </el-option>
 | 
			
		||||
          </el-select>
 | 
			
		||||
          <el-select
 | 
			
		||||
            v-model="qualiForm.city"
 | 
			
		||||
            placeholder="所在市"
 | 
			
		||||
            v-model="qualiForm.citys"
 | 
			
		||||
            placeholder="备案城市"
 | 
			
		||||
            style="width: 100%;"
 | 
			
		||||
            filterable
 | 
			
		||||
            remote
 | 
			
		||||
            multiple
 | 
			
		||||
            reserve-keyword
 | 
			
		||||
            :remote-method="searchCity"
 | 
			
		||||
            :loading="loading"
 | 
			
		||||
            @change="getCheckCity"
 | 
			
		||||
          >
 | 
			
		||||
            <el-option
 | 
			
		||||
              v-for="item in cityOptions"
 | 
			
		||||
| 
						 | 
				
			
			@ -364,6 +357,11 @@
 | 
			
		|||
            style="width: 100%;"
 | 
			
		||||
            v-model="qualiForm.city"
 | 
			
		||||
            placeholder="所在市"
 | 
			
		||||
            filterable
 | 
			
		||||
            remote
 | 
			
		||||
            reserve-keyword
 | 
			
		||||
            :remote-method="searchCity"
 | 
			
		||||
            :loading="loading"
 | 
			
		||||
          >
 | 
			
		||||
            <el-option
 | 
			
		||||
              v-for="item in cityOptions"
 | 
			
		||||
| 
						 | 
				
			
			@ -396,12 +394,13 @@
 | 
			
		|||
          align="center"
 | 
			
		||||
          label="操作"
 | 
			
		||||
        >
 | 
			
		||||
          <template slot-scope="scope">
 | 
			
		||||
          <template #default="scope">
 | 
			
		||||
            <el-link
 | 
			
		||||
              type="primary"
 | 
			
		||||
              size="small"
 | 
			
		||||
              @click="handleEdit(scope.row)"
 | 
			
		||||
            >编辑</el-link>
 | 
			
		||||
            >编辑
 | 
			
		||||
            </el-link>
 | 
			
		||||
          </template>
 | 
			
		||||
        </el-table-column>
 | 
			
		||||
      </el-table>
 | 
			
		||||
| 
						 | 
				
			
			@ -464,60 +463,16 @@
 | 
			
		|||
          ></el-input>
 | 
			
		||||
        </el-form-item>
 | 
			
		||||
        <el-form-item label="备案城市" v-if="qualiForm.type==='OTHER'">
 | 
			
		||||
          <el-select
 | 
			
		||||
            v-model="qualiForm.province"
 | 
			
		||||
            placeholder="省份"
 | 
			
		||||
            clearable
 | 
			
		||||
            @change="getCites(qualiForm.province)"
 | 
			
		||||
          >
 | 
			
		||||
            <el-option
 | 
			
		||||
              v-for="item in proviceOptions"
 | 
			
		||||
              :key="item.id"
 | 
			
		||||
              :label="item.name"
 | 
			
		||||
              :value="item.id">
 | 
			
		||||
            </el-option>
 | 
			
		||||
          </el-select>
 | 
			
		||||
          <el-select
 | 
			
		||||
            v-model="qualiForm.city"
 | 
			
		||||
            placeholder="所在市"
 | 
			
		||||
          >
 | 
			
		||||
            <el-option
 | 
			
		||||
              v-for="item in cityOptions"
 | 
			
		||||
              :key="item.id"
 | 
			
		||||
              :label="item.name"
 | 
			
		||||
              :value="item.id"
 | 
			
		||||
            />
 | 
			
		||||
          </el-select>
 | 
			
		||||
          <el-input v-model="qualiForm.citys" disabled placeholder="备案城市"/>
 | 
			
		||||
          <!--<span v-for="item in qualiForm.citys" :key="item.id">{{item.name}}</span>-->
 | 
			
		||||
        </el-form-item>
 | 
			
		||||
        <el-form-item label="所在省" v-if="qualiForm.grade===20">
 | 
			
		||||
          <el-select
 | 
			
		||||
            v-model="qualiForm.province"
 | 
			
		||||
            placeholder="省份"
 | 
			
		||||
            clearable
 | 
			
		||||
            style="width: 100%"
 | 
			
		||||
            @change="getCites(qualiForm.province)"
 | 
			
		||||
          >
 | 
			
		||||
            <el-option
 | 
			
		||||
              v-for="item in proviceOptions"
 | 
			
		||||
              :key="item.id"
 | 
			
		||||
              :label="item.name"
 | 
			
		||||
              :value="item.id">
 | 
			
		||||
            </el-option>
 | 
			
		||||
          </el-select>
 | 
			
		||||
          <el-input v-model="qualiForm.province_name" disabled placeholder="所在省"/>
 | 
			
		||||
          <!--{{ formData.province_name }}-->
 | 
			
		||||
        </el-form-item>
 | 
			
		||||
        <el-form-item label="所在市" v-if="qualiForm.grade===30">
 | 
			
		||||
          <el-select
 | 
			
		||||
            style="width: 100%;"
 | 
			
		||||
            v-model="qualiForm.city"
 | 
			
		||||
            placeholder="所在市"
 | 
			
		||||
          >
 | 
			
		||||
            <el-option
 | 
			
		||||
              v-for="item in cityOptions"
 | 
			
		||||
              :key="item.id"
 | 
			
		||||
              :label="item.name"
 | 
			
		||||
              :value="item.id"
 | 
			
		||||
            />
 | 
			
		||||
          </el-select>
 | 
			
		||||
          <el-input v-model="qualiForm.city_name" disabled placeholder="所在市"/>
 | 
			
		||||
          <!--{{ formData.city_name }}-->
 | 
			
		||||
        </el-form-item>
 | 
			
		||||
      </el-form>
 | 
			
		||||
      <div style="text-align: right">
 | 
			
		||||
| 
						 | 
				
			
			@ -554,7 +509,19 @@
 | 
			
		|||
</template>
 | 
			
		||||
 | 
			
		||||
<script>
 | 
			
		||||
  import {getQtaskMy, getQtask,qactionMy, getQualityMy,createQuali,qactionDelete,updateQuali, createAbility, updateService,provinceLists,cityLists} from "@/api/ability";
 | 
			
		||||
  import {
 | 
			
		||||
    getQtaskMy,
 | 
			
		||||
    getQtask,
 | 
			
		||||
    qactionMy,
 | 
			
		||||
    getQualityMy,
 | 
			
		||||
    createQuali,
 | 
			
		||||
    qactionDelete,
 | 
			
		||||
    updateQuali,
 | 
			
		||||
    createAbility,
 | 
			
		||||
    updateService,
 | 
			
		||||
    provinceLists,
 | 
			
		||||
    cityLists
 | 
			
		||||
  } from "@/api/ability";
 | 
			
		||||
  import {getDictList} from "@/api/dict";
 | 
			
		||||
  import {genTree} from "@/utils";
 | 
			
		||||
  import {getOrgList} from "@/api/org";
 | 
			
		||||
| 
						 | 
				
			
			@ -573,27 +540,28 @@
 | 
			
		|||
        upHeaders: upHeaders(),
 | 
			
		||||
        upUrl: upUrl(),
 | 
			
		||||
        qtask: null,
 | 
			
		||||
        checkedItem:null,
 | 
			
		||||
        checkedItem: null,
 | 
			
		||||
        pageForm: {
 | 
			
		||||
          page: 1,
 | 
			
		||||
          page_size: 10,
 | 
			
		||||
          org: '',
 | 
			
		||||
        },
 | 
			
		||||
        listQuery:{
 | 
			
		||||
        listQuery: {
 | 
			
		||||
          page: 1,
 | 
			
		||||
          page_size: 10,
 | 
			
		||||
          task:null,
 | 
			
		||||
          task: null,
 | 
			
		||||
        },
 | 
			
		||||
        quliList: [],
 | 
			
		||||
        orgData: [],
 | 
			
		||||
        fileList: [],
 | 
			
		||||
        cityOptions: [],
 | 
			
		||||
        proviceOptions:[],
 | 
			
		||||
        proviceOptions: [],
 | 
			
		||||
        fileLista: [],
 | 
			
		||||
        updateId: null,
 | 
			
		||||
        taskList: {count: 0,},
 | 
			
		||||
        recordList: {count: 0,},
 | 
			
		||||
        drawer: false,
 | 
			
		||||
        loading: false,
 | 
			
		||||
        showForm: false,
 | 
			
		||||
        multiple: true,
 | 
			
		||||
        listLoading: false,
 | 
			
		||||
| 
						 | 
				
			
			@ -602,14 +570,14 @@
 | 
			
		|||
        dialogVisibleAbility: false,
 | 
			
		||||
        dialogVisibleQuliEdit: false,
 | 
			
		||||
        dialogType: "new",
 | 
			
		||||
        severForm:{
 | 
			
		||||
          qtask:null,
 | 
			
		||||
          value2:'',
 | 
			
		||||
        severForm: {
 | 
			
		||||
          qtask: null,
 | 
			
		||||
          value2: '',
 | 
			
		||||
        },
 | 
			
		||||
        qualiForm: {
 | 
			
		||||
          name: "",
 | 
			
		||||
          type: "",
 | 
			
		||||
          grade:null,
 | 
			
		||||
          grade: null,
 | 
			
		||||
          scope: "",
 | 
			
		||||
          level: "",
 | 
			
		||||
          province: "",
 | 
			
		||||
| 
						 | 
				
			
			@ -641,18 +609,24 @@
 | 
			
		|||
          'CNAS',
 | 
			
		||||
          'OTHER'
 | 
			
		||||
        ],
 | 
			
		||||
        atypeOptions:[],
 | 
			
		||||
        atypeOptions: [],
 | 
			
		||||
        afieldOptions: [],//领域
 | 
			
		||||
        gradeOptions: [
 | 
			
		||||
          {id:10,name:'国家级'},{id:20,name:'省级'},{id:30,name:'市级'}
 | 
			
		||||
          {id: 10, name: '国家级'}, {id: 20, name: '省级'}, {id: 30, name: '市级'}
 | 
			
		||||
        ],//等级
 | 
			
		||||
        qtaskName: "",
 | 
			
		||||
        filterOrgText: "",
 | 
			
		||||
        treeLoding: false,
 | 
			
		||||
        buttonsShow: false,
 | 
			
		||||
        topHeight: null,
 | 
			
		||||
        bottomHeight: null,
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
    mounted() {
 | 
			
		||||
      let height1 = document.getElementsByClassName('app-main')[0].clientHeight / 2;
 | 
			
		||||
      let height2 = document.getElementsByClassName('pagination-container')[0].clientHeight;
 | 
			
		||||
      this.topHeight = height1 - height2 - 95;
 | 
			
		||||
      this.bottomHeight = height1 - height2 - 80;
 | 
			
		||||
      this.getTableList();
 | 
			
		||||
      this.getGroup();
 | 
			
		||||
      //领域类型
 | 
			
		||||
| 
						 | 
				
			
			@ -663,22 +637,41 @@
 | 
			
		|||
    },
 | 
			
		||||
 | 
			
		||||
    methods: {
 | 
			
		||||
      getOptions(){
 | 
			
		||||
        getDictList({type__code: "field_type",is_used:true}).then((res) => {
 | 
			
		||||
      getOptions() {
 | 
			
		||||
        getDictList({type__code: "field_type", is_used: true}).then((res) => {
 | 
			
		||||
          this.afieldOptions = genTree(res.data);
 | 
			
		||||
        });
 | 
			
		||||
        getDictList({type__code: "quality_type",is_used:true}).then((res) => {
 | 
			
		||||
        getDictList({type__code: "quality_type", is_used: true}).then((res) => {
 | 
			
		||||
          this.atypeOptions = genTree(res.data);
 | 
			
		||||
        });
 | 
			
		||||
      },
 | 
			
		||||
      getProvince(){
 | 
			
		||||
        provinceLists({page:1,page_size:60}).then(res=>{
 | 
			
		||||
      getProvince() {
 | 
			
		||||
        provinceLists({page: 1, page_size: 60}).then(res => {
 | 
			
		||||
          this.proviceOptions = res.data.results;
 | 
			
		||||
        });
 | 
			
		||||
        cityLists().then(res => {
 | 
			
		||||
          this.cityOptions = res.data.results;
 | 
			
		||||
        })
 | 
			
		||||
      },
 | 
			
		||||
      getCites(province){
 | 
			
		||||
        this.qualiForm.city ='';
 | 
			
		||||
        cityLists({parent:province,page:1,page_size:100}).then(res=>{
 | 
			
		||||
      searchCity(query) {
 | 
			
		||||
        if (query !== '') {
 | 
			
		||||
          this.loading = true;
 | 
			
		||||
          cityLists({search: query}).then(res => {
 | 
			
		||||
            this.cityOptions = res.data.results;
 | 
			
		||||
            this.loading = false;
 | 
			
		||||
          })
 | 
			
		||||
        } else {
 | 
			
		||||
          this.cityOptions = [];
 | 
			
		||||
        }
 | 
			
		||||
      },
 | 
			
		||||
      getCheckCity(data) {
 | 
			
		||||
        debugger;
 | 
			
		||||
        console.log(data);
 | 
			
		||||
        this.qualiForm.citys = data;
 | 
			
		||||
      },
 | 
			
		||||
      getCites(province) {
 | 
			
		||||
        this.qualiForm.city = '';
 | 
			
		||||
        cityLists({parent: province, page: 1, page_size: 100}).then(res => {
 | 
			
		||||
          this.cityOptions = res.data.results;
 | 
			
		||||
        })
 | 
			
		||||
      },
 | 
			
		||||
| 
						 | 
				
			
			@ -717,22 +710,20 @@
 | 
			
		|||
      handleFilter() {
 | 
			
		||||
        this.getTableList();
 | 
			
		||||
      },
 | 
			
		||||
      clickRow(obj){
 | 
			
		||||
      clickRow(obj) {
 | 
			
		||||
        this.checkedItem = obj;
 | 
			
		||||
        this.qtask = obj.qtask;
 | 
			
		||||
        this.qtaskName = obj.qtask_.name;
 | 
			
		||||
        this.buttonsShow = true;
 | 
			
		||||
        this.listQuery.task = obj.qtask;
 | 
			
		||||
        qactionMy(this.listQuery).then((res)=>{
 | 
			
		||||
        qactionMy(this.listQuery).then((res) => {
 | 
			
		||||
          this.recordList = res.data;
 | 
			
		||||
        })
 | 
			
		||||
      },
 | 
			
		||||
 | 
			
		||||
      ///////
 | 
			
		||||
      getList(){
 | 
			
		||||
        this.qtask = obj.qtask;
 | 
			
		||||
        this.listQuery.task =  obj.qtask;
 | 
			
		||||
        qactionMy(this.listQuery).then((res)=>{
 | 
			
		||||
      getList() {
 | 
			
		||||
        qactionMy(this.listQuery).then((res) => {
 | 
			
		||||
          this.recordList = res.data;
 | 
			
		||||
        })
 | 
			
		||||
      },
 | 
			
		||||
| 
						 | 
				
			
			@ -741,14 +732,16 @@
 | 
			
		|||
        this.dialogVisibleSever = true;
 | 
			
		||||
      },
 | 
			
		||||
      //更新服务提交
 | 
			
		||||
      submitEditSever(form){
 | 
			
		||||
      submitEditSever(form) {
 | 
			
		||||
        let that = this;
 | 
			
		||||
        this.$refs[form].validate((valid) => {
 | 
			
		||||
          if (valid) {
 | 
			
		||||
            this.severForm.qtask = this.qtask;
 | 
			
		||||
            that.severForm.qtask = this.qtask;
 | 
			
		||||
            updateService(this.severForm).then((res) => {
 | 
			
		||||
              if (res.code >= 200) {
 | 
			
		||||
                this.dialogVisibleSever = false;
 | 
			
		||||
                this.$message.success("成功");
 | 
			
		||||
                that.getList();
 | 
			
		||||
                that.dialogVisibleSever = false;
 | 
			
		||||
                that.$message.success("成功");
 | 
			
		||||
              }
 | 
			
		||||
            });
 | 
			
		||||
          } else {
 | 
			
		||||
| 
						 | 
				
			
			@ -768,35 +761,41 @@
 | 
			
		|||
        this.dialogVisibleQuliEdit = true;
 | 
			
		||||
        this.getQuliList();
 | 
			
		||||
      },
 | 
			
		||||
      getQuliList(){
 | 
			
		||||
        getQualityMy().then(res=>{
 | 
			
		||||
      getQuliList() {
 | 
			
		||||
        getQualityMy().then(res => {
 | 
			
		||||
          this.quliList = res.data.results;
 | 
			
		||||
        })
 | 
			
		||||
      },
 | 
			
		||||
      //更改资质类型
 | 
			
		||||
      qualiTypeChange(){
 | 
			
		||||
        if(this.qualiForm.type==='OTHER'){
 | 
			
		||||
      qualiTypeChange() {
 | 
			
		||||
        if (this.qualiForm.type === 'OTHER') {
 | 
			
		||||
          this.qualiForm.grade = '';
 | 
			
		||||
          this.qualiForm.city = '';
 | 
			
		||||
          this.qualiForm.province = '';
 | 
			
		||||
        }
 | 
			
		||||
      },
 | 
			
		||||
      //编辑资质
 | 
			
		||||
      handleEdit(row){
 | 
			
		||||
      handleEdit(row) {
 | 
			
		||||
 | 
			
		||||
        this.showForm = true;
 | 
			
		||||
        this.qualiForm.id= row.id;
 | 
			
		||||
        this.qualiForm.name= row.name;
 | 
			
		||||
        this.qualiForm.type= row.type;
 | 
			
		||||
        this.qualiForm.grade =row.grade;
 | 
			
		||||
        this.qualiForm.scope= row.scope;
 | 
			
		||||
        this.qualiForm.level=row.level;
 | 
			
		||||
        this.qualiForm.province=row.province;
 | 
			
		||||
        this.qualiForm.city=row.city;
 | 
			
		||||
        this.qualiForm.description=row.description;
 | 
			
		||||
        this.qualiForm.citys=row.citys;
 | 
			
		||||
        cityLists({parent:row.province,page:1,page_size:100}).then(res=>{
 | 
			
		||||
          this.cityOptions = res.data.results;
 | 
			
		||||
        this.qualiForm.id = row.id;
 | 
			
		||||
        this.qualiForm.name = row.name;
 | 
			
		||||
        this.qualiForm.type = row.type;
 | 
			
		||||
        this.qualiForm.grade = row.grade;
 | 
			
		||||
        this.qualiForm.scope = row.scope;
 | 
			
		||||
        this.qualiForm.level = row.level;
 | 
			
		||||
        this.qualiForm.province_name = row.province_name?row.province_name:'';
 | 
			
		||||
        this.qualiForm.city_name = row.city_name?row.city_name:'';
 | 
			
		||||
        this.qualiForm.description = row.description;
 | 
			
		||||
        this.qualiForm.citys = null;
 | 
			
		||||
        if(row.citys_&&row.citys_.length>0){
 | 
			
		||||
          let citys = '';
 | 
			
		||||
          row.citys_.forEach(item=>{
 | 
			
		||||
            citys = citys+item.name;
 | 
			
		||||
          })
 | 
			
		||||
          this.qualiForm.citys = citys;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
      },
 | 
			
		||||
      //新增能力
 | 
			
		||||
      abilityCreate() {
 | 
			
		||||
| 
						 | 
				
			
			@ -804,37 +803,32 @@
 | 
			
		|||
      },
 | 
			
		||||
      //提交资质
 | 
			
		||||
      async confirm(form) {
 | 
			
		||||
        this.$refs[form].validate((valid) => {
 | 
			
		||||
        let that = this;
 | 
			
		||||
        that.$refs[form].validate((valid) => {
 | 
			
		||||
          if (valid) {
 | 
			
		||||
            if(this.qualiForm.type==='OTHER'){
 | 
			
		||||
              let city = parseInt(this.qualiForm.city);
 | 
			
		||||
              let province = parseInt(this.qualiForm.province);
 | 
			
		||||
              this.qualiForm.citys.push(province);
 | 
			
		||||
              this.qualiForm.citys.push(city);
 | 
			
		||||
            }else{}
 | 
			
		||||
            let obj = new Object();
 | 
			
		||||
            obj.qtask = this.qtask;
 | 
			
		||||
            obj.value2 = this.qualiForm;
 | 
			
		||||
            if(obj.value2.grade===''){
 | 
			
		||||
              obj.value2.grade=null
 | 
			
		||||
            obj.qtask = that.qtask;
 | 
			
		||||
            obj.value2 = that.qualiForm;
 | 
			
		||||
            if (obj.value2.grade === '') {
 | 
			
		||||
              obj.value2.grade = null;
 | 
			
		||||
            }
 | 
			
		||||
            const isEdit = this.dialogType === "edit";
 | 
			
		||||
            const isEdit = that.dialogType === "edit";
 | 
			
		||||
            if (isEdit) {
 | 
			
		||||
              updateQuali(obj).then((res) => {
 | 
			
		||||
                if (res.code >= 200) {
 | 
			
		||||
                  this.getTableList();
 | 
			
		||||
                  this.dialogVisibleQuliEdit = false;
 | 
			
		||||
                  this.$message.success("成功");
 | 
			
		||||
                if (res.code >= 200 && res.code < 400) {
 | 
			
		||||
                  that.getList();
 | 
			
		||||
                  that.dialogVisibleQuliEdit = false;
 | 
			
		||||
                  that.$message.success("成功");
 | 
			
		||||
                }
 | 
			
		||||
              });
 | 
			
		||||
            } else {
 | 
			
		||||
              debugger;
 | 
			
		||||
              console.log(obj)
 | 
			
		||||
              console.log(obj);
 | 
			
		||||
              createQuali(obj).then((res) => {
 | 
			
		||||
                if (res.code >= 200) {
 | 
			
		||||
                  this.getTableList();
 | 
			
		||||
                  this.dialogVisible = false;
 | 
			
		||||
                  this.$message.success("成功");
 | 
			
		||||
                if (res.code >= 200 && res.code < 400) {
 | 
			
		||||
                  that.getList();
 | 
			
		||||
                  that.dialogVisible = false;
 | 
			
		||||
                  that.$message.success("成功");
 | 
			
		||||
                }
 | 
			
		||||
              });
 | 
			
		||||
            }
 | 
			
		||||
| 
						 | 
				
			
			@ -845,14 +839,15 @@
 | 
			
		|||
      },
 | 
			
		||||
      //提交服务更新
 | 
			
		||||
      async confirmAbility(form) {
 | 
			
		||||
        this.$refs[form].validate((valid) => {
 | 
			
		||||
        let that = this;
 | 
			
		||||
        that.$refs[form].validate((valid) => {
 | 
			
		||||
          if (valid) {
 | 
			
		||||
            this.abilityForm.qtask = this.qtask;
 | 
			
		||||
            createAbility(this.abilityForm).then((res) => {
 | 
			
		||||
              if (res.code >= 200) {
 | 
			
		||||
                this.getTableList();
 | 
			
		||||
                this.dialogVisibleAbility = false;
 | 
			
		||||
                this.$message.success("成功");
 | 
			
		||||
            that.abilityForm.qtask = that.qtask;
 | 
			
		||||
            createAbility(that.abilityForm).then((res) => {
 | 
			
		||||
              if (res.code >= 200 && res.code < 400) {
 | 
			
		||||
                that.getList();
 | 
			
		||||
                that.dialogVisibleAbility = false;
 | 
			
		||||
                that.$message.success("成功");
 | 
			
		||||
              }
 | 
			
		||||
            });
 | 
			
		||||
          } else {
 | 
			
		||||
| 
						 | 
				
			
			@ -861,12 +856,16 @@
 | 
			
		|||
        });
 | 
			
		||||
      },
 | 
			
		||||
      //删除操作
 | 
			
		||||
      handleDelete(id){
 | 
			
		||||
        this.$confirm("确认删除该操作吗?", "提示")
 | 
			
		||||
      handleDelete(id) {
 | 
			
		||||
        let that = this;
 | 
			
		||||
        that.$confirm("确认删除该操作吗?", "提示")
 | 
			
		||||
          .then(async () => {
 | 
			
		||||
            await qactionDelete(id);
 | 
			
		||||
            location.reload();
 | 
			
		||||
            this.$message.success("成功");
 | 
			
		||||
            await qactionDelete(id).then(res => {
 | 
			
		||||
              if (res.code >= 200 && res.code < 400) {
 | 
			
		||||
                that.getList();
 | 
			
		||||
                that.$message.success("成功");
 | 
			
		||||
              }
 | 
			
		||||
            });
 | 
			
		||||
          })
 | 
			
		||||
          .catch((err) => {
 | 
			
		||||
            console.error(err);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,6 +1,6 @@
 | 
			
		|||
<template>
 | 
			
		||||
  <div class="app-container">
 | 
			
		||||
    <el-card>
 | 
			
		||||
    <el-card class="filterTop">
 | 
			
		||||
      <el-input
 | 
			
		||||
        v-model="pageForm.search"
 | 
			
		||||
        placeholder="任务名"
 | 
			
		||||
| 
						 | 
				
			
			@ -41,7 +41,7 @@
 | 
			
		|||
        fit
 | 
			
		||||
        stripe
 | 
			
		||||
        highlight-current-row
 | 
			
		||||
        max-height="600"
 | 
			
		||||
        :height="tableHeight"
 | 
			
		||||
      >
 | 
			
		||||
        <el-table-column type="index" width="50"/>
 | 
			
		||||
        <el-table-column label="任务名称" prop="name"></el-table-column>
 | 
			
		||||
| 
						 | 
				
			
			@ -65,12 +65,12 @@
 | 
			
		|||
              size="small"
 | 
			
		||||
              @click="handleClick(scope)"
 | 
			
		||||
            >执行</el-link>
 | 
			
		||||
            <el-link
 | 
			
		||||
           <!-- <el-link
 | 
			
		||||
              v-if="scope.row.state==='待发布'"
 | 
			
		||||
              type="primary"
 | 
			
		||||
              size="small"
 | 
			
		||||
              @click="handleEdit(scope)"
 | 
			
		||||
            >编辑</el-link>
 | 
			
		||||
            >编辑</el-link>-->
 | 
			
		||||
            <el-link
 | 
			
		||||
              v-if="scope.row.state==='待发布'"
 | 
			
		||||
              type="warning"
 | 
			
		||||
| 
						 | 
				
			
			@ -173,9 +173,13 @@
 | 
			
		|||
        },
 | 
			
		||||
        filterOrgText: "",
 | 
			
		||||
        treeLoding: false,
 | 
			
		||||
        tableHeight: null,
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
    mounted(){
 | 
			
		||||
      let height1 = document.getElementsByClassName('app-main')[0].clientHeight;
 | 
			
		||||
      let height2 = document.getElementsByClassName('filterTop')[0].clientHeight;
 | 
			
		||||
      this.tableHeight = height1-height2-70;
 | 
			
		||||
      this.getOrgsList();
 | 
			
		||||
      this.getQtaskList();
 | 
			
		||||
    },
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,6 +1,6 @@
 | 
			
		|||
<template>
 | 
			
		||||
  <div class="app-container">
 | 
			
		||||
    <el-card>
 | 
			
		||||
    <el-card class="filterTop">
 | 
			
		||||
      <div slot="header" class="clearfix">
 | 
			
		||||
        <span>任务详情</span>
 | 
			
		||||
      </div>
 | 
			
		||||
| 
						 | 
				
			
			@ -65,7 +65,7 @@
 | 
			
		|||
        fit
 | 
			
		||||
        stripe
 | 
			
		||||
        highlight-current-row
 | 
			
		||||
        height="300px"
 | 
			
		||||
        :height="tableHeight"
 | 
			
		||||
        @row-click="clickRow"
 | 
			
		||||
      >
 | 
			
		||||
        <el-table-column label="序号" type="index" align="center" width="55"/>
 | 
			
		||||
| 
						 | 
				
			
			@ -149,7 +149,7 @@
 | 
			
		|||
        fit
 | 
			
		||||
        stripe
 | 
			
		||||
        highlight-current-row
 | 
			
		||||
        height="300px"
 | 
			
		||||
        :height="tableHeight"
 | 
			
		||||
        style="margin-top:2px"
 | 
			
		||||
        @selection-change="handleSelectRecords"
 | 
			
		||||
      >
 | 
			
		||||
| 
						 | 
				
			
			@ -169,18 +169,13 @@
 | 
			
		|||
          </template>
 | 
			
		||||
        </el-table-column>
 | 
			
		||||
        <el-table-column label="操作人">
 | 
			
		||||
          <template slot-scope="scope">{{ scope.row.content_name }}</template>
 | 
			
		||||
          <template slot-scope="scope">
 | 
			
		||||
            <span v-if=" scope.row.create_by_">{{ scope.row.create_by_.name }}</span>
 | 
			
		||||
          </template>
 | 
			
		||||
        </el-table-column>
 | 
			
		||||
        <el-table-column label="操作时间">
 | 
			
		||||
          <template slot-scope="scope">{{ scope.row.update_time }}</template>
 | 
			
		||||
        </el-table-column>
 | 
			
		||||
        <el-table-column label="改动内容">
 | 
			
		||||
          <template slot-scope="scope">
 | 
			
		||||
            <span v-if="scope.row.value2.name">{{ scope.row.value2.name}}</span>
 | 
			
		||||
            <span v-else>{{ scope.row.value2}}</span>
 | 
			
		||||
 | 
			
		||||
          </template>
 | 
			
		||||
        </el-table-column>
 | 
			
		||||
        <el-table-column label="文件">
 | 
			
		||||
          <template slot-scope="scope">
 | 
			
		||||
            <el-link v-if="scope.row.file" :href="scope.row.file" target="_blank" type="primary">
 | 
			
		||||
| 
						 | 
				
			
			@ -225,12 +220,13 @@
 | 
			
		|||
      size="40%"
 | 
			
		||||
    >
 | 
			
		||||
      <div
 | 
			
		||||
        v-if="data.action==='service:update'"
 | 
			
		||||
        v-if="showData.type==='service:update'"
 | 
			
		||||
        style="padding: 10px 20px;position: relative"
 | 
			
		||||
      >
 | 
			
		||||
        <p style="font-size: 20px;font-weight: bold;">更新服务</p>
 | 
			
		||||
        <p><span style="display: inline-block;width: 100px;font-weight: bold;">原始内容:</span>{{data.value1}}</p>
 | 
			
		||||
        <p><span style="display: inline-block;width: 100px;font-weight: bold;">更新内容:</span>{{data.value2}}</p>
 | 
			
		||||
        <p><span style="display: inline-block;width: 100px;font-weight: bold;">原始内容:</span>{{showData.data.value1}}</p>
 | 
			
		||||
        <p><span style="display: inline-block;width: 100px;font-weight: bold;">更新内容:</span>{{showData.data.value2}}</p>
 | 
			
		||||
        <el-divider></el-divider>
 | 
			
		||||
        <el-button
 | 
			
		||||
          v-if="actionType==='confirm'"
 | 
			
		||||
          style="position: absolute;right:40px;margin-top: 20px"
 | 
			
		||||
| 
						 | 
				
			
			@ -241,14 +237,15 @@
 | 
			
		|||
        </el-button>
 | 
			
		||||
      </div>
 | 
			
		||||
      <div
 | 
			
		||||
        v-if="data.action==='ablity:create'"
 | 
			
		||||
        v-if="showData.type==='ablity:create'"
 | 
			
		||||
        style="padding: 10px 20px;position: relative"
 | 
			
		||||
      >
 | 
			
		||||
        <p style="font-size: 20px;font-weight: bold;">新增能力</p>
 | 
			
		||||
        <p><span style="display: inline-block;width: 100px;font-weight: bold;">能力类型 :</span>{{data.afield_name}}</p>
 | 
			
		||||
        <p><span style="display: inline-block;width: 100px;font-weight: bold;">能力领域:</span>{{data.afield_name}}</p>
 | 
			
		||||
        <p><span style="display: inline-block;width: 100px;font-weight: bold;">上传文件:</span>{{data.file}}</p>
 | 
			
		||||
        <el-link :href="data.file" target="_blank" type="primary">{{data.file}}</el-link>
 | 
			
		||||
        <p><span style="display: inline-block;width: 100px;font-weight: bold;">能力类型 :</span>{{showData.data.afield_name}}</p>
 | 
			
		||||
        <p><span style="display: inline-block;width: 100px;font-weight: bold;">能力领域:</span>{{showData.data.afield_name}}</p>
 | 
			
		||||
        <p><span style="display: inline-block;width: 100px;font-weight: bold;">上传文件:</span>{{showData.data.file}}</p>
 | 
			
		||||
        <el-link :href="showData.data.file" target="_blank" type="primary">{{showData.data.file}}</el-link>
 | 
			
		||||
        <el-divider></el-divider>
 | 
			
		||||
        <el-button
 | 
			
		||||
          v-if="actionType==='confirm'"
 | 
			
		||||
          style="position: absolute;right:40px;margin-top: 20px"
 | 
			
		||||
| 
						 | 
				
			
			@ -265,9 +262,10 @@
 | 
			
		|||
        @handleDo="handleDo"
 | 
			
		||||
      ></quliShow>
 | 
			
		||||
      <quliShow
 | 
			
		||||
        v-if="drawer&&showData.type==='quli:update'"
 | 
			
		||||
        v-if="drawer&&showData.type==='quali:update'"
 | 
			
		||||
        ref="quliShow"
 | 
			
		||||
        :showData="showData"
 | 
			
		||||
        :fieldList2="fieldList2"
 | 
			
		||||
        @handleDo="handleDo"
 | 
			
		||||
      ></quliShow>
 | 
			
		||||
    </el-drawer>
 | 
			
		||||
| 
						 | 
				
			
			@ -318,22 +316,29 @@
 | 
			
		|||
        qtask: {},
 | 
			
		||||
        detailItem: {},
 | 
			
		||||
        actionType: null,
 | 
			
		||||
        tableHeight: null,
 | 
			
		||||
        fieldList2: [],
 | 
			
		||||
 | 
			
		||||
      };
 | 
			
		||||
    },
 | 
			
		||||
    created() {
 | 
			
		||||
      this.qtaskId = sessionStorage.getItem('qtaskId');
 | 
			
		||||
    },
 | 
			
		||||
    mounted() {
 | 
			
		||||
      debugger;
 | 
			
		||||
      let height1 = document.getElementsByClassName('app-main')[0].clientHeight;
 | 
			
		||||
      let height2 = document.getElementsByClassName('filterTop')[0].clientHeight;
 | 
			
		||||
      let computedHeight = height1-height2;
 | 
			
		||||
      this.tableHeight = computedHeight/2-54;
 | 
			
		||||
      this.qtaskId = sessionStorage.getItem('qtaskId');
 | 
			
		||||
      this.getQtaskDept();
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    },
 | 
			
		||||
    methods: {
 | 
			
		||||
 | 
			
		||||
      checkPermission,
 | 
			
		||||
      getQtaskDept() {
 | 
			
		||||
        debugger;
 | 
			
		||||
        qtaskDetail({qtask: this.qtaskId}).then((res) => {
 | 
			
		||||
          debugger;
 | 
			
		||||
          this.qtaskDepts = res.data.results;
 | 
			
		||||
          this.qtask = res.data.results[0].qtask_;
 | 
			
		||||
        });
 | 
			
		||||
| 
						 | 
				
			
			@ -351,28 +356,31 @@
 | 
			
		|||
      },
 | 
			
		||||
      //操作处理
 | 
			
		||||
      handleRecord(type, item) {
 | 
			
		||||
        debugger;
 | 
			
		||||
        if (item.action === 'quali:update' || item.action === 'quali:create') {
 | 
			
		||||
          this.data = item;
 | 
			
		||||
          this.showData.data = item;
 | 
			
		||||
        this.showData.id = item.id;
 | 
			
		||||
        this.showData.type = item.action;
 | 
			
		||||
        this.showData.action = type;
 | 
			
		||||
        } else {
 | 
			
		||||
          this.data = item;
 | 
			
		||||
        this.actionType = type;
 | 
			
		||||
        }
 | 
			
		||||
        this.fieldList2 =[];
 | 
			
		||||
        qactionItem(item.id).then(res=>{
 | 
			
		||||
          if (res.code>=200) {
 | 
			
		||||
            let updateDetail = res.data.update_detail;//更改字段
 | 
			
		||||
            updateDetail.forEach(item=>{
 | 
			
		||||
              this.fieldList2.push(item.field);//所有字段
 | 
			
		||||
            })
 | 
			
		||||
            this.drawer = true;
 | 
			
		||||
        qactionItem(item.id).then(res => {
 | 
			
		||||
          debugger;
 | 
			
		||||
          console.log(res)
 | 
			
		||||
          }
 | 
			
		||||
          console.log(this.fieldList2)
 | 
			
		||||
        })
 | 
			
		||||
      },
 | 
			
		||||
      handleDelete(id) {
 | 
			
		||||
        this.$confirm("确认删除该操作吗?", "提示")
 | 
			
		||||
          .then(async () => {
 | 
			
		||||
            await qactionDelete(id);
 | 
			
		||||
            location.reload();
 | 
			
		||||
            await qactionDelete(id).then(res=>{
 | 
			
		||||
              if(res.code>=200&&res.code<400){
 | 
			
		||||
                this.getQactionList();
 | 
			
		||||
                this.$message.success("成功");
 | 
			
		||||
              }
 | 
			
		||||
            });
 | 
			
		||||
          })
 | 
			
		||||
          .catch((err) => {
 | 
			
		||||
            console.error(err);
 | 
			
		||||
| 
						 | 
				
			
			@ -381,15 +389,14 @@
 | 
			
		|||
      //操作确认
 | 
			
		||||
      confirmClick() {
 | 
			
		||||
        qactionConfirm(this.data.id).then(res => {
 | 
			
		||||
          debugger;
 | 
			
		||||
          console.log(res)
 | 
			
		||||
          if (res.code === 200) {
 | 
			
		||||
          if (res.code>=200) {
 | 
			
		||||
            this.drawer = false;
 | 
			
		||||
            this.getQactionList();
 | 
			
		||||
          }
 | 
			
		||||
        })
 | 
			
		||||
      },
 | 
			
		||||
      handleDo(data) {
 | 
			
		||||
        console.log(data);
 | 
			
		||||
        this.drawer = data;
 | 
			
		||||
        this.getQactionList();
 | 
			
		||||
      },
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,44 +1,120 @@
 | 
			
		|||
<template>
 | 
			
		||||
  <div class="app-container">
 | 
			
		||||
    <div class="ma">资质报送详情</div>
 | 
			
		||||
    <el-form label-width="100px" label-position="left">
 | 
			
		||||
    <p  v-if="showData.type==='quali:create'" style="font-size: 20px;font-weight: bold;">新增资质</p>
 | 
			
		||||
    <p  v-if="showData.type==='quali:update'" style="font-size: 20px;font-weight: bold;">编辑资质</p>
 | 
			
		||||
    <el-form
 | 
			
		||||
      v-if="showData.type==='quali:create'"
 | 
			
		||||
      label-width="100px"
 | 
			
		||||
      label-position="left"
 | 
			
		||||
    >
 | 
			
		||||
      <el-form-item label="资质名称">
 | 
			
		||||
        {{ data.value2.name }}
 | 
			
		||||
        {{ data.name }}
 | 
			
		||||
      </el-form-item>
 | 
			
		||||
      <el-form-item label="资质类型">
 | 
			
		||||
        {{ data.value2.type }}
 | 
			
		||||
        {{ data.type }}
 | 
			
		||||
      </el-form-item>
 | 
			
		||||
      <el-form-item label="资质等级" v-if="data.type!=='OTHER'">
 | 
			
		||||
        <span v-if="data.value2.grade===10">国家级</span>
 | 
			
		||||
        <span v-if="data.value2.grade===20">省级</span>
 | 
			
		||||
        <span v-if="data.value2.grade===30">市级</span>
 | 
			
		||||
        <span v-if="data.grade===10">国家级</span>
 | 
			
		||||
        <span v-if="data.grade===20">省级</span>
 | 
			
		||||
        <span v-if="data.grade===30">市级</span>
 | 
			
		||||
      </el-form-item>
 | 
			
		||||
      <el-form-item label="二级等级" v-if="data.type==='OTHER'">
 | 
			
		||||
        {{ data.value2.level }}
 | 
			
		||||
        {{ data.level }}
 | 
			
		||||
      </el-form-item>
 | 
			
		||||
      <el-form-item label="资质范围">
 | 
			
		||||
        {{data.value2.scope}}
 | 
			
		||||
        {{data.scope}}
 | 
			
		||||
      </el-form-item>
 | 
			
		||||
      <el-form-item label="描述">
 | 
			
		||||
        {{data.value2.description}}
 | 
			
		||||
        {{data.description}}
 | 
			
		||||
      </el-form-item>
 | 
			
		||||
      <el-form-item label="备案城市" v-if="data.type==='OTHER'">
 | 
			
		||||
        {{ data.value2.name }}
 | 
			
		||||
        <span v-for="item in data.citys_" :key="item.id">{{item.name}}</span>
 | 
			
		||||
        <!--{{ data.value2.citys }}-->
 | 
			
		||||
      </el-form-item>
 | 
			
		||||
      <el-form-item label="所在省" v-if="data.type!=='OTHER'">
 | 
			
		||||
        {{ data.value2.province }}
 | 
			
		||||
      <el-form-item label="所在省" v-if="data.grade===20">
 | 
			
		||||
        {{ data.province_name }}
 | 
			
		||||
      </el-form-item>
 | 
			
		||||
      <el-form-item label="所在市" v-if="data.type!=='OTHER'">
 | 
			
		||||
        {{ data.value2.city }}
 | 
			
		||||
      <el-form-item label="所在市" v-if="data.grade==30">
 | 
			
		||||
        {{ data.city_name }}
 | 
			
		||||
      </el-form-item>
 | 
			
		||||
      <el-form-item label="报送人">
 | 
			
		||||
        {{ data.value2.name }}
 | 
			
		||||
    </el-form>
 | 
			
		||||
    <div v-if="showData.type==='quali:update'">
 | 
			
		||||
      <el-form
 | 
			
		||||
        label-width="100px"
 | 
			
		||||
        label-position="left"
 | 
			
		||||
      >
 | 
			
		||||
        <el-form-item label="资质名称">
 | 
			
		||||
          {{ formData.name }}
 | 
			
		||||
        </el-form-item>
 | 
			
		||||
        <el-form-item label="资质类型">
 | 
			
		||||
          {{ formData.type }}
 | 
			
		||||
        </el-form-item>
 | 
			
		||||
        <el-form-item label="资质等级" v-if="formData.type!=='OTHER'">
 | 
			
		||||
          <span v-if="formData.grade===10">国家级</span>
 | 
			
		||||
          <span v-if="formData.grade===20">省级</span>
 | 
			
		||||
          <span v-if="formData.grade===30">市级</span>
 | 
			
		||||
        </el-form-item>
 | 
			
		||||
        <el-form-item label="二级等级" v-if="formData.type==='OTHER'">
 | 
			
		||||
          {{ formData.level }}
 | 
			
		||||
        </el-form-item>
 | 
			
		||||
        <el-form-item label="资质范围">
 | 
			
		||||
          {{formData.scope}}
 | 
			
		||||
        </el-form-item>
 | 
			
		||||
        <el-form-item label="描述">
 | 
			
		||||
          {{formData.description}}
 | 
			
		||||
        </el-form-item>
 | 
			
		||||
        <el-form-item label="备案城市" v-if="formData.type==='OTHER'">
 | 
			
		||||
          <span v-for="item in data.value2.citys_" :key="item.id">{{item.name}}</span>
 | 
			
		||||
        </el-form-item>
 | 
			
		||||
        <el-form-item label="所在省" v-if="formData.grade===20">
 | 
			
		||||
          {{ formData.province_name }}
 | 
			
		||||
        </el-form-item>
 | 
			
		||||
        <el-form-item label="所在市" v-if="formData.grade===30">
 | 
			
		||||
          {{ formData.city_name }}
 | 
			
		||||
        </el-form-item>
 | 
			
		||||
      </el-form>
 | 
			
		||||
      <el-divider></el-divider>
 | 
			
		||||
      <el-form
 | 
			
		||||
        label-width="100px"
 | 
			
		||||
        label-position="left"
 | 
			
		||||
      >
 | 
			
		||||
        <el-form-item label="资质名称">
 | 
			
		||||
          <span :class="setClass('name')"> {{ formData2.name }}</span>
 | 
			
		||||
        </el-form-item>
 | 
			
		||||
        <el-form-item label="资质类型">
 | 
			
		||||
          <span :class="setClass('type')"> {{ formData2.type }}</span>
 | 
			
		||||
        </el-form-item>
 | 
			
		||||
        <el-form-item label="资质等级" v-if="formData2.type!=='OTHER'">
 | 
			
		||||
          <span v-if="formData2.grade===10" :class="setClass('grade')">国家级</span>
 | 
			
		||||
          <span v-if="formData2.grade===20" :class="setClass('grade')">省级</span>
 | 
			
		||||
          <span v-if="formData2.grade===30" :class="setClass('grade')">市级</span>
 | 
			
		||||
        </el-form-item>
 | 
			
		||||
        <el-form-item label="二级等级" v-if="formData2.type==='OTHER'">
 | 
			
		||||
          <span :class="setClass('level')"> {{ formData2.level }}</span>
 | 
			
		||||
        </el-form-item>
 | 
			
		||||
        <el-form-item label="资质范围">
 | 
			
		||||
          <span :class="setClass('scope')"> {{ formData2.scope }}</span>
 | 
			
		||||
        </el-form-item>
 | 
			
		||||
        <el-form-item label="描述">
 | 
			
		||||
          <span :class="setClass('description')"> {{ formData2.description }}</span>
 | 
			
		||||
        </el-form-item>
 | 
			
		||||
        <el-form-item label="备案城市" v-if="formData2.type==='OTHER'">
 | 
			
		||||
          <span :class="setClass('citys')" v-for="item in data.value2.citys_" :key="item.id">{{item.name}}</span>
 | 
			
		||||
          <!--<span :class="setClass('citys')">  {{ formData2.province_name}}{{ formData2.city_name }}</span>-->
 | 
			
		||||
        </el-form-item>
 | 
			
		||||
        <el-form-item label="所在省" v-if="formData2.grade===20">
 | 
			
		||||
          <span :class="setClass('provice')"> {{ formData2.province_name}}</span>
 | 
			
		||||
        </el-form-item>
 | 
			
		||||
        <el-form-item label="所在市" v-if="formData.grade===30">
 | 
			
		||||
          <span :class="setClass('city')"> {{ formData2.city_name }}</span>
 | 
			
		||||
        </el-form-item>
 | 
			
		||||
 | 
			
		||||
      </el-form>
 | 
			
		||||
    </div>
 | 
			
		||||
    <el-divider></el-divider>
 | 
			
		||||
    <div style="text-align: right">
 | 
			
		||||
      <el-button
 | 
			
		||||
        v-if="this.showData.action == 'confirm'"
 | 
			
		||||
        v-if="action === 'confirm'"
 | 
			
		||||
        @click="confirm()"
 | 
			
		||||
        type="primary"
 | 
			
		||||
      >
 | 
			
		||||
| 
						 | 
				
			
			@ -50,31 +126,73 @@
 | 
			
		|||
 | 
			
		||||
<script>
 | 
			
		||||
  import {upUrl, upHeaders} from "@/api/file";
 | 
			
		||||
  import {qactionConfirm} from "@/api/ability";
 | 
			
		||||
  import {qactionConfirm,qactionItem,getQualityItem,provinceLists,cityLists} from "@/api/ability";
 | 
			
		||||
 | 
			
		||||
  export default {
 | 
			
		||||
    name: "quliShow",
 | 
			
		||||
    props: ["showData"],
 | 
			
		||||
    props:{
 | 
			
		||||
      showData:{
 | 
			
		||||
        type:Object,
 | 
			
		||||
        require:true	//属性必要性:true表示属性必须进行传递
 | 
			
		||||
      },
 | 
			
		||||
      fieldList2:{
 | 
			
		||||
        type:Array,
 | 
			
		||||
        default:[]
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
    data() {
 | 
			
		||||
      return {
 | 
			
		||||
        data: null,
 | 
			
		||||
        action: null,
 | 
			
		||||
        fileList: [],
 | 
			
		||||
        formData: null,
 | 
			
		||||
        formData2: null,
 | 
			
		||||
        updateDetail: [],
 | 
			
		||||
        fieldList: [],
 | 
			
		||||
      };
 | 
			
		||||
    },
 | 
			
		||||
    created() {
 | 
			
		||||
    mounted() {
 | 
			
		||||
      this.initRecord();
 | 
			
		||||
    },
 | 
			
		||||
    methods: {
 | 
			
		||||
      setClass(item){
 | 
			
		||||
        let obj = {};
 | 
			
		||||
        if(this.fieldList2.indexOf(item)>-1){
 | 
			
		||||
          obj =  'redFont';
 | 
			
		||||
        }
 | 
			
		||||
        return obj;
 | 
			
		||||
      },
 | 
			
		||||
      initRecord() {
 | 
			
		||||
        debugger;
 | 
			
		||||
        console.log(this.showData);
 | 
			
		||||
        this.data = Object.assign({}, this.showData.data);
 | 
			
		||||
        // debugger;
 | 
			
		||||
        //操作类型查看/确认
 | 
			
		||||
        let that = this;
 | 
			
		||||
        that.action = that.showData.action;
 | 
			
		||||
        let type = that.showData.type;
 | 
			
		||||
        qactionItem(that.showData.id).then(res=>{
 | 
			
		||||
          if (res.code>=200) {
 | 
			
		||||
            if(type==='quali:create'){
 | 
			
		||||
              that.data = res.data.value2;
 | 
			
		||||
            }else{
 | 
			
		||||
              that.formData =Object.assign({}, res.data.value1);
 | 
			
		||||
              that.formData2 = res.data.value1;
 | 
			
		||||
              let fieldList = [];
 | 
			
		||||
              let updateDetail = res.data.update_detail;//更改字段
 | 
			
		||||
              for( let key in that.formData2 ){
 | 
			
		||||
                fieldList.push(key);//所有字段
 | 
			
		||||
              }
 | 
			
		||||
              updateDetail.forEach(item=>{
 | 
			
		||||
                if(fieldList.indexOf(item.field)>-1){
 | 
			
		||||
                  that.formData2[item.field] = item.value2;
 | 
			
		||||
                }
 | 
			
		||||
              });
 | 
			
		||||
            }
 | 
			
		||||
          }
 | 
			
		||||
        })
 | 
			
		||||
      },
 | 
			
		||||
      confirm() {
 | 
			
		||||
        qactionConfirm(this.data.id).then(res => {
 | 
			
		||||
          if (res.code === 200) {
 | 
			
		||||
            this.drawer = false;
 | 
			
		||||
            this.$emit("handleDo", true);
 | 
			
		||||
          if (res.code>=200) {
 | 
			
		||||
            this.$emit("handleDo", false);
 | 
			
		||||
          }
 | 
			
		||||
        })
 | 
			
		||||
      },
 | 
			
		||||
| 
						 | 
				
			
			@ -97,4 +215,7 @@
 | 
			
		|||
    cursor: pointer;
 | 
			
		||||
    color: #409eff;
 | 
			
		||||
  }
 | 
			
		||||
  .redFont{
 | 
			
		||||
    color: red;
 | 
			
		||||
  }
 | 
			
		||||
</style>
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,9 +1,30 @@
 | 
			
		|||
<template>
 | 
			
		||||
  <div class="app-container">
 | 
			
		||||
    <el-card>
 | 
			
		||||
    <el-card class="filterTop">
 | 
			
		||||
      <el-button type="primary" icon="el-icon-plus" @click="handleAddVideo"
 | 
			
		||||
        >新增</el-button
 | 
			
		||||
      >
 | 
			
		||||
      <el-input
 | 
			
		||||
        v-model="listQuery.search"
 | 
			
		||||
        placeholder="关键字"
 | 
			
		||||
        style="width: 300px"
 | 
			
		||||
        class="filter-item"
 | 
			
		||||
        @keyup.enter.native="handleFilter"
 | 
			
		||||
      />
 | 
			
		||||
      <el-button
 | 
			
		||||
        class="filter-item"
 | 
			
		||||
        type="primary"
 | 
			
		||||
        icon="el-icon-search"
 | 
			
		||||
        @click="handleFilter"
 | 
			
		||||
      >搜索</el-button
 | 
			
		||||
      >
 | 
			
		||||
      <el-button
 | 
			
		||||
        class="filter-item"
 | 
			
		||||
        type="primary"
 | 
			
		||||
        icon="el-icon-refresh-left"
 | 
			
		||||
        @click="resetFilter"
 | 
			
		||||
      >重置</el-button
 | 
			
		||||
      >
 | 
			
		||||
    </el-card>
 | 
			
		||||
    <el-card style="margin-top: 10px">
 | 
			
		||||
      <el-table
 | 
			
		||||
| 
						 | 
				
			
			@ -20,7 +41,7 @@
 | 
			
		|||
        fit
 | 
			
		||||
        stripe
 | 
			
		||||
        highlight-current-row
 | 
			
		||||
        max-height="600"
 | 
			
		||||
        :height="tableHeight"
 | 
			
		||||
      >
 | 
			
		||||
        <el-table-column type="index" width="50" />
 | 
			
		||||
        <el-table-column label="名称" prop="name"></el-table-column>
 | 
			
		||||
| 
						 | 
				
			
			@ -36,13 +57,6 @@
 | 
			
		|||
          width="200px"
 | 
			
		||||
          fixed="right"
 | 
			
		||||
        >
 | 
			
		||||
          <template slot="header" slot-scope="scope">
 | 
			
		||||
            <el-input
 | 
			
		||||
              v-model="search"
 | 
			
		||||
              size="mini"
 | 
			
		||||
              placeholder="输入关键字搜索"
 | 
			
		||||
            />
 | 
			
		||||
          </template>
 | 
			
		||||
          <template slot-scope="scope">
 | 
			
		||||
            <el-button
 | 
			
		||||
              :disabled="!checkPermission(['video_update'])"
 | 
			
		||||
| 
						 | 
				
			
			@ -224,6 +238,7 @@ export default {
 | 
			
		|||
 | 
			
		||||
  data() {
 | 
			
		||||
    return {
 | 
			
		||||
      tableHeight:null,
 | 
			
		||||
      dialogVisible: false,
 | 
			
		||||
      signature: "",
 | 
			
		||||
      treeLoding: false,
 | 
			
		||||
| 
						 | 
				
			
			@ -235,6 +250,7 @@ export default {
 | 
			
		|||
      listQuery: {
 | 
			
		||||
        page: 1,
 | 
			
		||||
        page_size: 20,
 | 
			
		||||
        search:''
 | 
			
		||||
      },
 | 
			
		||||
      search: "",
 | 
			
		||||
      VideoContent: defaultVideo,
 | 
			
		||||
| 
						 | 
				
			
			@ -256,7 +272,9 @@ export default {
 | 
			
		|||
  },
 | 
			
		||||
  computed: {},
 | 
			
		||||
 | 
			
		||||
  created() {
 | 
			
		||||
  mounted() {
 | 
			
		||||
    let height1 = document.getElementsByClassName('app-main')[0].clientHeight;
 | 
			
		||||
    this.tableHeight = height1-120;
 | 
			
		||||
    this.getList();
 | 
			
		||||
    this.getTypeAll();
 | 
			
		||||
  },
 | 
			
		||||
| 
						 | 
				
			
			@ -287,7 +305,13 @@ export default {
 | 
			
		|||
      console.log(row)
 | 
			
		||||
      return row.category === value;
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    handleFilter(){
 | 
			
		||||
      this.getList();
 | 
			
		||||
    },
 | 
			
		||||
    resetFilter(){
 | 
			
		||||
      this.listQuery.search = '';
 | 
			
		||||
      this.getList();
 | 
			
		||||
    },
 | 
			
		||||
    /*弹出弹窗 */
 | 
			
		||||
    handleAddVideo() {
 | 
			
		||||
      this.VideoContent = Object.assign({}, defaultVideo);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue