|
@@ -61,6 +61,15 @@
|
|
|
.pass.default {
|
|
|
background-color: #adadad !important;
|
|
|
}
|
|
|
+ .el-table td, .el-table th {
|
|
|
+ padding: 4px 0;
|
|
|
+ }
|
|
|
+ .top-button-group {
|
|
|
+ margin-top: 20px;
|
|
|
+ }
|
|
|
+ .top-button-group button {
|
|
|
+ margin-bottom: 12px;
|
|
|
+ }
|
|
|
</style>
|
|
|
<script>
|
|
|
function prettyPrint(obj) {
|
|
@@ -115,31 +124,48 @@
|
|
|
<div class="content" :class="{mm:showPop}">
|
|
|
<!--文章区-->
|
|
|
<div class="article" >
|
|
|
- <h4>
|
|
|
- 已验/总数:{{.T.checkednum}}/{{.T.allnum}}
|
|
|
- </h4>
|
|
|
+ <div class="top-button-group">
|
|
|
+ <el-button-group>
|
|
|
+ <el-button type="primary" plain size="mini" @click="activeLabel = '原文'">原文</el-button>
|
|
|
+ {{if .T.info.filetext}}
|
|
|
+ <el-button type="primary" plain size="mini" @click="activeLabel = '附件'">附件</el-button>
|
|
|
+ {{end}}
|
|
|
+ </el-button-group>
|
|
|
+ <el-button-group v-for="(item, index) in otherInfo">
|
|
|
+ <el-button type="success" plain size="mini" @click="activeLabel = item.subtype">[[item.subtype]]</el-button>
|
|
|
+ <el-button type="success" plain size="mini" v-if="item.filetext" @click="activeLabel = item.subtype + '-附件'">附件</el-button>
|
|
|
+ </el-button-group>
|
|
|
+ <el-button-group v-if="moreInfo&&moreInfo.length > 0">
|
|
|
+ <el-popover
|
|
|
+ placement="right-end"
|
|
|
+ trigger="hover">
|
|
|
+ <el-table :data="moreInfo" max-height="300">
|
|
|
+ <el-table-column width="50" property="subtype" label="类型"></el-table-column>
|
|
|
+ <el-table-column width="180" property="publishtime" label="发布日期"></el-table-column>
|
|
|
+ <el-table-column width="220" property="title" label="标题">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <a href="#" @click="openLink(scope.row.href)">[[scope.row.title]]</a>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ <el-button slot="reference" style="border-color: #d3d4d6;" size="mini" type="info" plain>更多</el-button>
|
|
|
+ </el-popover>
|
|
|
+ </el-button-group>
|
|
|
+ </div>
|
|
|
+
|
|
|
<hr style="border:1 double;" width="100%">
|
|
|
- <br><a href="{{.T.info.href}}" target="_blank">查看原文</a>
|
|
|
- <a href="{{.T.jyhref}}" target="_blank">剑鱼链接</a>
|
|
|
- <h3>{{.T.info.title}}</h3><br>
|
|
|
+ <br><a v-if="getPageInfo.href.length > 0" :href="getPageInfo.href" target="_blank">查看原文</a>
|
|
|
+ <!--<a href="{{.T.jyhref}}" target="_blank">剑鱼链接</a>-->
|
|
|
+ <h3>[[getPageInfo.title]]</h3><br>
|
|
|
|
|
|
- {{if .T.info.detail}}
|
|
|
- <div v-html="dataHtml"></div>
|
|
|
- {{end}}
|
|
|
-
|
|
|
- {{if .T.info.filetext}}
|
|
|
- <br><h3>附件内容</h3>
|
|
|
-<!-- <div>{{.T.info.filetext}}</div>-->
|
|
|
- <div v-html="fileHtml"></div>
|
|
|
- {{end}}
|
|
|
+ <div v-html="pageHtml"></div>
|
|
|
</div>
|
|
|
<!--操作区-->
|
|
|
-
|
|
|
<div class="operation">
|
|
|
<!--edit-box-->
|
|
|
<div class="edit-box">
|
|
|
<!--edit-->
|
|
|
- <div class="edit one" v-for="(one,index) in editData" :key="index">
|
|
|
+ <div class="edit one" v-for="(one,oindex) in editData" :key="oindex">
|
|
|
<!--one-->
|
|
|
<div class="edit-title" @click="one.show = !one.show">
|
|
|
<span>[[one.title]]</span>
|
|
@@ -161,17 +187,7 @@
|
|
|
<!--<div :class="{ok: one.status == '1'}" @click="one.status = '1'"></div>-->
|
|
|
<div :class="{ok: one.status == '1'}" @click="setStatus(one,'1')"></div>
|
|
|
<!--<div :class="{err: one.status == '0'}" @click="one.status = '0'"></div>-->
|
|
|
- <el-popover trigger="click" >
|
|
|
- <div style="text-align: right; margin: 0">
|
|
|
- <el-button type="success" size="mini" @click="setStatus(one,'2')">新增</el-button>
|
|
|
- <el-button type="warning" size="mini" @click="setStatus(one,'3')">修改</el-button>
|
|
|
- <el-button type="danger" size="mini" @click="setStatus(one,'4')">删除</el-button>
|
|
|
- <!-- <el-button type="success" size="mini" @click="one.status = '2'">新增</el-button>
|
|
|
- <el-button type="warning" size="mini" @click="one.status = '3'">修改</el-button>
|
|
|
- <el-button type="danger" size="mini" @click="one.status = '4'">删除</el-button>-->
|
|
|
- </div>
|
|
|
- <div class="add-tip" slot="reference" :class="{err: (one.status != '1' && one.status != '-1')}">[[textMap[one.status] || '']]</div>
|
|
|
- </el-popover>
|
|
|
+ <div class="add-tip" :class="{err: (one.status != '1' && one.status != '-1')}" @click="setStatus(one,'2')"></div>
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
@@ -179,7 +195,7 @@
|
|
|
<transition tag="div">
|
|
|
<div>
|
|
|
<div class="button-box" v-if="one.showCheck&&one.show">
|
|
|
- <button class="pass a-button" @click.stop="addChild(one)" style="font-size: 14px;width: auto;float:left;">新增[[one.title]]</button>
|
|
|
+ <button class="pass a-button" @click.stop="addChild(one, oindex)" style="font-size: 14px;width: auto;float:left;">新增[[one.title]]</button>
|
|
|
</div>
|
|
|
<div class="edit-content" :class="{t:one.title == '基本字段'}" v-show="one.show">
|
|
|
<!--two-->
|
|
@@ -188,7 +204,8 @@
|
|
|
<div class="edit two" v-for="(two,index) in one.content" :key="index">
|
|
|
<div class="edit-title" v-if="two.title" @click="two.show = !two.show">
|
|
|
<span>[[two.title]]</span>
|
|
|
- <div class="button-box">
|
|
|
+ <div class="button-box" :style="one.title == '多包信息' ? 'margin-right: 193px' : ''">
|
|
|
+ <button v-if="one.title == '多包信息'" class="pass a-button" @click.stop="addThreeChild(two,'2',one)" style="font-size: 14px;margin: 0;width: auto;float:left;">新增中标信息</button>
|
|
|
<button class="pass success" @click.stop="saveDataTwo(two,'1',one)" style="font-size: 14px;width: auto;float:left;">通过</button>
|
|
|
<button class="pass default" @click.stop="saveDataTwo(two,'-1',one)" style="font-size: 14px;width: auto;float:left">取消</button>
|
|
|
</div>
|
|
@@ -200,10 +217,10 @@
|
|
|
<div class="edit-content" v-show="two.show">
|
|
|
<!--input-->
|
|
|
<div class="edit-input">
|
|
|
- <div v-for="uin of two.uInput" class="input-box" :key="uin.title">
|
|
|
+ <div v-for="(uin, uindex) of two.uInput" class="input-box" :key="uin.title">
|
|
|
<div class="label" v-if="uin.selectArr">
|
|
|
<span>[[uin.title]] : </span>
|
|
|
- <select v-model="uin.select" @change="selectchange(uin,'3', two, one)">
|
|
|
+ <select v-model="uin.select" @change="focusFn(uin, oindex,index,uindex, two, one)">
|
|
|
<option disabled value="">请选择</option>
|
|
|
<option v-for="o in uin.selectArr">[[o]]</option>
|
|
|
</select>
|
|
@@ -211,31 +228,19 @@
|
|
|
<div :class="{default: uin.status == '-1'}" @click="setStatus(uin,'-1', two, one)"></div>
|
|
|
<div :class="{ok: uin.status == '1'}" @click="setStatus(uin,'1', two, one)"></div>
|
|
|
<!--<div :class="{err: uin.status == '0'}" @click="uin.status = '0'"></div>-->
|
|
|
- <el-popover trigger="click" >
|
|
|
- <div style="text-align: right; margin: 0">
|
|
|
- <el-button type="success" size="mini" @click="setStatus(uin,'2', two, one)">新增</el-button>
|
|
|
- <el-button type="warning" size="mini" @click="setStatus(uin,'3', two, one)">修改</el-button>
|
|
|
- <el-button type="danger" size="mini" @click="setStatus(uin,'4', two, one)">删除</el-button>
|
|
|
- </div>
|
|
|
- <div class="add-tip" slot="reference" :class="{err: (uin.status != '1' && uin.status != '-1')}">[[textMap[uin.status] || '']]</div>
|
|
|
- </el-popover>
|
|
|
+ <div class="add-tip" @click="setStatus(uin,'2', two, one)" :class="{err: (uin.status != '1' && uin.status != '-1')}"></div>
|
|
|
+
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="label" v-else :title="uin.input">
|
|
|
<span @click="goText(uin.title)">[[uin.title]] : </span>
|
|
|
- <input type="text" v-model="uin.input" @click="goText(uin.input)">
|
|
|
+ <input type="text" v-model="uin.input" @click="goText(uin.input)" @blur="focusFn(uin, oindex, index, uindex,two,one)">
|
|
|
<div class="info-box">
|
|
|
<div :class="{default: uin.status == '-1'}" @click="setStatus(uin,'-1', two, one)"></div>
|
|
|
<div :class="{ok: uin.status == '1'}" @click="setStatus(uin,'1', two, one)"></div>
|
|
|
<!--<div :class="{err: uin.status == '0'}" @click="uin.status = '0'"></div>-->
|
|
|
- <el-popover trigger="click" >
|
|
|
- <div style="text-align: right; margin: 0">
|
|
|
- <el-button type="success" size="mini" @click="setStatus(uin,'2', two, one)">新增</el-button>
|
|
|
- <el-button type="warning" size="mini" @click="setStatus(uin,'3', two, one)">修改</el-button>
|
|
|
- <el-button type="danger" size="mini" @click="setStatus(uin,'4', two, one)">删除</el-button>
|
|
|
- </div>
|
|
|
- <div class="add-tip" slot="reference" :class="{err: (uin.status != '1' && uin.status != '-1')}">[[textMap[uin.status] || '']]</div>
|
|
|
- </el-popover>
|
|
|
+ <div class="add-tip" @click="setStatus(uin,'2', two, one)" :class="{err: (uin.status != '1' && uin.status != '-1')}"></div>
|
|
|
+
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -295,7 +300,7 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="save-box">
|
|
|
-<!-- <button class="code" @click.stop="showPop = true" style="width:100px">源码</button> -->
|
|
|
+ <button class="code" @click.stop="showPop = true" style="width:100px">源码</button>
|
|
|
<button class="code" @click.stop="open(1)" style="width:100px">全部验证</button>
|
|
|
<button class="code" @click.stop="open(2)" style="width:100px">字段验证</button>
|
|
|
<!-- <button class="code" @click.stop="open('', false)" style="width:100px">保存</button> -->
|
|
@@ -324,6 +329,121 @@
|
|
|
|
|
|
</body>
|
|
|
<script>
|
|
|
+ // 页面数据
|
|
|
+ var pageDataMap = {
|
|
|
+ '原文': {
|
|
|
+ title: '{{.T.info.title}}',
|
|
|
+ href: '{{.T.info.href}}',
|
|
|
+ html: `{{Html (Regexp (Regexp .T.info.detail "(\\n|\\\\n)\\s+" "\n") "(`|\\n|\\\\n)+" "<br/>")}}`,
|
|
|
+ },
|
|
|
+ '附件': {
|
|
|
+ title: '附件内容',
|
|
|
+ href: '',
|
|
|
+ html: {{if .T.info.filetext}}{{.T.info.filetext}}.replace(/(\\n|\\\\n)\\s+/, '\n').replace(/(`|\\n|\\\\n)+/, '<br>'){{else}}``{{end}},
|
|
|
+ }
|
|
|
+ }
|
|
|
+ // 更多关联信息
|
|
|
+ var moreInfo = {{.T.moreInfo}}
|
|
|
+ console.log(moreInfo)
|
|
|
+ //公告关联信息
|
|
|
+ var otherInfo = {{.T.otherInfo}};
|
|
|
+ console.log(otherInfo)
|
|
|
+ //快捷键
|
|
|
+ $(document).keydown(function(event){
|
|
|
+ if(!event.shiftKey) {
|
|
|
+ var text = getSelectedContents();//获取选中文本
|
|
|
+ if (!text.trim().length) {
|
|
|
+ return
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if(event.keyCode == 82){//项目名称快捷键r
|
|
|
+ if(event.shiftKey){
|
|
|
+ app.changeBaseValue(0, '', 2) //删除对应文本
|
|
|
+ }else{
|
|
|
+ app.changeBaseValue(0, text, 2)//填充
|
|
|
+ }
|
|
|
+ }else if(event.keyCode == 81){//省份快捷键q
|
|
|
+ if(event.shiftKey){
|
|
|
+ app.changeBaseValue(1, '', 2) //删除对应文本
|
|
|
+ }else{
|
|
|
+ app.changeBaseValue(1, text, 2)//填充
|
|
|
+ }
|
|
|
+ }else if(event.keyCode == 84){//项目编号快捷键t
|
|
|
+ if(event.shiftKey){
|
|
|
+ app.changeBaseValue(2, '', 2) //删除对应文本
|
|
|
+ }else{
|
|
|
+ app.changeBaseValue(2, text, 2)//填充
|
|
|
+ }
|
|
|
+ }else if(event.keyCode == 87){//城市快捷键w
|
|
|
+ if(event.shiftKey){
|
|
|
+ app.changeBaseValue(3, '', 2) //删除对应文本
|
|
|
+ }else{
|
|
|
+ app.changeBaseValue(3, text, 2)//填充
|
|
|
+ }
|
|
|
+ }else if(event.keyCode == 69){//区县快捷键e
|
|
|
+ if(event.shiftKey){
|
|
|
+ app.changeBaseValue(5, '', 2) //删除对应文本
|
|
|
+ }else{
|
|
|
+ app.changeBaseValue(5, text, 2)//填充
|
|
|
+ }
|
|
|
+ }else if(event.keyCode == 90){//预算快捷键z
|
|
|
+ if(event.shiftKey){
|
|
|
+ app.changeBaseValue(6, '', 2) //删除对应文本
|
|
|
+ }else{
|
|
|
+ app.changeBaseValue(6, text, 2)//填充
|
|
|
+ }
|
|
|
+ }else if(event.keyCode == 88){//中标金额快捷键x
|
|
|
+ if(event.shiftKey){
|
|
|
+ app.changeBaseValue(7, '', 2) //删除对应文本
|
|
|
+ }else{
|
|
|
+ app.changeBaseValue(7, text, 2)//填充
|
|
|
+ }
|
|
|
+ }else if(event.keyCode == 65){//采购单位快捷键a
|
|
|
+ if(event.shiftKey){
|
|
|
+ app.changeBaseValue(8, '', 2) //删除对应文本
|
|
|
+ }else{
|
|
|
+ app.changeBaseValue(8, text, 2)//填充
|
|
|
+ }
|
|
|
+ }else if(event.keyCode == 83){//代理机构快捷键s
|
|
|
+ if(event.shiftKey){
|
|
|
+ app.changeBaseValue(9, '', 2) //删除对应文本
|
|
|
+ }else{
|
|
|
+ app.changeBaseValue(9, text, 2)//填充
|
|
|
+ }
|
|
|
+ }else if(event.keyCode == 68){//中标单位快捷键d
|
|
|
+ if(event.shiftKey){
|
|
|
+ app.changeBaseValue(10, '', 2) //删除对应文本
|
|
|
+ }else{
|
|
|
+ app.changeBaseValue(10, text, 2)//填充
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ //获取鼠标选中的文本
|
|
|
+ function getSelectedContents(){
|
|
|
+ var text = "";
|
|
|
+ if (window.getSelection) { //chrome,firefox,opera
|
|
|
+ var range=window.getSelection().getRangeAt(0);
|
|
|
+ var container = document.createElement('div');
|
|
|
+ container.appendChild(range.cloneContents());
|
|
|
+ text = container.innerHTML;
|
|
|
+ //return container.innerHTML;
|
|
|
+ //return window.getSelection(); //只复制文本
|
|
|
+ }else if (document.getSelection) { //其他
|
|
|
+ var range=document.getSelection().getRangeAt(0);
|
|
|
+ var container = document.createElement('div');
|
|
|
+ container.appendChild(range.cloneContents());
|
|
|
+ text = container.innerHTML;
|
|
|
+ //return container.innerHTML;
|
|
|
+ //return document.getSelection(); //只复制文本
|
|
|
+ }else if (document.selection) { //IE特有的
|
|
|
+ text = document.selection.createRange().htmlText;
|
|
|
+ //return document.selection.createRange().htmlText;
|
|
|
+ //return document.selection.createRange().text; //只复制文本
|
|
|
+ }
|
|
|
+ text = text.replace(/(\r|\n|\s+| |\<br\>|\<br\/\>)/g, "")
|
|
|
+ return text;
|
|
|
+ }
|
|
|
+
|
|
|
//记录是否点击保存
|
|
|
var issave = false;
|
|
|
var _id = {{.T.info._id}};
|
|
@@ -420,9 +540,10 @@
|
|
|
tmp.input=purchasinglist[k][i].value
|
|
|
tmp.key=purchasinglist[k][i].key
|
|
|
tmp.status=purchasinglist[k][i].status
|
|
|
- if(purchasinglist[k][i].key== "blackboard_or_screen"){
|
|
|
- tmp.select=purchasinglist[k][i].value
|
|
|
- tmp.selectArr=['黑板','大屏','黑板/大屏']
|
|
|
+ if(purchasinglist[k][i].key== "pclisover"){
|
|
|
+ tmp.select = purchasinglist[k][i].value ? purchasinglist[k][i].value : '是'
|
|
|
+ //tmp.select=purchasinglist[k][i].value
|
|
|
+ tmp.selectArr=['是','否']
|
|
|
}
|
|
|
c_uInput[i]=tmp
|
|
|
}
|
|
@@ -436,7 +557,6 @@
|
|
|
pcl_content[k]=content
|
|
|
}
|
|
|
|
|
|
-
|
|
|
//var ispackage='{{.T.ispackage}}'
|
|
|
//子包信息
|
|
|
var packs={{.T.packs}}
|
|
@@ -457,13 +577,20 @@
|
|
|
tmp.title=pack[i].descript
|
|
|
tmp.input=pack[i].value
|
|
|
tmp.key=pack[i].key
|
|
|
- //if(pack[i].key=="bidstatus"){
|
|
|
- // tmp.select=pack[i].value
|
|
|
- // tmp.selectArr=['预告','招标','成交', '中标', '废标','流标']
|
|
|
- //}
|
|
|
tmp.status=pack[i].status
|
|
|
uInputs[i]=tmp
|
|
|
}
|
|
|
+
|
|
|
+ //子包候选人
|
|
|
+ var winnerall = packs[k]["winnerall"]
|
|
|
+ for(i in winnerall){
|
|
|
+ var tmp={}
|
|
|
+ tmp.title=winnerall[i].descript
|
|
|
+ tmp.input=winnerall[i].value
|
|
|
+ tmp.key=winnerall[i].key
|
|
|
+ tmp.status=winnerall[i].status
|
|
|
+ uInputs.push(tmp)
|
|
|
+ }
|
|
|
var content={};
|
|
|
content.title="子包";
|
|
|
content.show=true;
|
|
@@ -472,53 +599,25 @@
|
|
|
content.ck_isnew=pkg_new[k] || false
|
|
|
content.num = packskey[k];
|
|
|
p_content[k]=content;
|
|
|
- /**
|
|
|
- //子包候选人
|
|
|
- var pworder=packs[k]["pack_worder"]
|
|
|
- var p_in_content=[];
|
|
|
- for(i in pworder){
|
|
|
- var in_uInputs=[];
|
|
|
- for(n in pworder[i]){
|
|
|
- var tmp={}
|
|
|
- tmp.title=pworder[i][n].descript
|
|
|
- tmp.input=pworder[i][n].value
|
|
|
- tmp.key=pworder[i][n].key
|
|
|
- tmp.status=pworder[i][n].status
|
|
|
- in_uInputs[n]=tmp
|
|
|
- }
|
|
|
- var in_content={}
|
|
|
- in_content.title="候选人";
|
|
|
- if(i==0){
|
|
|
- in_content.show=true;
|
|
|
- }else{
|
|
|
- in_content.show=false;
|
|
|
- }
|
|
|
- in_content.uInput=in_uInputs;
|
|
|
- p_in_content[i]=in_content
|
|
|
- }
|
|
|
- content.content=p_in_content;
|
|
|
- p_content[k]=content;
|
|
|
- */
|
|
|
+
|
|
|
}
|
|
|
|
|
|
var pclf = {{.T.PurchasinglistField}};
|
|
|
var pclfInput = []
|
|
|
for(i in pclf){
|
|
|
- for(key in pclf[i]){
|
|
|
- var tempNode = {
|
|
|
- input:"",
|
|
|
- key:key,
|
|
|
- status:"2",
|
|
|
- title:pclf[i][key]
|
|
|
- }
|
|
|
- if(key== "blackboard_or_screen"){
|
|
|
- tempNode.select= ''
|
|
|
- tempNode.selectArr=['黑板','大屏','黑板/大屏']
|
|
|
- }
|
|
|
- pclfInput.push(tempNode)
|
|
|
-
|
|
|
-
|
|
|
- }
|
|
|
+ for(key in pclf[i]){
|
|
|
+ var tempNode = {
|
|
|
+ input:"",
|
|
|
+ key:key,
|
|
|
+ status:"2",
|
|
|
+ title:pclf[i][key]
|
|
|
+ }
|
|
|
+ if(key== "pclisover"){
|
|
|
+ tempNode.select= '是'
|
|
|
+ tempNode.selectArr=['是','否']
|
|
|
+ }
|
|
|
+ pclfInput.push(tempNode)
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
|
|
@@ -550,10 +649,15 @@
|
|
|
el: '#app',
|
|
|
delimiters:["[[","]]"],
|
|
|
data: {
|
|
|
+ activeLabel: '原文',
|
|
|
+ otherInfo: otherInfo,
|
|
|
+ moreInfo: moreInfo,
|
|
|
+ scrollCache: {
|
|
|
+ value: '',
|
|
|
+ index: 0
|
|
|
+ },
|
|
|
textMap: ['','','增', '改', '删'],
|
|
|
- tempHtml: `{{Html (Regexp (Regexp .T.info.detail "(\\n|\\\\n)\\s+" "\n") "(`|\\n|\\\\n)+" "<br/>")}}`,
|
|
|
- dataHtml: `{{Html (Regexp (Regexp .T.info.detail "(\\n|\\\\n)\\s+" "\n") "(`|\\n|\\\\n)+" "<br/>")}}`,
|
|
|
- fileHtml: {{.T.info.filetext}}.replace(/(\\n|\\\\n)\\s+/, '\n').replace(/(`|\\n|\\\\n)+/, '<br>'),
|
|
|
+ pageHtml: `{{Html (Regexp (Regexp .T.info.detail "(\\n|\\\\n)\\s+" "\n") "(`|\\n|\\\\n)+" "<br/>")}}`,
|
|
|
showPop: false,
|
|
|
editData: [
|
|
|
{
|
|
@@ -623,9 +727,89 @@
|
|
|
}
|
|
|
]
|
|
|
}
|
|
|
- ]
|
|
|
+ ],
|
|
|
+ originData: []
|
|
|
+ },
|
|
|
+ watch: {
|
|
|
+ //切换标签时更改正文内容
|
|
|
+ 'activeLabel': function (){
|
|
|
+ this.pageHtml = this.getPageInfo.html
|
|
|
+ }
|
|
|
+ },
|
|
|
+ computed: {
|
|
|
+ getPageInfo () {
|
|
|
+ var tempData = {
|
|
|
+ title: '',
|
|
|
+ html: this.pageHtml,
|
|
|
+ href: ''
|
|
|
+ }
|
|
|
+ //匹配原文或者原文附件
|
|
|
+ var originData = pageDataMap[this.activeLabel]
|
|
|
+ if (originData) {
|
|
|
+ tempData.title = originData.title
|
|
|
+ tempData.html = originData.html
|
|
|
+ tempData.href = originData.href
|
|
|
+ } else {//匹配原公告关联信息
|
|
|
+ var tempS = this.activeLabel.split('-')
|
|
|
+ var isFile = tempS.length === 2
|
|
|
+ var otherData = this.otherInfo.filter(v => v.subtype == tempS[0])
|
|
|
+ if (otherData.length > 0) {
|
|
|
+ tempData.title = otherData[0].title
|
|
|
+ tempData.html = otherData[0].detail
|
|
|
+ tempData.href = otherData[0].href
|
|
|
+ if (isFile) {
|
|
|
+ tempData.title = '附件内容'
|
|
|
+ tempData.html = otherData[0].filetext
|
|
|
+ tempData.href = ''
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return tempData
|
|
|
+ }
|
|
|
+ },
|
|
|
+ mounted () {
|
|
|
+ // 缓存原始数据
|
|
|
+ this.originData = JSON.parse(JSON.stringify([].concat(this.editData)))
|
|
|
},
|
|
|
methods: {
|
|
|
+ // 当前输入框数据与原始数据比较
|
|
|
+ focusFn (uin, oIndex, tIndex, uIndex, two, one) {
|
|
|
+ //console.log(uin,uin.input, this.originData[oIndex].content[tIndex].uInput[uIndex].input, 'item')
|
|
|
+ if(uin.key=="bidendtime"||uin.key=="bidopentime"||uin.key=="project_startdate"||uin.key=="project_completedate"||uin.key=="publishtime"||uin.key=="signaturedate"){
|
|
|
+ var val = uin.input
|
|
|
+ if(val != ""){
|
|
|
+ var reg = /^[1-9]\d{3}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])\s+(20|21|22|23|[0-1]\d):[0-5]\d:[0-5]\d$/;
|
|
|
+ var regExp = new RegExp(reg);
|
|
|
+ if(!regExp.test(val)){
|
|
|
+ this.$message({
|
|
|
+ message: uin.title+",日期格式错误!正确格式:2006-01-02 15:04:05",
|
|
|
+ type: 'warning',
|
|
|
+ duration: 3000,
|
|
|
+ offset: 300
|
|
|
+ });
|
|
|
+ return
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ console.log(22222222222)
|
|
|
+ var oNode = this.originData[oIndex].content[tIndex].uInput[uIndex]
|
|
|
+ var changeStatus = uin.input == oNode.input
|
|
|
+ if (uin.select) {
|
|
|
+ changeStatus = uin.select == oNode.select
|
|
|
+ }
|
|
|
+ uin.status = changeStatus ? 1 : 2
|
|
|
+ this.setStatus(uin,uin.status,two,one);
|
|
|
+ },
|
|
|
+ openLink (link) {
|
|
|
+ window.open(link, '_blank')
|
|
|
+ },
|
|
|
+ // 改变基本字段属性
|
|
|
+ changeBaseValue (index, input, status) {
|
|
|
+ if (this.editData[0].content[0].uInput[index].input != input) {
|
|
|
+ this.editData[0].content[0].uInput[index].input = input
|
|
|
+ this.editData[0].content[0].uInput[index].status = status
|
|
|
+ }
|
|
|
+ },
|
|
|
selectchange(uni,status,two,one){//状态更新
|
|
|
if (uni.status == '-1' || uni.status == '2') {
|
|
|
status = 2
|
|
@@ -684,15 +868,14 @@
|
|
|
if (statusList[1] > 0) {
|
|
|
tempObj.obj.status = 1
|
|
|
}
|
|
|
-
|
|
|
if (statusList[4] > 0 || statusList[3] > 0 || statusList[2] > 0) {
|
|
|
- tempObj.obj.status = 3
|
|
|
+ tempObj.obj.status = 2
|
|
|
}
|
|
|
if (statusList[4] === tempObj.list.length) {
|
|
|
- tempObj.obj.status = 4
|
|
|
+ tempObj.obj.status = 2
|
|
|
}
|
|
|
if (statusList[3] === tempObj.list.length) {
|
|
|
- tempObj.obj.status = 3
|
|
|
+ tempObj.obj.status = 2
|
|
|
}
|
|
|
if (statusList[2] === tempObj.list.length) {
|
|
|
tempObj.obj.status = 2
|
|
@@ -718,8 +901,14 @@
|
|
|
var reg = /^[1-9]\d{3}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])\s+(20|21|22|23|[0-1]\d):[0-5]\d:[0-5]\d$/;
|
|
|
var regExp = new RegExp(reg);
|
|
|
if(!regExp.test(val)){
|
|
|
- alert(witch.title+",日期格式错误!正确格式:2006-01-02 15:04:05")
|
|
|
- return
|
|
|
+ this.$message({
|
|
|
+ message: witch.title+",日期格式错误!正确格式:2006-01-02 15:04:05",
|
|
|
+ type: 'warning',
|
|
|
+ duration: 3000,
|
|
|
+ offset: 300
|
|
|
+ });
|
|
|
+ //alert(witch.title+",日期格式错误!正确格式:2006-01-02 15:04:05")
|
|
|
+ return
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -737,8 +926,8 @@
|
|
|
if (two.ck_isnew) {
|
|
|
one.content.splice(index, 1)
|
|
|
} else {
|
|
|
- two.status = 4
|
|
|
- this.saveDataTwo(two, 4, one)
|
|
|
+ two.status = 2
|
|
|
+ this.saveDataTwo(two, 2, one)
|
|
|
}
|
|
|
this.checkOneStatus({
|
|
|
one: one,
|
|
@@ -766,25 +955,36 @@
|
|
|
},
|
|
|
goText: function (value) {
|
|
|
/*重置Html*/
|
|
|
- this.dataHtml = this.tempHtml
|
|
|
- if (!value) {return false}
|
|
|
+ this.pageHtml = this.getPageInfo.html
|
|
|
+ if (!value) {
|
|
|
+ return false
|
|
|
+ }
|
|
|
var rs = new RegExp('(' + value + ')', 'gi')
|
|
|
-
|
|
|
- if (rs.test(this.dataHtml)) {
|
|
|
- this.dataHtml = this.dataHtml.replace(rs, '<mark>$1</mark>')
|
|
|
+ //选中input框值文本高亮
|
|
|
+ if (rs.test(this.pageHtml)) {
|
|
|
+ this.pageHtml = this.pageHtml.replace(rs, '<mark>$1</mark>')
|
|
|
/*延迟查询dom,防止dom未插入*/
|
|
|
var $this = this
|
|
|
setTimeout(function () {
|
|
|
- $this.goMark()
|
|
|
+ $this.goMark(value)
|
|
|
}, 150)
|
|
|
} else {
|
|
|
/*重置Html*/
|
|
|
- this.dataHtml = this.tempHtml
|
|
|
+ this.pageHtml = this.getPageInfo.html
|
|
|
}
|
|
|
},
|
|
|
- goMark: function () {
|
|
|
+ goMark: function (value) {
|
|
|
+ var mLength = document.querySelectorAll('mark').length
|
|
|
+ if (this.scrollCache.value === value) {
|
|
|
+ this.scrollCache.index = (this.scrollCache.index + 1) % mLength
|
|
|
+ } else {
|
|
|
+ this.scrollCache.index = 0
|
|
|
+ }
|
|
|
+ this.scrollCache.value = value
|
|
|
/*滚动到第一个mark*/
|
|
|
- var temp = document.querySelectorAll('mark')[0]
|
|
|
+ var temp = document.querySelectorAll('mark')[this.scrollCache.index]
|
|
|
+ $("mark").removeClass('focus')
|
|
|
+ $(temp).addClass('focus')
|
|
|
document.querySelector('.article').scrollTop = offset(temp).top - window.screen.height / 2
|
|
|
},
|
|
|
//markTag:function(n){
|
|
@@ -802,12 +1002,12 @@
|
|
|
// }
|
|
|
// });
|
|
|
//},
|
|
|
- addChild: function (one) {
|
|
|
+ addChild: function (one, oindex) {
|
|
|
var tempNode = {}
|
|
|
switch (one.title) {
|
|
|
case "标的信息": {
|
|
|
tempNode = {
|
|
|
- content: [],
|
|
|
+ //content: [],
|
|
|
show:true,
|
|
|
ck_isnew: true,
|
|
|
status: 2,
|
|
@@ -818,7 +1018,7 @@
|
|
|
}
|
|
|
case "多包信息": {pfInput
|
|
|
tempNode = {
|
|
|
- content: [],
|
|
|
+ //content: [],
|
|
|
show:true,
|
|
|
status: 2,
|
|
|
ck_isnew: true,
|
|
@@ -829,7 +1029,7 @@
|
|
|
}
|
|
|
case "中标候选人信息": {
|
|
|
tempNode = {
|
|
|
- content: [],
|
|
|
+ //content: [],
|
|
|
show:true,
|
|
|
status: 2,
|
|
|
ck_isnew: true,
|
|
@@ -847,6 +1047,34 @@
|
|
|
one: one,
|
|
|
type: true
|
|
|
})
|
|
|
+ this.$nextTick(() => {
|
|
|
+ var tempN = $(".edit.one").eq(oindex).find(".edit-title")
|
|
|
+ var goTop = tempN.eq(tempN.length - 1).offset().top
|
|
|
+ setTimeout(() => {
|
|
|
+ $(".operation").scrollTop(goTop)
|
|
|
+ }, 150)
|
|
|
+ })
|
|
|
+ },
|
|
|
+ // 新增子包中标信息字段
|
|
|
+ addThreeChild:function(two,n, one){
|
|
|
+ two.uInput.push({
|
|
|
+ input:"",
|
|
|
+ key: 'winner',
|
|
|
+ status:"2",
|
|
|
+ title: '标段(包)中标单位'
|
|
|
+ })
|
|
|
+ two.uInput.push({
|
|
|
+ input:"",
|
|
|
+ key: 'bidamount',
|
|
|
+ status:"2",
|
|
|
+ title: '标段(包)中金额'
|
|
|
+ })
|
|
|
+ two.status = 2
|
|
|
+ this.checkOneStatus({
|
|
|
+ one: one,
|
|
|
+ two: two,
|
|
|
+ type: false
|
|
|
+ })
|
|
|
},
|
|
|
//保存
|
|
|
saveDataTwo:function(two,n, one){
|
|
@@ -858,7 +1086,13 @@
|
|
|
var reg = /^[1-9]\d{3}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])\s+(20|21|22|23|[0-1]\d):[0-5]\d:[0-5]\d$/;
|
|
|
var regExp = new RegExp(reg);
|
|
|
if(!regExp.test(val)){
|
|
|
- alert(v.title+",日期格式错误!正确格式:2006-01-02 15:04:05")
|
|
|
+ this.$message({
|
|
|
+ message: v.title+",日期格式错误!正确格式:2006-01-02 15:04:05",
|
|
|
+ type: 'warning',
|
|
|
+ duration: 3000,
|
|
|
+ offset: 300
|
|
|
+ });
|
|
|
+ //alert(v.title+",日期格式错误!正确格式:2006-01-02 15:04:05")
|
|
|
return
|
|
|
}
|
|
|
}
|
|
@@ -867,7 +1101,7 @@
|
|
|
v.status = n
|
|
|
} else if (n=="-1"){
|
|
|
v.status = n
|
|
|
- } else if (n=="4"){
|
|
|
+ } else if (n=="2"){
|
|
|
v.status = n
|
|
|
}
|
|
|
});
|
|
@@ -900,7 +1134,13 @@
|
|
|
var reg = /^[1-9]\d{3}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])\s+(20|21|22|23|[0-1]\d):[0-5]\d:[0-5]\d$/;
|
|
|
var regExp = new RegExp(reg);
|
|
|
if(!regExp.test(val)){
|
|
|
- alert(value.title+",日期格式错误!正确格式:2006-01-02 15:04:05")
|
|
|
+ this.$message({
|
|
|
+ message: value.title+",日期格式错误!正确格式:2006-01-02 15:04:05",
|
|
|
+ type: 'warning',
|
|
|
+ duration: 3000,
|
|
|
+ offset: 300
|
|
|
+ });
|
|
|
+ //alert(value.title+",日期格式错误!正确格式:2006-01-02 15:04:05")
|
|
|
return
|
|
|
}
|
|
|
}
|