|  | @@ -17,6 +17,9 @@
 | 
	
		
			
				|  |  |                  <el-form-item>
 | 
	
		
			
				|  |  |                      <el-button type="primary" @click="getMoulds(filters.name)">{{$t('base.query')}}</el-button>
 | 
	
		
			
				|  |  |                  </el-form-item>
 | 
	
		
			
				|  |  | +                <el-form-item style="float:right;" v-if="user.subordinateType == 0 && user.parentId == 1">
 | 
	
		
			
				|  |  | +					<el-button type="primary" @click="showChangeIp()">{{$t('runTest.changeIp')}}</el-button>
 | 
	
		
			
				|  |  | +				</el-form-item>
 | 
	
		
			
				|  |  |              </el-form>
 | 
	
		
			
				|  |  |          </el-col>
 | 
	
		
			
				|  |  |  
 | 
	
	
		
			
				|  | @@ -77,7 +80,7 @@
 | 
	
		
			
				|  |  |                      <span v-else>{{$t('runTest.isMaintain1')}}</span>
 | 
	
		
			
				|  |  |                  </template>
 | 
	
		
			
				|  |  |              </el-table-column>
 | 
	
		
			
				|  |  | -            <el-table-column :label="$t('runTest.process')" align="center" width="85">
 | 
	
		
			
				|  |  | +            <el-table-column :label="$t('runTest.process')" align="center" width="200">
 | 
	
		
			
				|  |  |                  <template slot-scope="scope">
 | 
	
		
			
				|  |  |                      <el-button size="small" type="primary" @click="toMaintenance(scope.row.id)">{{$t('base.detail')}}</el-button>
 | 
	
		
			
				|  |  |                  </template>
 | 
	
	
		
			
				|  | @@ -105,6 +108,7 @@
 | 
	
		
			
				|  |  |      export default {
 | 
	
		
			
				|  |  |          data() {
 | 
	
		
			
				|  |  |              return {
 | 
	
		
			
				|  |  | +                user: JSON.parse(sessionStorage.getItem('user')),
 | 
	
		
			
				|  |  |                  moulds: [],
 | 
	
		
			
				|  |  |                  filters: {
 | 
	
		
			
				|  |  |                      name: "",
 | 
	
	
		
			
				|  | @@ -175,6 +179,44 @@
 | 
	
		
			
				|  |  |                          type: "error"
 | 
	
		
			
				|  |  |                      });
 | 
	
		
			
				|  |  |                  });
 | 
	
		
			
				|  |  | +            },
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +            //改变ip
 | 
	
		
			
				|  |  | +            showChangeIp() {
 | 
	
		
			
				|  |  | +                this.$prompt('', this.$t('runTest.changeIp'), {
 | 
	
		
			
				|  |  | +                    confirmButtonText: this.$t('el.datepicker.confirm'),
 | 
	
		
			
				|  |  | +                    cancelButtonText: this.$t('el.datepicker.cancel'),
 | 
	
		
			
				|  |  | +                    inputPattern: /^((2[0-4]\d|25[0-5]|[01]?\d\d?)\.){3}(2[0-4]\d|25[0-5]|[01]?\d\d?):([0-9]|[1-9]\d{1,3}|[1-5]\d{4}|6[0-4]\d{4}|65[0-4]\d{2}|655[0-2]\d|6553[0-5])$/,
 | 
	
		
			
				|  |  | +                    inputErrorMessage: this.$t('runTest.IPWrong')
 | 
	
		
			
				|  |  | +                }).then(({ value }) => {
 | 
	
		
			
				|  |  | +                    var ip = value.split(':')[0] , port = value.split(':')[1];
 | 
	
		
			
				|  |  | +                    this.http.post( this.port.mold.changeIp , {
 | 
	
		
			
				|  |  | +                        "ip": ip,
 | 
	
		
			
				|  |  | +                        "port": port,
 | 
	
		
			
				|  |  | +                    },
 | 
	
		
			
				|  |  | +                    res => {
 | 
	
		
			
				|  |  | +                        if (res.code == "ok") {
 | 
	
		
			
				|  |  | +                            this.$message({
 | 
	
		
			
				|  |  | +                                type: 'success',
 | 
	
		
			
				|  |  | +                                message: this.$t('prompt.success')
 | 
	
		
			
				|  |  | +                            });
 | 
	
		
			
				|  |  | +                        } else {
 | 
	
		
			
				|  |  | +                            this.$message({
 | 
	
		
			
				|  |  | +                                message: res.msg,
 | 
	
		
			
				|  |  | +                                type: "error"
 | 
	
		
			
				|  |  | +                            });
 | 
	
		
			
				|  |  | +                        }
 | 
	
		
			
				|  |  | +                    },
 | 
	
		
			
				|  |  | +                    error => {
 | 
	
		
			
				|  |  | +                        this.listLoading = false;
 | 
	
		
			
				|  |  | +                        this.$message({
 | 
	
		
			
				|  |  | +                            message: error,
 | 
	
		
			
				|  |  | +                            type: "error"
 | 
	
		
			
				|  |  | +                        });
 | 
	
		
			
				|  |  | +                    });
 | 
	
		
			
				|  |  | +                }).catch(() => {
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +                });
 | 
	
		
			
				|  |  |              }
 | 
	
		
			
				|  |  |          },
 | 
	
		
			
				|  |  |  
 |