chenmy 1 year ago
parent
commit
6bb51d0077

+ 4 - 0
TEAMModelBI/ClientApp/src/api/index.js

@@ -85,6 +85,10 @@ export default {
     getSchoolcode(data) {
         return post('/batchschool/get-schoolcode', data)
     },
+    //修改学区简码 or 苏格拉底频道简码
+    updateAreacode(data){
+        return post('/batcharea/upd-area',data)
+    },
 
 
     //区域管理和微能力点管理

+ 9 - 3
TEAMModelBI/ClientApp/src/view/areaServe/areamanage.vue

@@ -102,11 +102,11 @@
             <div>
               <p  class="codeboxs" v-if="scope.$index !==curTarget.index  && scope.row.shortCode">
                {{scope.row.shortCode}}
-              <el-icon  class="el-icon-edit-outline" @click="curTarget.index=scope.$index,curTarget.text=scope.row.shortCode"><Edit /></el-icon>
+              <el-icon  class="el-icon-edit-outline" @click="curTarget.index=scope.$index,curTarget.text=scope.row.shortCode,curTarget.name=scope.row.name,curTarget.id=scope.row.id"><Edit /></el-icon>
               </p>
               <p  class="codeboxs" v-else-if="scope.$index !==curTarget.index  && !scope.row.shortCode">
               暂无简码
-              <el-icon  class="el-icon-edit-outline" @click="curTarget.index=scope.$index,curTarget.text=scope.row.shortCode"><Edit /></el-icon>
+              <el-icon  class="el-icon-edit-outline" @click="curTarget.index=scope.$index,curTarget.text=scope.row.shortCode,curTarget.name=scope.row.name,curTarget.id=scope.row.id"><Edit /></el-icon>
               </p>
             <el-input
               type="textarea"
@@ -717,6 +717,8 @@ export default {
     let curTarget=ref({
        index:-1,
        text:'',
+       name:'',
+       id:'',
     })
     let { proxy } = getCurrentInstance()
     let PowerShow = proxy.$access.identifyPosition(JSON.parse(localStorage.getItem('id_token')))
@@ -868,7 +870,11 @@ export default {
         ElMessage.error('简码需6位字母或数字,请重新填写')
         optionData.value[dataIndex].shortCode=curTarget.value.text
       }else{
-        ElMessage.success('go API')
+        let data={id:curTarget.value.id,name:curTarget.value.name,shortCode:shortCodes}
+        proxy.$api.updateAreacode(data).then((res)=>{
+          console.log(res,'updateCode back')
+          res.state === 200 ? ElMessage.success('更新成功'):ElMessage.error('操作成功')
+        })
         curTarget.value.index=-1
       }
     }