智能标注服务管理页面和智能标注页面开发
This commit is contained in:
		
							parent
							
								
									476d11f23b
								
							
						
					
					
						commit
						7cca20599b
					
				| 
						 | 
				
			
			@ -8,7 +8,13 @@ export function list(query) {
 | 
			
		|||
    params: query
 | 
			
		||||
  })
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
export function listWithNoPage(query) {
 | 
			
		||||
  return request({
 | 
			
		||||
    url: '/ai/intelligentAnnotation/service/listWithNoPage',
 | 
			
		||||
    method: 'get',
 | 
			
		||||
    params: query
 | 
			
		||||
  })
 | 
			
		||||
}
 | 
			
		||||
// 查询【请填写功能名称】详细
 | 
			
		||||
export function getService(id) {
 | 
			
		||||
  return request({
 | 
			
		||||
| 
						 | 
				
			
			@ -42,5 +48,13 @@ export function delService(id) {
 | 
			
		|||
  })
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
export function autoAnnotate(data) {
 | 
			
		||||
  return request({
 | 
			
		||||
    url: '/ai/intelligentAnnotation/annotate',
 | 
			
		||||
    method: 'post',
 | 
			
		||||
    data:data
 | 
			
		||||
  })
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -104,8 +104,6 @@
 | 
			
		|||
            v-hasPermi="['dataCenter:sample:edit']"
 | 
			
		||||
          >发布
 | 
			
		||||
          </el-button>
 | 
			
		||||
          <ai-label-dialog ref="aiLabelDialog"/>
 | 
			
		||||
 | 
			
		||||
        </template>
 | 
			
		||||
      </el-table-column>
 | 
			
		||||
    </el-table>
 | 
			
		||||
| 
						 | 
				
			
			@ -123,6 +121,7 @@
 | 
			
		|||
    <release-version-dialog :get-list="getList" :dataset-id="datasetId" :open="releaseOpen" :task-id="taskId"
 | 
			
		||||
                            :last-version-name="lastVersionName" @dialog-cancel="handleCancel"
 | 
			
		||||
    ></release-version-dialog>
 | 
			
		||||
 | 
			
		||||
    <ai-label-dialog :open="aiOpen" :get-list="getList" :task-id="taskId" @dialog-cancel="handleCancel"/>
 | 
			
		||||
 | 
			
		||||
  </div>
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -25,12 +25,9 @@
 | 
			
		|||
 | 
			
		||||
      <div class="form-section">
 | 
			
		||||
        <h3>请选择智能标注服务节点</h3>
 | 
			
		||||
        <el-select v-model="form.computeNode" placeholder="请选择智能标注服务节点" class="full-width">
 | 
			
		||||
          <el-option
 | 
			
		||||
            v-for="item in computeNodes"
 | 
			
		||||
            :key="item.value"
 | 
			
		||||
            :label="item.label"
 | 
			
		||||
            :value="item.value"
 | 
			
		||||
        <el-select v-model="form.serviceId" placeholder="请选择服务" clearable style="width: 100%" @change="change">
 | 
			
		||||
          <el-option v-for="dict in this.serviceList" :key="dict.serviceId" :label="dict.serviceName"
 | 
			
		||||
                     :value="dict.serviceId"
 | 
			
		||||
          />
 | 
			
		||||
        </el-select>
 | 
			
		||||
      </div>
 | 
			
		||||
| 
						 | 
				
			
			@ -44,14 +41,6 @@
 | 
			
		|||
        启动自动标注时,需数据中存在至少2个种标签,且每种标签的图片不少于5张。
 | 
			
		||||
      </el-alert>
 | 
			
		||||
    </div>
 | 
			
		||||
    <!--      <div v-if="showWarning" class="warning-message">-->
 | 
			
		||||
    <!--        <i class="warning-icon">⚠</i>-->
 | 
			
		||||
    <!--        <span>启动自动标注时,需数据中存在至少2个种标签,且每种标签的图片不少于5张。</span>-->
 | 
			
		||||
    <!--      </div>-->
 | 
			
		||||
 | 
			
		||||
    <!--      <div class="form-actions">-->
 | 
			
		||||
    <!--        <button class="submit-button" @click="handleSubmit">提交</button>-->
 | 
			
		||||
    <!--      </div>-->
 | 
			
		||||
    <span slot="footer" class="dialog-footer">
 | 
			
		||||
      <el-button @click="cancel">取 消</el-button>
 | 
			
		||||
      <el-button type="primary" @click="handleSubmit" :loading="loading">确 定</el-button>
 | 
			
		||||
| 
						 | 
				
			
			@ -60,6 +49,9 @@
 | 
			
		|||
</template>
 | 
			
		||||
 | 
			
		||||
<script>
 | 
			
		||||
import {list, listWithNoPage} from '../../../../api/dataCenter/ailabelservice'
 | 
			
		||||
import { autoAnnotate } from '../../../../api/dataCenter/ailabelservice';
 | 
			
		||||
 | 
			
		||||
export default {
 | 
			
		||||
  props: {
 | 
			
		||||
    open: {
 | 
			
		||||
| 
						 | 
				
			
			@ -95,25 +87,39 @@ export default {
 | 
			
		|||
      form: {
 | 
			
		||||
        learningType: 'active',
 | 
			
		||||
        algorithmType: 'fast',
 | 
			
		||||
        computeNode: ''
 | 
			
		||||
        serviceList: ''
 | 
			
		||||
      },
 | 
			
		||||
      computeNodes: [
 | 
			
		||||
        { label: '计算节点1', value: 'node1' },
 | 
			
		||||
        { label: '计算节点2', value: 'node2' }
 | 
			
		||||
      ],
 | 
			
		||||
      serviceList:[],
 | 
			
		||||
      showWarning: true,
 | 
			
		||||
      currentRow: null
 | 
			
		||||
    }
 | 
			
		||||
  },
 | 
			
		||||
  watch: {
 | 
			
		||||
    isOpen(newVal) {
 | 
			
		||||
      if (newVal) {
 | 
			
		||||
        this.getServiceList()
 | 
			
		||||
      }
 | 
			
		||||
    }
 | 
			
		||||
  },
 | 
			
		||||
  methods: {
 | 
			
		||||
    getServiceList() {
 | 
			
		||||
      listWithNoPage().then(response => {
 | 
			
		||||
        console.log("response" + response.data)
 | 
			
		||||
        this.serviceList = response.data
 | 
			
		||||
      })
 | 
			
		||||
    },
 | 
			
		||||
    async handleSubmit() {
 | 
			
		||||
      try {
 | 
			
		||||
        this.loading = true
 | 
			
		||||
        // 这里调用 vuex action 处理提交逻辑
 | 
			
		||||
        await this.$store.dispatch('annotation/submitAnnotation', {
 | 
			
		||||
          ...this.form,
 | 
			
		||||
          row: this.currentRow
 | 
			
		||||
        autoAnnotate(this.taskId).then(response => {
 | 
			
		||||
          console.log("response" + response.data)
 | 
			
		||||
          this.serviceList = response.data
 | 
			
		||||
        })
 | 
			
		||||
        // 这里调用 vuex action 处理提交逻辑
 | 
			
		||||
        // await this.$store.dispatch('annotation/submitAnnotation', {
 | 
			
		||||
        //   ...this.form,
 | 
			
		||||
        //   row: this.currentRow
 | 
			
		||||
        // })
 | 
			
		||||
        this.$message.success('提交成功')
 | 
			
		||||
        this.cancel()
 | 
			
		||||
      } catch (error) {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue