<template>

  <div>
    <el-card class="box-card noborder">
      <div class="cardtitles">基本信息</div>
      <div class="baseinfo">
        <div class="row">
          <div class="con">
            <span>总投资额（万元） ：</span>
            <div class="inputxt">
              <div class="flex" v-if="nowedit == 1">
                <el-input placeholder="待添加"></el-input>
                <div class="flex">
                  <div class="btnsmall btn_primary h28" style="width: 56px">确定</div>
                  <div class="cancels h28" @click="nowedit = -1" style="">取消</div>
                </div>
              </div>
              <span class="txt" v-else @click="nowedit = 1">待添加</span>
            </div>
          </div>
          <div class="con i">
            <span>资金来源 ：</span>
            <div class="inputxt">
              <div class="flex" v-if="nowedit == 2">
                <el-input placeholder="待添加"></el-input>
                <div class="flex">
                  <div class="btnsmall btn_primary h28" style="width: 56px">确定</div>
                  <div class="cancels h28" @click="nowedit = -1" style="">取消</div>
                </div>
              </div>
              <span class="txt" v-else @click="nowedit = 2">待添加</span>
            </div>
          </div>
        </div>
        <div class="row">
          <div class="con">
            <span>建设性质 ：</span>
            <div class="inputxt">
              <div class="flex" v-if="nowedit == 3">
                <el-input placeholder="待添加"></el-input>
                <div class="flex">
                  <div class="btnsmall btn_primary h28" style="width: 56px">确定</div>
                  <div class="cancels h28" @click="nowedit = -1" style="">取消</div>
                </div>
              </div>
              <span class="txt" v-else @click="nowedit = 3">待添加</span>
            </div>
          </div>
          <div class="con i">
            <span>计划招标 ：</span>
            <div class="inputxt">
              <span class="txt">待添加</span>
            </div>
          </div>
        </div>
      </div>
    </el-card>
    <el-card class="box-card noborder">
      <div class="cardtitles">项目概况与建设规模</div>
      <div class="baseinfo">
        <el-input  v-model="textarea" class="textarea" type="textarea" placeholder="请输入项目概况与建设规模详细信息"  maxlength="500" show-word-limit="true" ></el-input>
      </div>
    </el-card>
    <el-card class="box-card noborder">
      <div class="cardtitles">招标信息</div>
      <div class="baseinfo" style="padding-bottom: 8px">
        <div class="row">
          <div class="con">
            <span>评标办法 ：</span>
            <div class="inputxt">
              <div class="flex" v-if="nowedit == 4">
                <el-input placeholder="待添加"></el-input>
                <div class="flex">
                  <div class="btnsmall btn_primary h28" style="width: 56px">确定</div>
                  <div class="cancels h28" @click="nowedit = -1" style="">取消</div>
                </div>
              </div>
              <span class="txt" v-else @click="nowedit = 4">待添加</span>
            </div>
          </div>
          <div class="con i">
            <span>开标时间 ：</span>
            <div class="inputxt">
              <span class="txt">待添加</span>
            </div>
          </div>
        </div>
        <div class="row">
          <div class="con">
            <span>保证金缴纳 ：</span>
            <div class="inputxt">
              <div class="flex" v-if="nowedit == 5">
                <el-input placeholder="待添加"></el-input>
                <div class="flex">
                  <div class="btnsmall btn_primary h28" style="width: 56px">确定</div>
                  <div class="cancels h28" @click="nowedit = -1" style="">取消</div>
                </div>
              </div>
              <span class="txt" v-else @click="nowedit = 5">待添加</span>
            </div>
          </div>
          <div class="con i">
            <span>保证金金额（万元） ：</span>
            <div class="inputxt">
              <div class="flex" v-if="nowedit == 6">
                <el-input placeholder="待添加"></el-input>
                <div class="flex">
                  <div class="btnsmall btn_primary h28" style="width: 56px">确定</div>
                  <div class="cancels h28" @click="nowedit = -1" style="">取消</div>
                </div>
              </div>
              <span class="txt" v-else @click="nowedit = 6">待添加</span>
            </div>
          </div>
        </div>
        <div class="row">
        <div class="con">
          <span>开标地点 ：</span>
          <div class="inputxt">
            <div class="flex" v-if="nowedit == 7">
              <el-input placeholder="待添加"></el-input>
              <div class="flex">
                <div class="btnsmall btn_primary h28" style="width: 56px">确定</div>
                <div class="cancels h28" @click="nowedit = -1" style="">取消</div>
              </div>
            </div>
            <span class="txt" v-else @click="nowedit = 7">待添加</span>
          </div>
        </div>
        <div class="con i">
          <span>评标委员会 ：</span>
          <div class="inputxt">
            <div class="flex" v-if="nowedit == 8">
              <el-input placeholder="待添加"></el-input>
              <div class="flex">
                <div class="btnsmall btn_primary h28" style="width: 56px">确定</div>
                <div class="cancels h28" @click="nowedit = -1" style="">取消</div>
              </div>
            </div>
            <span class="txt" v-else @click="nowedit = 8">待添加</span>
          </div>
        </div>
      </div>
      </div>
    </el-card>
  </div>
</template>

<script>
  import "@/assets/styles/project.scss"
  export default {
    name: 'xmgl',
    data(){
      return{
        textarea:"",
        nowedit:-1,//当前正在编辑的文本
        tipslit:[],//项目标签
        tipsvalue:"",//标签填写内容
      }
    },
    methods:{
      //验证电话号码
      isphone(value){
        var regPartton = /1[3-8]+\d{9}/;
        var regPartton1 = /^(0[0-9]{2,3}[\-]?[2-9][0-9]{6,7}[\-]?[0-9]?)$/;
        if (!regPartton.test(value) && !regPartton1.test(value)) {
          this.$message.error("请输入正确的电话");
        } else {

        }
      },
      //标签添加、删除
      addtips(){
        if(this.tipsvalue == "")
          return false
        if(this.tipslit.length>=30){
          this.$message.error("最多能只能添加30个标签")
          return false
        }
        this.tipslit.push(this.tipsvalue)
        this.tipsvalue = ""
      },
      deltip(index){
        this.tipslit.splice(index,1)
      },
    }
  }
</script>

<style scoped>

</style>
