|
@@ -4,53 +4,40 @@
|
|
|
<el-form ref="form" :model="form" label-width="40px">
|
|
|
<div class="mcrh-dialog">
|
|
|
<el-form-item label="类型">
|
|
|
- <el-select @change="logchange" style="width:200px" multiple collapse-tags v-model="form.opTypeLabel" placeholder="请选择类型">
|
|
|
- <el-option v-for="(item,index) in logtypearr" :key="index" :label="item.text" :value="item.value"></el-option>
|
|
|
+ <el-select @change="logchange" style="width:200px" multiple collapse-tags
|
|
|
+ v-model="form.opTypeLabel" placeholder="请选择类型">
|
|
|
+ <el-option v-for="(item, index) in logtypearr" :key="index" :label="item.text"
|
|
|
+ :value="item.value"></el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="人员">
|
|
|
- <el-select @change="logchange" style="width:200px" multiple collapse-tags v-model="form.opUserLabel" placeholder="请选择人员">
|
|
|
- <el-option v-for="(item,index) in personnelarr" :key="index" :label="item.text" :value="item.value"></el-option>
|
|
|
+ <el-select @change="logchange" style="width:200px" multiple collapse-tags
|
|
|
+ v-model="form.opUserLabel" placeholder="请选择人员">
|
|
|
+ <el-option v-for="(item, index) in personnelarr" :key="index" :label="item.text"
|
|
|
+ :value="item.value"></el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="日期">
|
|
|
- <el-date-picker @change="logchange" style="width:350px" v-model="form.time" type="daterange" align="right" unlink-panels
|
|
|
- range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期"
|
|
|
- :picker-options="pickerOptions">
|
|
|
+ <el-date-picker @change="logchange" style="width:350px" v-model="form.time" type="daterange"
|
|
|
+ align="right" unlink-panels range-separator="至" start-placeholder="开始日期"
|
|
|
+ end-placeholder="结束日期" :picker-options="pickerOptions">
|
|
|
</el-date-picker>
|
|
|
</el-form-item>
|
|
|
</div>
|
|
|
</el-form>
|
|
|
<div>
|
|
|
- <el-table
|
|
|
- height="529px"
|
|
|
- :data="logtableData"
|
|
|
- border
|
|
|
- style="width: 100%">
|
|
|
- <el-table-column
|
|
|
- prop="rowIndex"
|
|
|
- label="序号"
|
|
|
- width="150">
|
|
|
+ <el-table height="529px" :data="logtableData" border style="width: 100%">
|
|
|
+ <el-table-column prop="rowIndex" label="序号" width="150">
|
|
|
</el-table-column>
|
|
|
- <el-table-column
|
|
|
- prop="label"
|
|
|
- label="具体事件">
|
|
|
+ <el-table-column prop="label" label="具体事件">
|
|
|
</el-table-column>
|
|
|
- <el-table-column
|
|
|
- prop="createTime"
|
|
|
- label="操作时间"
|
|
|
- width="180">
|
|
|
+ <el-table-column prop="createTime" label="操作时间" width="180">
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
<div style="text-align: center;">
|
|
|
- <el-pagination
|
|
|
- @size-change="loghandleSizeChange"
|
|
|
- @current-change="loghandleCurrentChange"
|
|
|
- :current-page="logcurrentPage"
|
|
|
- :page-sizes="[10, 15, 20]"
|
|
|
- :page-size="logpagesize"
|
|
|
- layout="total, sizes, prev, pager, next, jumper"
|
|
|
- :total="logtotal">
|
|
|
+ <el-pagination @size-change="loghandleSizeChange" @current-change="loghandleCurrentChange"
|
|
|
+ :current-page="logcurrentPage" :page-sizes="[10, 15, 20]" :page-size="logpagesize"
|
|
|
+ layout="total, sizes, prev, pager, next, jumper" :total="logtotal">
|
|
|
</el-pagination>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -106,27 +93,35 @@
|
|
|
<el-input v-model="inputLXR" placeholder="联系人"></el-input>
|
|
|
</div>
|
|
|
|
|
|
- <div style="width: 26.5%;">
|
|
|
+ <div style="width: 26.5%;">
|
|
|
<el-input v-model="inputDQ" placeholder="地区"></el-input>
|
|
|
</div>
|
|
|
|
|
|
<div style="width: 27%;">
|
|
|
- <el-input v-model="inputDW" placeholder="单位"></el-input>
|
|
|
+ <!-- <el-input v-model="inputDW" placeholder="单位"></el-input> -->
|
|
|
+
|
|
|
+ <el-select style="width: 100%;" clearable v-model="inputDW" filterable remote placeholder="单位"
|
|
|
+ :remote-method="remoteMethod" :loading="selectLoading">
|
|
|
+ <el-option v-for="item in options" :key="item.id" :label="item.client" :value="item.client">
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+
|
|
|
</div>
|
|
|
|
|
|
- <el-button v-if="userId==21" type="primary" @click="NewClientDataAuthorityExcelDownload">按权限导出</el-button>
|
|
|
+ <el-button v-if="userId == 21" type="primary"
|
|
|
+ @click="NewClientDataAuthorityExcelDownload">按权限导出</el-button>
|
|
|
|
|
|
<div class="btnOp">
|
|
|
<div>
|
|
|
<el-button type="primary" @click="QueryData">查 询</el-button>
|
|
|
- <el-button v-if="userId==21" type="primary" @click="NewClientDataExcelDownload">导
|
|
|
+ <el-button v-if="userId == 21" type="primary" @click="NewClientDataExcelDownload">导
|
|
|
出</el-button>
|
|
|
</div>
|
|
|
<div style="height: 10px;">
|
|
|
</div>
|
|
|
<div>
|
|
|
<el-button type="primary" @click="Add">新 增</el-button>
|
|
|
- <el-button @click="logquery" v-if="userId==21" type="primary">日 志</el-button>
|
|
|
+ <el-button @click="logquery" v-if="userId == 21" type="primary">日 志</el-button>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -163,9 +158,9 @@
|
|
|
<div slot="content">
|
|
|
<div v-for="(yw, index) in scope.row.ascribedDepartment" :key="index"
|
|
|
style="text-align: center; width: 100px;padding: 5px;">
|
|
|
- {{ yw.name+'部' }}<br /><br />
|
|
|
+ {{ yw.name + '部' }}<br /><br />
|
|
|
</div>
|
|
|
- {{ scope.row.notUpdateDays+'天未修改数据' }}
|
|
|
+ {{ scope.row.notUpdateDays + '天未修改数据' }}
|
|
|
</div>
|
|
|
</el-tooltip>
|
|
|
</template>
|
|
@@ -297,35 +292,38 @@ export default {
|
|
|
userId: 0,
|
|
|
token: '',
|
|
|
isSelect: true,
|
|
|
- mcrhVisible:false,
|
|
|
- form:{
|
|
|
- opTypeLabel:'',
|
|
|
- opUserLabel:'',
|
|
|
- time:'',
|
|
|
+ mcrhVisible: false,
|
|
|
+ form: {
|
|
|
+ opTypeLabel: '',
|
|
|
+ opUserLabel: '',
|
|
|
+ time: '',
|
|
|
},
|
|
|
- logtypearr:[],
|
|
|
- personnelarr:[],
|
|
|
- logtableData:[],
|
|
|
- logcurrentPage:1,
|
|
|
- logpagesize:10,
|
|
|
- logtotal:0,
|
|
|
+ logtypearr: [],
|
|
|
+ personnelarr: [],
|
|
|
+ logtableData: [],
|
|
|
+ logcurrentPage: 1,
|
|
|
+ logpagesize: 10,
|
|
|
+ logtotal: 0,
|
|
|
+ selectLoading: false,
|
|
|
+ options: [],
|
|
|
+
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
//处理日期
|
|
|
- datetime(val){
|
|
|
- var date=new Date(val);
|
|
|
- var y=date.getFullYear();
|
|
|
- var m=date.getMonth()+1>=10?date.getMonth()+1:'0'+(date.getMonth()+1).toString();
|
|
|
- var d=date.getDate()>=10?date.getDate():'0'+(date.getDate()).toString();
|
|
|
- return y+'-'+m+'-'+d
|
|
|
+ datetime(val) {
|
|
|
+ var date = new Date(val);
|
|
|
+ var y = date.getFullYear();
|
|
|
+ var m = date.getMonth() + 1 >= 10 ? date.getMonth() + 1 : '0' + (date.getMonth() + 1).toString();
|
|
|
+ var d = date.getDate() >= 10 ? date.getDate() : '0' + (date.getDate()).toString();
|
|
|
+ return y + '-' + m + '-' + d
|
|
|
},
|
|
|
loghandleSizeChange(val) {
|
|
|
- this.logpagesize=val;
|
|
|
+ this.logpagesize = val;
|
|
|
this.logchange();
|
|
|
},
|
|
|
loghandleCurrentChange(val) {
|
|
|
- this.logcurrentPage=val;
|
|
|
+ this.logcurrentPage = val;
|
|
|
this.logchange();
|
|
|
},
|
|
|
//每页条数改变时触发 选择一页显示多少行
|
|
@@ -344,31 +342,31 @@ export default {
|
|
|
this.pageload();
|
|
|
},
|
|
|
//logchange
|
|
|
- logchange(){
|
|
|
- this.logcurrentPage=1;
|
|
|
- let opTypeLabels='';
|
|
|
- let opUserLabels='';
|
|
|
- for(let i=0;i<this.form.opTypeLabel.length;i++){
|
|
|
- opTypeLabels+=this.form.opTypeLabel[i]+','
|
|
|
+ logchange() {
|
|
|
+ this.logcurrentPage = 1;
|
|
|
+ let opTypeLabels = '';
|
|
|
+ let opUserLabels = '';
|
|
|
+ for (let i = 0; i < this.form.opTypeLabel.length; i++) {
|
|
|
+ opTypeLabels += this.form.opTypeLabel[i] + ','
|
|
|
}
|
|
|
- opTypeLabels=opTypeLabels.substring(0, opTypeLabels.length - 1)
|
|
|
-
|
|
|
- for(let j=0;j<this.form.opUserLabel.length;j++){
|
|
|
- opUserLabels+=this.form.opUserLabel[j]+','
|
|
|
+ opTypeLabels = opTypeLabels.substring(0, opTypeLabels.length - 1)
|
|
|
+
|
|
|
+ for (let j = 0; j < this.form.opUserLabel.length; j++) {
|
|
|
+ opUserLabels += this.form.opUserLabel[j] + ','
|
|
|
}
|
|
|
- opUserLabels=opUserLabels.substring(0, opUserLabels.length - 1)
|
|
|
- this.NewClientDataRecord(opTypeLabels,opUserLabels,this.datetime(this.form.time[0]),this.datetime(this.form.time[1]))
|
|
|
-
|
|
|
+ opUserLabels = opUserLabels.substring(0, opUserLabels.length - 1)
|
|
|
+ this.NewClientDataRecord(opTypeLabels, opUserLabels, this.datetime(this.form.time[0]), this.datetime(this.form.time[1]))
|
|
|
+
|
|
|
},
|
|
|
//历史记录
|
|
|
- NewClientDataRecord(opTypeLabel,opUserLabel,beginTime,endTime){
|
|
|
+ NewClientDataRecord(opTypeLabel, opUserLabel, beginTime, endTime) {
|
|
|
var that = this;
|
|
|
var url = "/api/MarketCustomerResources/NewClientDataRecord"
|
|
|
this.$axios({
|
|
|
method: 'post',
|
|
|
url: url,
|
|
|
- data:{
|
|
|
- portType:1,
|
|
|
+ data: {
|
|
|
+ portType: 1,
|
|
|
userId: that.userId,
|
|
|
pageId: 89,
|
|
|
pageIndex: that.logcurrentPage,
|
|
@@ -380,9 +378,9 @@ export default {
|
|
|
}
|
|
|
}).then(function (res) {
|
|
|
if (res.data.code == 200) {
|
|
|
- let datalog=res.data.data;
|
|
|
- that.logtableData=datalog;
|
|
|
- that.logtotal=res.data.count;
|
|
|
+ let datalog = res.data.data;
|
|
|
+ that.logtableData = datalog;
|
|
|
+ that.logtotal = res.data.count;
|
|
|
} else {
|
|
|
that.$message.error(res.data.msg);
|
|
|
}
|
|
@@ -393,22 +391,22 @@ export default {
|
|
|
|
|
|
},
|
|
|
//日志基础数据
|
|
|
- NewClientDataRecordInit(){
|
|
|
+ NewClientDataRecordInit() {
|
|
|
var that = this;
|
|
|
var url = "/api/MarketCustomerResources/NewClientDataRecordInit"
|
|
|
this.$axios({
|
|
|
method: 'post',
|
|
|
url: url,
|
|
|
- data:{
|
|
|
- portType:1,
|
|
|
+ data: {
|
|
|
+ portType: 1,
|
|
|
userId: that.userId,
|
|
|
pageId: 89,
|
|
|
}
|
|
|
}).then(function (res) {
|
|
|
if (res.data.code == 200) {
|
|
|
- let datainfo=res.data.data;
|
|
|
- that.logtypearr=datainfo.operations;
|
|
|
- that.personnelarr=datainfo.userDatas;
|
|
|
+ let datainfo = res.data.data;
|
|
|
+ that.logtypearr = datainfo.operations;
|
|
|
+ that.personnelarr = datainfo.userDatas;
|
|
|
|
|
|
} else {
|
|
|
that.$message.error(res.data.msg);
|
|
@@ -416,23 +414,23 @@ export default {
|
|
|
})
|
|
|
},
|
|
|
//日志查询
|
|
|
- logquery(){
|
|
|
- this.mcrhVisible=true;
|
|
|
- this.logtableData=[];
|
|
|
- this.form={
|
|
|
- opTypeLabel:'',
|
|
|
- opUserLabel:'',
|
|
|
- time:'',
|
|
|
+ logquery() {
|
|
|
+ this.mcrhVisible = true;
|
|
|
+ this.logtableData = [];
|
|
|
+ this.form = {
|
|
|
+ opTypeLabel: '',
|
|
|
+ opUserLabel: '',
|
|
|
+ time: '',
|
|
|
},
|
|
|
- this.logchange();
|
|
|
+ this.logchange();
|
|
|
},
|
|
|
//条件颜色
|
|
|
- addClass({row,column,rowIndex,columnIndex}){
|
|
|
- if(row.notUpdateDays >= 365){
|
|
|
- return 'cell-grey';
|
|
|
+ addClass({ row, column, rowIndex, columnIndex }) {
|
|
|
+ if (row.notUpdateDays >= 365) {
|
|
|
+ return 'cell-grey';
|
|
|
}
|
|
|
},
|
|
|
- NewClientDataAuthorityExcelDownload(){
|
|
|
+ NewClientDataAuthorityExcelDownload() {
|
|
|
var url = "/api/MarketCustomerResources/NewClientDataAuthorityExcelDownload"
|
|
|
var that = this
|
|
|
that.$axios({
|
|
@@ -442,19 +440,19 @@ export default {
|
|
|
Authorization: 'Bearer '
|
|
|
},
|
|
|
data: {
|
|
|
- portType:1,
|
|
|
- pageIndex:that.pageloadData.pageIndex,
|
|
|
- pageSize:that.pageloadData.pageIndex,
|
|
|
- operationUserId:that.userId,
|
|
|
- contact:that.pageloadData.contact,
|
|
|
- location:that.pageloadData.location,
|
|
|
- client:that.pageloadData.client,
|
|
|
- userid:that.pageloadData.userid,
|
|
|
- lvlid:that.pageloadData.lvlid,
|
|
|
- business:that.pageloadData.business,
|
|
|
- range:that.pageloadData.Range,
|
|
|
- category:that.pageloadData.Category,
|
|
|
- pageId:89,
|
|
|
+ portType: 1,
|
|
|
+ pageIndex: that.pageloadData.pageIndex,
|
|
|
+ pageSize: that.pageloadData.pageIndex,
|
|
|
+ operationUserId: that.userId,
|
|
|
+ contact: that.pageloadData.contact,
|
|
|
+ location: that.pageloadData.location,
|
|
|
+ client: that.pageloadData.client,
|
|
|
+ userid: that.pageloadData.userid,
|
|
|
+ lvlid: that.pageloadData.lvlid,
|
|
|
+ business: that.pageloadData.business,
|
|
|
+ range: that.pageloadData.Range,
|
|
|
+ category: that.pageloadData.Category,
|
|
|
+ pageId: 89,
|
|
|
}
|
|
|
}).then(function (res) {
|
|
|
if (res.data.code == 200) {
|
|
@@ -463,7 +461,7 @@ export default {
|
|
|
message: res.data.msg,
|
|
|
});
|
|
|
window.open(res.data.data)
|
|
|
- }else{
|
|
|
+ } else {
|
|
|
that.$message({
|
|
|
message: res.data.msg,
|
|
|
type: 'warning'
|
|
@@ -471,7 +469,7 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
- NewClientDataExcelDownload(){
|
|
|
+ NewClientDataExcelDownload() {
|
|
|
var url = "api/MarketCustomerResources/NewClientDataExcelDownload"
|
|
|
var that = this
|
|
|
that.$axios({
|
|
@@ -481,19 +479,19 @@ export default {
|
|
|
Authorization: 'Bearer '
|
|
|
},
|
|
|
data: {
|
|
|
- portType:1,
|
|
|
- pageIndex:that.pageloadData.pageIndex,
|
|
|
- pageSize:that.pageloadData.pageIndex,
|
|
|
- operationUserId:that.userId,
|
|
|
- contact:that.pageloadData.contact,
|
|
|
- location:that.pageloadData.location,
|
|
|
- client:that.pageloadData.client,
|
|
|
- userid:that.pageloadData.userid,
|
|
|
- lvlid:that.pageloadData.lvlid,
|
|
|
- business:that.pageloadData.business,
|
|
|
- range:that.pageloadData.Range,
|
|
|
- category:that.pageloadData.Category,
|
|
|
- pageId:89,
|
|
|
+ portType: 1,
|
|
|
+ pageIndex: that.pageloadData.pageIndex,
|
|
|
+ pageSize: that.pageloadData.pageIndex,
|
|
|
+ operationUserId: that.userId,
|
|
|
+ contact: that.pageloadData.contact,
|
|
|
+ location: that.pageloadData.location,
|
|
|
+ client: that.pageloadData.client,
|
|
|
+ userid: that.pageloadData.userid,
|
|
|
+ lvlid: that.pageloadData.lvlid,
|
|
|
+ business: that.pageloadData.business,
|
|
|
+ range: that.pageloadData.Range,
|
|
|
+ category: that.pageloadData.Category,
|
|
|
+ pageId: 89,
|
|
|
}
|
|
|
}).then(function (res) {
|
|
|
if (res.data.code == 200) {
|
|
@@ -502,7 +500,7 @@ export default {
|
|
|
message: res.data.msg,
|
|
|
});
|
|
|
window.open(res.data.data)
|
|
|
- }else{
|
|
|
+ } else {
|
|
|
that.$message({
|
|
|
message: res.data.msg,
|
|
|
type: 'warning'
|
|
@@ -678,6 +676,38 @@ export default {
|
|
|
this.$message.error('网络异常!');
|
|
|
})
|
|
|
},
|
|
|
+ remoteMethod(query) {
|
|
|
+ if (query !== '') {
|
|
|
+ this.selectLoading = true;
|
|
|
+
|
|
|
+ this.$axios.post('/api/MarketCustomerResources/SearchClientByKeyword', {
|
|
|
+ Keyword: query,
|
|
|
+ UserId: this.userId
|
|
|
+ }, {
|
|
|
+ headers: {
|
|
|
+ 'Authorization': this.token,
|
|
|
+ },
|
|
|
+ }).then(resp => {
|
|
|
+ if (resp.data.code == 200) {
|
|
|
+ this.options = resp.data.data;
|
|
|
+ } else if (resp.data.code == 201) {
|
|
|
+ this.options = [];
|
|
|
+ } else {
|
|
|
+ //js抛异常
|
|
|
+ throw new Error(resp.data.msg);
|
|
|
+ }
|
|
|
+ }).catch(err => {
|
|
|
+ this.$message.error('网络异常!');
|
|
|
+
|
|
|
+ }).finally(() => {
|
|
|
+ console.log('finally');
|
|
|
+ this.selectLoading = false;
|
|
|
+ })
|
|
|
+
|
|
|
+ } else {
|
|
|
+ this.options = [];
|
|
|
+ }
|
|
|
+ }
|
|
|
},
|
|
|
mounted() {
|
|
|
this.token = JSON.parse(localStorage.getItem('userinif')).token;
|
|
@@ -713,7 +743,7 @@ export default {
|
|
|
var json = JSON.parse(mcrPageData);
|
|
|
this.currentPage = json.currentPage;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
},
|
|
|
computed: {
|
|
|
preDele() {
|
|
@@ -775,10 +805,12 @@ body {
|
|
|
right: 6px;
|
|
|
top: -50px;
|
|
|
}
|
|
|
-.mcrh .cell-grey{
|
|
|
+
|
|
|
+.mcrh .cell-grey {
|
|
|
color: red;
|
|
|
}
|
|
|
-.mcrh-dialog{
|
|
|
+
|
|
|
+.mcrh-dialog {
|
|
|
display: flex;
|
|
|
justify-content: space-between;
|
|
|
}
|